e2fsprogs/resize
Theodore Ts'o 4b3038134b resize2fs: update checksums in the extent tree's relocated block
When shrinking an file system, and we need to relocate an inode, the
checksums in its extent tree must get updated to reflect its new inode
number.  When doing this, we need to do this *after* we update the
extent tree to reflect any blocks which need to be relocated due to
the file system shrink operation.

Otherwise, in the case where only an interior node of the extent tree
needs to get relocated, and none of the entries in that node need to
be adjusted, the checksum for that interior node is updated in the old
copy of that block, and then after the extent tree is updated to use
the new copy of that interior node, the extent tree is left with an
invalid checksum.

This is a relatively rare case, since it requires the following
conditions to be true:

*)  The metadata checksum feature must be enabled.
*)  An inode needs to be relocated.
*)  The inode needs to have an interior node.
*)  The block for that interior node needs to be relocated.
*)  None of blocks addressed by entries in that interior node needs
    to be relocated.

When all of these conditions are true, though, the file system is left
with corrupted with bad checksum for the extent tree block.

Addresses-Launchpad-Bug: 1798562

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reported-by: Jean-Baptiste Lallement <jean-baptiste.lallement@ubuntu.com>
2018-10-20 10:11:06 -04:00
..
Android.bp AOSP: ODR violation in resize2fs during host build 2018-10-12 22:48:04 -04:00
extent.c Fix typos in code comments and developer docs 2017-10-15 23:00:11 -04:00
main.c resize2fs: remove bigalloc warning for online resizing 2018-02-27 01:27:10 -05:00
Makefile.in build: use MKDIR_P instead of MKINSTALLDIRS 2018-08-11 15:29:48 -04:00
online.c resize: remove calculation of unused variable 2018-06-24 21:27:42 -04:00
resize2fs.8.in resize2fs: Remove the real kilobytes rant from man page 2018-07-22 15:03:03 -04:00
resize2fs.c resize2fs: update checksums in the extent tree's relocated block 2018-10-20 10:11:06 -04:00
resize2fs.h Fix typos in code comments and developer docs 2017-10-15 23:00:11 -04:00
resource_track.c resize2fs: add resource tracking as a debug option 2013-01-03 09:03:53 -05:00
sim_progress.c Fix typos in code comments and developer docs 2017-10-15 23:00:11 -04:00
test_extent.c Fix typos in code comments and developer docs 2017-10-15 23:00:11 -04:00
test_extent.in Many files: 1997-06-17 03:52:12 +00:00
test-resize resize2fs: check in test-resize script 2013-01-16 14:09:21 -05:00