]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
resize2fs.c (block_mover): If there are no blocks to move,
authorTheodore Ts'o <tytso@mit.edu>
Fri, 26 Jul 2002 05:56:22 +0000 (01:56 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 26 Jul 2002 05:56:22 +0000 (01:56 -0400)
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).

resize/ChangeLog
resize/resize2fs.c

index 04414b1bb840ee892a9caafbf7de72a488ee4024..e9bfd21f9767b561e485780f06f9cdd2f1c3d602 100644 (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,
index 42ba4706ca2f2a0d96a68397e33dfb185c3165b8..67caa402ec4e93bc33998e1b049ee592fa779056 100644 (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;
        }