Move the direct IO code into a separate file so that we can group related functions in a single file instead of having a single enormous source file.
Showing the changes to include/linux (1 of 4 files). Show all
Unified · Split
| @@ -7,6 +7,7 @@ · 6 unmodified lines | |||
| 7 | #include <linux/mm.h> | 7 | #include <linux/mm.h> |
| 8 | #include <linux/types.h> | 8 | #include <linux/types.h> |
| 9 | #include <linux/mm_types.h> | 9 | #include <linux/mm_types.h> |
| 10 | #include <linux/blkdev.h> | ||
| 10 | 11 | ||
| 11 | struct address_space; | 12 | struct address_space; |
| 12 | struct fiemap_extent_info; | 13 | struct fiemap_extent_info; |
| @@ -69,6 +70,12 @@ struct iomap { · 56 unmodified lines | |||
| 69 | const struct iomap_page_ops *page_ops; | 70 | const struct iomap_page_ops *page_ops; |
| 70 | }; | 71 | }; |
| 71 | 72 | ||
| 73 | static inline sector_t | ||
| 74 | iomap_sector(struct iomap *iomap, loff_t pos) | ||
| 75 | { | ||
| 76 | return (iomap->addr + pos - iomap->offset) >> SECTOR_SHIFT; | ||
| 77 | } | ||
| 78 | |||
| 72 | /* | 79 | /* |
| 73 | * When a filesystem sets page_ops in an iomap mapping it returns, page_prepare | 80 | * When a filesystem sets page_ops in an iomap mapping it returns, page_prepare |
| 74 | * and page_done will be called for each page written to. This only applies to | 81 | * and page_done will be called for each page written to. This only applies to |