]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ext4: correct the reserved credits for extent conversion
authorZhang Yi <yi.zhang@huawei.com>
Mon, 7 Jul 2025 14:08:10 +0000 (22:08 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Aug 2025 14:49:41 +0000 (16:49 +0200)
commit2b6d39229bc783198222cddd31e2fbded93c8db7
tree3904637b1cbea170e2211c2e9d11741f5ccf379f
parent7fe61ac002623a3a7232a33e1439fbbcb4fe8f2a
ext4: correct the reserved credits for extent conversion

commit 95ad8ee45cdbc321c135a2db895d48b374ef0f87 upstream.

Now, we reserve journal credits for converting extents in only one page
to written state when the I/O operation is complete. This is
insufficient when large folio is enabled.

Fix this by reserving credits for converting up to one extent per block in
the largest 2MB folio, this calculation should only involve extents index
and leaf blocks, so it should not estimate too many credits.

Fixes: 7ac67301e82f ("ext4: enable large folio for regular file")
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Baokun Li <libaokun1@huawei.com>
Link: https://patch.msgid.link/20250707140814.542883-8-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/inode.c