exfat: Add fiemap support
Subsystems (2)
cover exfat: Add fiemap support
This simple patch adds support for fiemap to exfat.
Pavel Reichl (1):
exfat: Add fiemap support
fs/exfat/exfat_fs.h | 3 +++ fs/exfat/file.c | 1 + fs/exfat/inode.c | 8 ++++++++ 3 files changed, 12 insertions(+)
Signature · 1 line
2.31.1
PATCH 1/1 exfat: Add fiemap support
Signed-off-by Pavel Reichl <[email protected]>
--- fs/exfat/exfat_fs.h | 3 +++ fs/exfat/file.c | 1 + fs/exfat/inode.c | 8 ++++++++ 3 files changed, 12 insertions(+)
fs/exfat/exfat_fs.h +3 -0
@@ -428,6 +428,9 @@ long exfat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);long exfat_compat_ioctl (struct file *filp,unsigned int cmd,unsigned long arg); +extern int exfat_fiemap (struct inode *inode,struct fiemap_extent_info *fieinfo, +u64 start,u64 len); +/* namei.c */ extern const struct dentry_operations exfat_dentry_ops;extern const struct dentry_operations exfat_utf8_dentry_ops;
fs/exfat/file.c +1 -0
@@ -432,4 +432,5 @@ const struct file_operations exfat_file_operations = {const struct inode_operations exfat_file_inode_operations = { .setattr = exfat_setattr, .getattr = exfat_getattr, + .fiemap = exfat_fiemap, };
fs/exfat/inode.c +8 -0
@@ -13,6 +13,7 @@#include <linux/uio.h> #include <linux/random.h> #include <linux/iversion.h> +#include <linux/fiemap.h> #include "exfat_raw.h" #include "exfat_fs.h"
@@ -358,6 +359,13 @@ static int exfat_get_block(struct inode *inode, sector_t iblock,return err; } +int exfat_fiemap (struct inode *inode,struct fiemap_extent_info *fieinfo, +u64 start,u64 len) +{ +return generic_block_fiemap (inode, fieinfo, start, len, + exfat_get_block); +} +static int exfat_readpage (struct file *file,struct page *page) {return mpage_readpage (page, exfat_get_block);
Signature · 1 line
2.31.1
Please don't add new callers of generic_block_fiemap, as that function should go away ASAP. Please use iomap_fiemap instead.