From bce49798f7f4380dff5693bc8308019b3cf8de25 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sat, 7 Mar 1998 23:24:01 +0000 Subject: [PATCH] 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. --- resize/ChangeLog | 8 ++++++++ resize/resize2fs.c | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) 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 + + * 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 * 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 @@ 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++; -- 1.8.3.1