linux-stable/fs/ext4
Ye Bin a5e7686771 ext4: forbid commit inconsistent quota data when errors=remount-ro
[ Upstream commit d8b945fa47 ]

There's issue as follows When do IO fault injection test:
Quota error (device dm-3): find_block_dqentry: Quota for id 101 referenced but not present
Quota error (device dm-3): qtree_read_dquot: Can't read quota structure for id 101
Quota error (device dm-3): do_check_range: Getting block 2021161007 out of range 1-186
Quota error (device dm-3): qtree_read_dquot: Can't read quota structure for id 661

Now, ext4_write_dquot()/ext4_acquire_dquot()/ext4_release_dquot() may commit
inconsistent quota data even if process failed. This may lead to filesystem
corruption.
To ensure filesystem consistent when errors=remount-ro there is need to call
ext4_handle_error() to abort journal.

Signed-off-by: Ye Bin <yebin10@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20240119062908.3598806-1-yebin10@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-13 13:07:35 +02:00
..
.kunitconfig
Kconfig
Makefile
acl.c
acl.h ext4: apply umask if ACL support is disabled 2023-11-28 17:20:15 +00:00
balloc.c
bitmap.c
block_validity.c
crypto.c
dir.c
ext4.h quota: Properly annotate i_dquot arrays with __rcu 2024-03-26 18:19:46 -04:00
ext4_extents.h
ext4_jbd2.c Many ext4 and jbd2 cleanups and bug fixes for v6.6-rc1. 2023-08-31 15:18:15 -07:00
ext4_jbd2.h
extents.c ext4: correct the hole length returned by ext4_map_blocks() 2024-03-01 13:34:52 +01:00
extents_status.c ext4: correct the start block of counting reserved clusters 2023-11-28 17:20:15 +00:00
extents_status.h
fast_commit.c
fast_commit.h
file.c ext4: fix warning in ext4_dio_write_end_io() 2023-12-20 17:01:42 +01:00
fsmap.c
fsmap.h
fsync.c
hash.c ext4: remove redundant checks of s_encoding 2023-08-27 11:27:13 -04:00
ialloc.c Many ext4 and jbd2 cleanups and bug fixes for v6.6-rc1. 2023-08-31 15:18:15 -07:00
indirect.c
inline.c Many ext4 and jbd2 cleanups and bug fixes for v6.6-rc1. 2023-08-31 15:18:15 -07:00
inode-test.c
inode.c ext4: mark buffer new if it is unwritten to avoid stale data exposure 2023-11-28 17:20:15 +00:00
ioctl.c Many ext4 and jbd2 cleanups and bug fixes for v6.6-rc1. 2023-08-31 15:18:15 -07:00
mballoc.c ext4: add a hint for block bitmap corrupt state in mb_groups 2024-04-13 13:07:35 +02:00
mballoc.h
migrate.c
mmp.c
move_extent.c ext4: fix double-free of blocks due to wrong extents moved_len 2024-02-23 09:25:04 +01:00
namei.c Regression and bug fixes for ext4. 2023-09-17 10:33:53 -07:00
orphan.c
page-io.c
readpage.c
resize.c ext4: fix corruption during on-line resize 2024-04-03 15:28:28 +02:00
super.c ext4: forbid commit inconsistent quota data when errors=remount-ro 2024-04-13 13:07:35 +02:00
symlink.c
sysfs.c
truncate.h
verity.c
xattr.c Many ext4 and jbd2 cleanups and bug fixes for v6.6-rc1. 2023-08-31 15:18:15 -07:00
xattr.h
xattr_hurd.c
xattr_security.c
xattr_trusted.c
xattr_user.c