summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorZhang Yi <yi.zhang@huawei.com>2021-09-08 20:08:50 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-02-23 11:59:57 +0100
commit8583d2ea90fe4f41af865225d5be326499d6cc6f (patch)
tree75161fdbd9de245af908619212f4610f33310341 /kernel
parentd57fcf0d9195543efc392e147209e150dcbabb5b (diff)
ext4: prevent partial update of the extent blocks
commit 0f2f87d51aebcf71a709b52f661d681594c7dffa upstream. In the most error path of current extents updating operations are not roll back partial updates properly when some bad things happens(.e.g in ext4_ext_insert_extent()). So we may get an inconsistent extents tree if journal has been aborted due to IO error, which may probability lead to BUGON later when we accessing these extent entries in errors=continue mode. This patch drop extent buffer's verify flag before updatng the contents in ext4_ext_get_access(), and reset it after updating in __ext4_ext_dirty(). After this patch we could force to check the extent buffer if extents tree updating was break off, make sure the extents are consistent. Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Theodore Ts'o <tytso@mit.edu> Link: https://lore.kernel.org/r/20210908120850.4012324-4-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Leah Rumancik <leah.rumancik@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions