Whamcloud - gitweb
ChangeLog, resize2fs.c:
authorTheodore Ts'o <tytso@mit.edu>
Sat, 7 Mar 1998 23:24:01 +0000 (23:24 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 7 Mar 1998 23:24:01 +0000 (23:24 +0000)
  resize2fs.c (blocks_to_move): Create the meta_bmap using the old
   filesystem, not the new filesystem.
  (get_new_block): Don't try checking the old block bitmap if the block
   we're testing is beyond the boundaries of the old filesystem.

resize/ChangeLog
resize/resize2fs.c

index 232bf70..ced0d35 100644 (file)
@@ -1,3 +1,11 @@
+Sat Mar  7 18:18:04 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
+
+       * resize2fs.c (blocks_to_move): Create the meta_bmap using the old
+               filesystem, not the new filesystem.  
+               (get_new_block): Don't try checking the old block bitmap
+               if the block we're testing is beyond the boundaries of the
+               old filesystem.
+
 Fri Feb 27 01:02:50 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
 
        * Makefile.in: Add rule to build a static version of resize2fs.
index 993f534..982e7d2 100644 (file)
@@ -489,7 +489,7 @@ static errcode_t blocks_to_move(ext2_resize_t rfs)
        if (retval)
                return retval;
 
-       retval = mark_table_blocks(fs, &meta_bmap);
+       retval = mark_table_blocks(old_fs, &meta_bmap);
        if (retval)
                return retval;
 
@@ -720,6 +720,7 @@ static blk_t get_new_block(ext2_resize_t rfs)
                    ext2fs_test_block_bitmap(rfs->reserve_blocks,
                                             rfs->new_blk) ||
                    ((rfs->alloc_state == AVOID_OLD) &&
+                    (rfs->new_blk < rfs->old_fs->super->s_blocks_count) &&
                     ext2fs_test_block_bitmap(rfs->old_fs->block_map,
                                              rfs->new_blk))) {
                        rfs->new_blk++;