]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfs: create a new helper to return a file's allocation unit
authorDarrick J. Wong <djwong@kernel.org>
Wed, 11 Jun 2025 21:01:17 +0000 (14:01 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:19 +0000 (11:07 +0100)
commit8cd7bf062276b67aca798e948e3120566265d893
treef557f3076e0546287367659d6ada8e572fc69480
parent45cdb488dcf56e72a83a8a91dd328275f032fbfe
xfs: create a new helper to return a file's allocation unit

[ Upstream commit ee20808d848c87a51e176706d81b95a21747d6cf ]

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>
Signed-off-by: Leah Rumancik <leah.rumancik@gmail.com>
Acked-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/xfs/xfs_file.c
fs/xfs/xfs_file.h
fs/xfs/xfs_inode.c
fs/xfs/xfs_inode.h