History

iomap: move the direct IO code into a separate file

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.

Darrick J. Wong committed 7 years ago

Commit db074431 parent 56a17894 files · +570 −554Browse files

Showing the changes to include/linux (1 of 4 files). Show all

Unified · Split

include/linux/iomap.h+7−0
@@ -7,6 +7,7 @@ · 6 unmodified lines
77 #include <linux/mm.h>
88 #include <linux/types.h>
99 #include <linux/mm_types.h>
10+#include <linux/blkdev.h>
1011
1112 struct address_space;
1213 struct fiemap_extent_info;
@@ -69,6 +70,12 @@ struct iomap { · 56 unmodified lines
6970 const struct iomap_page_ops *page_ops;
7071 };
7172
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+
7279 /*
7380 * When a filesystem sets page_ops in an iomap mapping it returns, page_prepare
7481 * and page_done will be called for each page written to. This only applies to

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t