diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-06-07 15:30:14 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-06-07 19:56:49 -0400 |
commit | 9ab701349247368f9d57a993b95a5bb05bb37e10 (patch) | |
tree | 7af7232ff421480e6955fc09afb9825c0eb6dcad | |
parent | 86928f984e8b166fcd0c7c241501bc00f53eb623 (diff) |
f2fs: support f2fs_fiemap
This patch links f2fs_fiemap with generic function with get_block.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r-- | fs/f2fs/data.c | 6 | ||||
-rw-r--r-- | fs/f2fs/f2fs.h | 1 | ||||
-rw-r--r-- | fs/f2fs/file.c | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 39fe7d70791a..c1fb6dd10911 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c | |||
@@ -708,6 +708,12 @@ out: | |||
708 | return err; | 708 | return err; |
709 | } | 709 | } |
710 | 710 | ||
711 | int f2fs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, | ||
712 | u64 start, u64 len) | ||
713 | { | ||
714 | return generic_block_fiemap(inode, fieinfo, start, len, get_data_block); | ||
715 | } | ||
716 | |||
711 | static int f2fs_read_data_page(struct file *file, struct page *page) | 717 | static int f2fs_read_data_page(struct file *file, struct page *page) |
712 | { | 718 | { |
713 | struct inode *inode = page->mapping->host; | 719 | struct inode *inode = page->mapping->host; |
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index f628c3c5e63f..e51c732b0dd9 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h | |||
@@ -1271,6 +1271,7 @@ struct page *find_data_page(struct inode *, pgoff_t, bool); | |||
1271 | struct page *get_lock_data_page(struct inode *, pgoff_t); | 1271 | struct page *get_lock_data_page(struct inode *, pgoff_t); |
1272 | struct page *get_new_data_page(struct inode *, struct page *, pgoff_t, bool); | 1272 | struct page *get_new_data_page(struct inode *, struct page *, pgoff_t, bool); |
1273 | int do_write_data_page(struct page *, struct f2fs_io_info *); | 1273 | int do_write_data_page(struct page *, struct f2fs_io_info *); |
1274 | int f2fs_fiemap(struct inode *inode, struct fiemap_extent_info *, u64, u64); | ||
1274 | 1275 | ||
1275 | /* | 1276 | /* |
1276 | * gc.c | 1277 | * gc.c |
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 78110dab5681..9c49c593d8eb 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c | |||
@@ -540,6 +540,7 @@ const struct inode_operations f2fs_file_inode_operations = { | |||
540 | .listxattr = f2fs_listxattr, | 540 | .listxattr = f2fs_listxattr, |
541 | .removexattr = generic_removexattr, | 541 | .removexattr = generic_removexattr, |
542 | #endif | 542 | #endif |
543 | .fiemap = f2fs_fiemap, | ||
543 | }; | 544 | }; |
544 | 545 | ||
545 | static void fill_zero(struct inode *inode, pgoff_t index, | 546 | static void fill_zero(struct inode *inode, pgoff_t index, |