resize2fs.c (block_mover): If there are no blocks to move,

release the bmap table.  This significantly speeds up
	resize2fs when shrinking or expanding a filesystem by a
	very small number of blocks (which EVMS will do).
This commit is contained in:
Theodore Ts'o 2002-07-26 01:56:22 -04:00
parent 850d05e9aa
commit cefbf4870c
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2002-07-26 Theodore Ts'o <tytso@mit.edu>
* resize2fs.c (block_mover): If there are no blocks to move,
release the bmap table. This significantly speeds up
resize2fs when shrinking or expanding a filesystem by a
very small number of blocks (which EVMS will do).
2002-05-28 <tytso@mit.edu>
* main.c (main): If the filesystem has errors or is not valid,

View File

@ -790,6 +790,10 @@ static errcode_t block_mover(ext2_resize_t rfs)
}
if (to_move == 0) {
if (rfs->bmap) {
ext2fs_free_extent_table(rfs->bmap);
rfs->bmap = 0;
}
retval = 0;
goto errout;
}