On Tue, Jun 12, 2018 at 11:53:23AM +0200, Jan Kara wrote: > Add a flag to ext2fs_open() which allows to open a filesystem even if > superblock is somewhat inconsistent. Use this flag from e2fsck as a last > resort to try to fix the superblok. > > Currently, the flag does nothing. We'll relax checks in ext2fs_open() > once e2fsck is able to handle corresponding corruption gracefully. > > Reviewed-by: Andreas Dilger <adilger@xxxxxxxxx> > Signed-off-by: Jan Kara <jack@xxxxxxx> Applied with the following fix-up patch. - Ted diff --git a/tests/f_crashdisk/expect.1 b/tests/f_crashdisk/expect.1 index 977a469f0..689803051 100644 --- a/tests/f_crashdisk/expect.1 +++ b/tests/f_crashdisk/expect.1 @@ -1,6 +1,10 @@ ext2fs_open2: The ext2 superblock is corrupt ../e2fsck/e2fsck: Superblock invalid, trying backup blocks... ../e2fsck/e2fsck: The ext2 superblock is corrupt while trying to open test.img +../e2fsck/e2fsck: Trying to load superblock despite errors... +ext2fs_open2: The ext2 superblock is corrupt +../e2fsck/e2fsck: Superblock invalid, trying backup blocks... +../e2fsck/e2fsck: The ext2 superblock is corrupt while trying to open test.img The superblock could not be read or does not describe a valid ext2/ext3/ext4 filesystem. If the device is valid and it really contains an ext2/ext3/ext4 diff --git a/tests/f_detect_xfs/expect b/tests/f_detect_xfs/expect index d0ece6a0c..06de99b99 100644 --- a/tests/f_detect_xfs/expect +++ b/tests/f_detect_xfs/expect @@ -2,6 +2,10 @@ ext2fs_open2: Bad magic number in super-block ../e2fsck/e2fsck: Superblock invalid, trying backup blocks... ../e2fsck/e2fsck: Bad magic number in super-block while trying to open test.img +../e2fsck/e2fsck: Trying to load superblock despite errors... +ext2fs_open2: Bad magic number in super-block +../e2fsck/e2fsck: Superblock invalid, trying backup blocks... +../e2fsck/e2fsck: Bad magic number in super-block while trying to open test.img The superblock could not be read or does not describe a valid ext2/ext3/ext4 filesystem. If the device is valid and it really contains an ext2/ext3/ext4 diff --git a/tests/f_detect_xfs/expect.nodebugfs b/tests/f_detect_xfs/expect.nodebugfs index d3b793580..1a76952ed 100644 --- a/tests/f_detect_xfs/expect.nodebugfs +++ b/tests/f_detect_xfs/expect.nodebugfs @@ -1,6 +1,8 @@ *** e2fsck ext2fs_open2: Bad magic number in super-block ../e2fsck/e2fsck: Superblock invalid, trying backup blocks... +ext2fs_open2: Bad magic number in super-block +../e2fsck/e2fsck: Superblock invalid, trying backup blocks... ../e2fsck/e2fsck: Bad magic number in super-block while trying to open test.img The superblock could not be read or does not describe a valid ext2/ext3/ext4