]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: make xfs_bmapi_convert_delalloc() to allocate the target offset
authorZhang Yi <yi.zhang@huawei.com>
Mon, 29 Jul 2024 23:22:54 +0000 (16:22 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:01:04 +0000 (17:01 -0700)
commit44e4bdc654d69a24a817d1df5706673a94c5ba5f
treee5003cb5bad2e7669d4762bb63215dfca7ec6047
parent7cd511c5e8af6530937f4f4f5a5c27e36bf21acf
xfs: make xfs_bmapi_convert_delalloc() to allocate the target offset

Source kernel commit: 2e08371a83f1c06fd85eea8cd37c87a224cc4cc4

Since xfs_bmapi_convert_delalloc() only attempts to allocate the entire
delalloc extent and require multiple invocations to allocate the target
offset. So xfs_convert_blocks() add a loop to do this job and we call it
in the write back path, but xfs_convert_blocks() isn't a common helper.
Let's do it in xfs_bmapi_convert_delalloc() and drop
xfs_convert_blocks(), preparing for the post EOF delalloc blocks
converting in the buffered write begin path.

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
libxfs/libxfs_priv.h
libxfs/xfs_bmap.c