ChangeLog, resize2fs.c:
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.
diff --git a/resize/ChangeLog b/resize/ChangeLog
index 232bf70..ced0d35 100644
--- a/resize/ChangeLog
+++ b/resize/ChangeLog
@@ -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.
diff --git a/resize/resize2fs.c b/resize/resize2fs.c
index 993f534..982e7d2 100644
--- a/resize/resize2fs.c
+++ b/resize/resize2fs.c
@@ -489,7 +489,7 @@
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 @@
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++;