Commit d8b945f
ext4: forbid commit inconsistent quota data when errors=remount-ro
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>1 parent 68ee261 commit d8b945f
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6864 | 6864 | | |
6865 | 6865 | | |
6866 | 6866 | | |
| 6867 | + | |
| 6868 | + | |
| 6869 | + | |
| 6870 | + | |
6867 | 6871 | | |
6868 | 6872 | | |
6869 | 6873 | | |
| |||
6880 | 6884 | | |
6881 | 6885 | | |
6882 | 6886 | | |
| 6887 | + | |
| 6888 | + | |
| 6889 | + | |
| 6890 | + | |
6883 | 6891 | | |
6884 | 6892 | | |
6885 | 6893 | | |
| |||
6899 | 6907 | | |
6900 | 6908 | | |
6901 | 6909 | | |
| 6910 | + | |
| 6911 | + | |
| 6912 | + | |
| 6913 | + | |
6902 | 6914 | | |
6903 | 6915 | | |
6904 | 6916 | | |
| |||
0 commit comments