]> git.baikalelectronics.ru Git - kernel.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>
Tue, 31 Aug 2021 03:36:50 +0000 (23:36 -0400)
commit87cb98d718b683d4e36ec700329a6305b4cc8c5c
treef1edca98a6d0fba76520db7a234e73edd8484836
parentf145bfc0f789c505831548025b373a14fd5a4560
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 b4a23dec335e ("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