Commit 3e8a584
ext4: prevent partial update of the extents path
In ext4_ext_rm_idx() and ext4_ext_correct_indexes(), there is no proper
rollback of already executed updates when updating a level of the extents
path fails, so we may get an inconsistent extents tree, which may trigger
some bad things in errors=continue mode.
Hence clear the verified bit of modified extents buffers if the tree fails
to be updated in ext4_ext_rm_idx() or ext4_ext_correct_indexes(), which
forces the extents buffers to be checked in ext4_valid_extent_entries(),
ensuring that the extents tree is consistent.
Signed-off-by: zhanchengbin <zhanchengbin1@huawei.com>
Link: https://lore.kernel.org/r/20230213080514.535568-3-zhanchengbin1@huawei.com/
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Tested-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Link: https://patch.msgid.link/20240822023545.1994557-3-libaokun@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>1 parent edfa71d commit 3e8a584
1 file changed
+27
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1749 | 1749 | | |
1750 | 1750 | | |
1751 | 1751 | | |
1752 | | - | |
| 1752 | + | |
1753 | 1753 | | |
1754 | 1754 | | |
1755 | 1755 | | |
1756 | | - | |
| 1756 | + | |
1757 | 1757 | | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
1758 | 1769 | | |
1759 | 1770 | | |
1760 | 1771 | | |
| |||
2312 | 2323 | | |
2313 | 2324 | | |
2314 | 2325 | | |
2315 | | - | |
| 2326 | + | |
2316 | 2327 | | |
2317 | 2328 | | |
2318 | 2329 | | |
2319 | | - | |
| 2330 | + | |
2320 | 2331 | | |
| 2332 | + | |
| 2333 | + | |
| 2334 | + | |
| 2335 | + | |
| 2336 | + | |
| 2337 | + | |
| 2338 | + | |
| 2339 | + | |
| 2340 | + | |
| 2341 | + | |
| 2342 | + | |
| 2343 | + | |
2321 | 2344 | | |
2322 | 2345 | | |
2323 | 2346 | | |
| |||
0 commit comments