]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfs: make xfs_bmapi_convert_delalloc() to allocate the target offset
authorZhang Yi <yi.zhang@huawei.com>
Wed, 30 Apr 2025 21:26:57 +0000 (14:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 May 2025 07:41:38 +0000 (09:41 +0200)
commit9ae4afcb9f9cd018efcea77e5f2f1603e3593a23
treee11fba33ae25c6229092c5459470eacf833f6b95
parentb4dbf9056481a506a4c72f9f05929b8648488176
xfs: make xfs_bmapi_convert_delalloc() to allocate the target offset

[ Upstream 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>
Signed-off-by: Leah Rumancik <leah.rumancik@gmail.com>
Acked-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/libxfs/xfs_bmap.c
fs/xfs/xfs_aops.c