summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_file.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-04-16 00:54:10 +0300
committerDarrick J. Wong <djwong@kernel.org>2024-04-16 00:54:10 +0300
commitee20808d848c87a51e176706d81b95a21747d6cf (patch)
treeadd477fbbb621a637f4b3cd163d6b68ff40dfc64 /fs/xfs/xfs_file.h
parent00acb28d96746f78389f23a7b5309a917b45c12f (diff)
downloadlinux-ee20808d848c87a51e176706d81b95a21747d6cf.tar.xz
xfs: create a new helper to return a file's allocation unit
Create a new helper function to calculate the fundamental allocation unit (i.e. the smallest unit of space we can allocate) of a file. Things are going to get hairy with range-exchange on the realtime device, so prepare for this now. Remove the static attribute from xfs_is_falloc_aligned since the next patch will need it. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_file.h')
-rw-r--r--fs/xfs/xfs_file.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/xfs_file.h b/fs/xfs/xfs_file.h
index 7d39e3eca56d..2ad91f755caf 100644
--- a/fs/xfs/xfs_file.h
+++ b/fs/xfs/xfs_file.h
@@ -9,4 +9,7 @@
extern const struct file_operations xfs_file_operations;
extern const struct file_operations xfs_dir_file_operations;
+bool xfs_is_falloc_aligned(struct xfs_inode *ip, loff_t pos,
+ long long int len);
+
#endif /* __XFS_FILE_H__ */