diff options
author | Jose R. Santos <jrs@us.ibm.com> | 2007-08-13 23:33:03 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2007-11-03 20:13:16 -0400 |
commit | 88b34b1f87c2d7c3dfc9be7ff6e5d916f06d960a (patch) | |
tree | f45ad7a21f541c2328e1d7a29a60fc5a9cd53694 /e2fsck/super.c | |
parent | cf0eeec0159b1af67fad9bccce220402cf08dff0 (diff) | |
download | e2fsprogs-88b34b1f87c2d7c3dfc9be7ff6e5d916f06d960a.tar.gz |
Relax group descriptor checking for FLEX_BG
The FLEX_BG feature allows the inode table, block bitmap, and inode
bitmaps to be located anywhere in the filesystem. Update e2fsck and
libext2fs's checking code to recognize this.
Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
--
e2fsck/super.c | 14 ++++++++++++--
lib/ext2fs/check_desc.c | 15 +++++++++++++--
2 files changed, 25 insertions(+), 4 deletions(-)
Diffstat (limited to 'e2fsck/super.c')
-rw-r--r-- | e2fsck/super.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/e2fsck/super.c b/e2fsck/super.c index e3943cbe..dbd7b1ac 100644 --- a/e2fsck/super.c +++ b/e2fsck/super.c @@ -575,13 +575,17 @@ void check_super_block(e2fsck_t ctx) /* * Verify the group descriptors.... */ - first_block = sb->s_first_data_block; + first_block = sb->s_first_data_block; + last_block = sb->s_blocks_count-1; for (i = 0, gd=fs->group_desc; i < fs->group_desc_count; i++, gd++) { pctx.group = i; - first_block = ext2fs_group_first_block(fs, i); - last_block = ext2fs_group_last_block(fs, i); + if (!EXT2_HAS_INCOMPAT_FEATURE(fs->super, + EXT4_FEATURE_INCOMPAT_FLEX_BG)) { + first_block = ext2fs_group_first_block(fs, i); + last_block = ext2fs_group_last_block(fs, i); + } if ((gd->bg_block_bitmap < first_block) || (gd->bg_block_bitmap > last_block)) { |