diff options
author | Darrick J. Wong <djwong@kernel.org> | 2024-04-16 00:54:10 +0300 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2024-04-16 00:54:10 +0300 |
commit | ee20808d848c87a51e176706d81b95a21747d6cf (patch) | |
tree | add477fbbb621a637f4b3cd163d6b68ff40dfc64 /fs/xfs/xfs_file.h | |
parent | 00acb28d96746f78389f23a7b5309a917b45c12f (diff) | |
download | linux-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.h | 3 |
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__ */ |