Whamcloud - gitweb
Bug fix; we were incorrectly moving the block and inode bitmaps
authorTheodore Ts'o <tytso@mit.edu>
Thu, 6 Mar 2003 17:22:52 +0000 (12:22 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 6 Mar 2003 17:22:52 +0000 (12:22 -0500)
for sparse superblock filesystems.  (Address Debian bug #174766)

resize/ChangeLog
resize/resize2fs.c

index 1e01ffd..96d18a5 100644 (file)
@@ -1,3 +1,9 @@
+2003-03-06    <tytso@mit.edu>
+
+       * 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  <tytso@mit.edu>
 
        * Release of E2fsprogs 1.32
index 7494f8f..f9543cc 100644 (file)
@@ -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;