summaryrefslogtreecommitdiff
path: root/include/linux/fiemap.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-05-23 09:30:13 +0200
committerTheodore Ts'o <tytso@mit.edu>2020-06-03 23:16:55 -0400
commitcddf8a2c4a8286ae60fc866eab59c8bc524e93a0 (patch)
treec3f18f1243c85c5f3d67aa2d4f7afc44f3feccb8 /include/linux/fiemap.h
parent2732881894714f545ffac42dad7ba7730069874d (diff)
fs: move fiemap range validation into the file systems instances
Replace fiemap_check_flags with a fiemap_prep helper that also takes the inode and mapped range, and performs the sanity check and truncation previously done in fiemap_check_range. This way the validation is inside the file system itself and thus properly works for the stacked overlayfs case as well. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Link: https://lore.kernel.org/r/20200523073016.2944131-7-hch@lst.de Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'include/linux/fiemap.h')
-rw-r--r--include/linux/fiemap.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/fiemap.h b/include/linux/fiemap.h
index 240d4f7d9116..4e624c466583 100644
--- a/include/linux/fiemap.h
+++ b/include/linux/fiemap.h
@@ -13,9 +13,10 @@ struct fiemap_extent_info {
fiemap_extent array */
};
+int fiemap_prep(struct inode *inode, struct fiemap_extent_info *fieinfo,
+ u64 start, u64 *len, u32 supported_flags);
int fiemap_fill_next_extent(struct fiemap_extent_info *info, u64 logical,
u64 phys, u64 len, u32 flags);
-int fiemap_check_flags(struct fiemap_extent_info *fieinfo, u32 fs_flags);
int generic_block_fiemap(struct inode *inode,
struct fiemap_extent_info *fieinfo, u64 start, u64 len,