]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit - resize/resize2fs.c
resize2fs: exit fix_sb_journal_backup early for external journal
authorEric Sandeen <sandeen@redhat.com>
Mon, 9 Nov 2009 20:57:04 +0000 (14:57 -0600)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 13 Nov 2009 00:46:56 +0000 (19:46 -0500)
commitd93d5bbf605f81eb13fa71a55dfbed06f88fe930
tree805a7f24d58d4f016879f42fc89a44bc8a7e6a2c
parent06ef971be505678ee462ae1844204ed24f14aedc
resize2fs: exit fix_sb_journal_backup early for external journal

Resizing a filesystem with an external journal fails when it tries
to read inode 0:

# touch testfs
# truncate testfs 1342177280
# touch testjournal
# truncate testjournal 134217728
# mke2fs -O journal_dev testjournal
# losetup /dev/loop0 testjournal
# mkfs.ext4 -J device=/dev/loop0 testfs 127680
# resize2fs testfs
resize2fs 1.41.9 (22-Aug-2009)
Resizing the filesystem on testfs to 327680 (4k) blocks.
resize2fs: Illegal inode number while trying to resize testfs
Please run 'e2fsck -fy testfs' to fix the filesystem
after the aborted resize operation.

I think the right, simple thing to do is just bail out early
for an external journal here, as there are no backup blocks
to update.

Reported-by: mjevans1983@gmail.com
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
resize/resize2fs.c