From 424cb7b62aa417db2eaec79cfaec7433b31f8726 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Thu, 6 Mar 2003 12:22:52 -0500 Subject: [PATCH] Bug fix; we were incorrectly moving the block and inode bitmaps for sparse superblock filesystems. (Address Debian bug #174766) --- resize/ChangeLog | 6 ++++++ resize/resize2fs.c | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/resize/ChangeLog b/resize/ChangeLog index 1e01ffd..96d18a5 100644 --- a/resize/ChangeLog +++ b/resize/ChangeLog @@ -1,3 +1,9 @@ +2003-03-06 + + * resize2fs.c (blocks_to_move): Bug fix; we were incorrectly + moving the block and inode bitmaps for sparse superblock + filesystems. (Address Debian bug #174766) + 2002-11-09 Theodore Ts'o * Release of E2fsprogs 1.32 diff --git a/resize/resize2fs.c b/resize/resize2fs.c index 7494f8f..f9543cc 100644 --- a/resize/resize2fs.c +++ b/resize/resize2fs.c @@ -656,9 +656,12 @@ static errcode_t blocks_to_move(ext2_resize_t rfs) if (!(fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) || (meta_bg < fs->super->s_first_meta_bg)) { - for (blk = group_blk+1; - blk < group_blk + 1 + new_blocks; blk++) - mark_fs_metablock(rfs, meta_bmap, i, blk); + if (has_super) { + for (blk = group_blk+1; + blk < group_blk + 1 + new_blocks; blk++) + mark_fs_metablock(rfs, meta_bmap, + i, blk); + } } else { if (has_super) has_super = 1; -- 1.8.3.1