]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ext4: if zeroout fails fall back to splitting the extent node
authorTheodore Ts'o <tytso@mit.edu>
Fri, 13 Aug 2021 15:20:48 +0000 (11:20 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 13 Aug 2021 15:20:48 +0000 (11:20 -0400)
commit1997a1fc597dd91cd495004a76a5749b8dd23e0d
treec65a7070c80a716eaea2e98d18deb4439c3b6a3b
parent78e89124cc42a0cbaf214ecd5021ee19ca4f9294
ext4: if zeroout fails fall back to splitting the extent node

If the underlying storage device is using thin-provisioning, it's
possible for a zeroout operation to return ENOSPC.

Commit df22291ff0fd ("ext4: Retry block allocation if we have free blocks
left") added logic to retry block allocation since we might get free block
after we commit a transaction. But the ENOSPC from thin-provisioning
will confuse ext4, and lead to an infinite loop.

Since using zeroout instead of splitting the extent node is an
optimization, if it fails, we might as well fall back to splitting the
extent node.

Reported-by: yangerkun <yangerkun@huawei.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents.c