Commit 9ab70134 authored by Jaegeuk Kim's avatar Jaegeuk Kim

f2fs: support f2fs_fiemap

This patch links f2fs_fiemap with generic function with get_block.
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 86928f98
...@@ -708,6 +708,12 @@ static int get_data_block(struct inode *inode, sector_t iblock, ...@@ -708,6 +708,12 @@ static int get_data_block(struct inode *inode, sector_t iblock,
return err; return err;
} }
int f2fs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
u64 start, u64 len)
{
return generic_block_fiemap(inode, fieinfo, start, len, get_data_block);
}
static int f2fs_read_data_page(struct file *file, struct page *page) static int f2fs_read_data_page(struct file *file, struct page *page)
{ {
struct inode *inode = page->mapping->host; struct inode *inode = page->mapping->host;
......
...@@ -1271,6 +1271,7 @@ struct page *find_data_page(struct inode *, pgoff_t, bool); ...@@ -1271,6 +1271,7 @@ struct page *find_data_page(struct inode *, pgoff_t, bool);
struct page *get_lock_data_page(struct inode *, pgoff_t); struct page *get_lock_data_page(struct inode *, pgoff_t);
struct page *get_new_data_page(struct inode *, struct page *, pgoff_t, bool); struct page *get_new_data_page(struct inode *, struct page *, pgoff_t, bool);
int do_write_data_page(struct page *, struct f2fs_io_info *); int do_write_data_page(struct page *, struct f2fs_io_info *);
int f2fs_fiemap(struct inode *inode, struct fiemap_extent_info *, u64, u64);
/* /*
* gc.c * gc.c
......
...@@ -540,6 +540,7 @@ const struct inode_operations f2fs_file_inode_operations = { ...@@ -540,6 +540,7 @@ const struct inode_operations f2fs_file_inode_operations = {
.listxattr = f2fs_listxattr, .listxattr = f2fs_listxattr,
.removexattr = generic_removexattr, .removexattr = generic_removexattr,
#endif #endif
.fiemap = f2fs_fiemap,
}; };
static void fill_zero(struct inode *inode, pgoff_t index, static void fill_zero(struct inode *inode, pgoff_t index,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment