e2fsprogs/resize
Eric Sandeen 8a6ede8b7a resize2fs: update sb journal backup if journal was moved
This was reported in Fedora, since the livecd creator does
a lot of resizing.

If we've moved the journal blocks during resize (more likely now,
due to the journal being in the middle) the backup blocks in the
superblock don't get updated, and a subsequent e2fsck will find
issues:

e2fsck 1.41.6 (30-May-2009)
Backing up journal inode block information.

Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/mnt/test/img: ***** FILE SYSTEM WAS MODIFIED *****
/mnt/test/img: 11/16000 files (0.0% non-contiguous), 17789/38400 blocks

This can be shown in a simple test:

# dd if=/dev/zero of=img bs=1 count=0 seek=3000M
# mke2fs -t ext4 -F img
# resize2fs img 150M
# e2fsck -f img

(thanks to the Fedora reporter Mads Kiilerich for the testcase!
https://bugzilla.redhat.com/show_bug.cgi?id=506105#c2)

So, update the backup journal in the superblock before resize2fs exits.

Addresses-RedHat-Bugzilla: #505339

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-18 07:47:54 -04:00
..
Makefile.in Add support for on-line resizing to resize2fs 2006-03-17 19:45:45 -05:00
Makefile.pq Many files: 1997-11-14 05:23:04 +00:00
extent.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
main.c resize2fs: fix miscellaneous memory leaks 2009-06-15 03:54:31 -04:00
online.c resize2fs: Fix data corruption bug when shrinking the inode table for ext4 2009-04-18 22:32:03 -04:00
resize2fs.8.in Update man pages to include ext4 in the synposis, instead of just "ext2/ext3" 2009-05-30 12:34:28 -04:00
resize2fs.c resize2fs: update sb journal backup if journal was moved 2009-06-18 07:47:54 -04:00
resize2fs.h resize2fs: Fix data corruption bug when shrinking the inode table for ext4 2009-04-18 22:32:03 -04:00
sim_progress.c resize2fs: Fix potential memory corruption in ext2fs_progress_init() 2008-10-01 19:42:57 -04:00
test_extent.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
test_extent.in Many files: 1997-06-17 03:52:12 +00:00