xfs: create a new helper to return a file's allocation unit
authorDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:54:10 +0000 (14:54 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:54:10 +0000 (14:54 -0700)
commitee20808d848c87a51e176706d81b95a21747d6cf
treeadd477fbbb621a637f4b3cd163d6b68ff40dfc64
parent00acb28d96746f78389f23a7b5309a917b45c12f
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>
fs/xfs/xfs_file.c
fs/xfs/xfs_file.h
fs/xfs/xfs_inode.c
fs/xfs/xfs_inode.h