Whamcloud - gitweb
Use rbtree bitmaps for dumpe2fs, debugfs, and tune2fs
authorTheodore Ts'o <tytso@mit.edu>
Thu, 15 Mar 2012 20:39:56 +0000 (16:39 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 15 Mar 2012 20:39:56 +0000 (16:39 -0400)
For large file systems, using the rbtree bitmap can save a lot of
memory.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
debugfs/debugfs.c
misc/dumpe2fs.c
misc/tune2fs.c

index 04d5139..574759b 100644 (file)
@@ -89,6 +89,7 @@ static void open_filesystem(char *device, int open_flags, blk64_t superblock,
                current_fs = NULL;
                return;
        }
+       current_fs->default_bitmap_type = EXT2FS_BMAP64_RBTREE;
 
        if (catastrophic)
                com_err(device, 0, "catastrophic mode - not reading inode or group bitmaps");
index 7b7e3fe..b91c383 100644 (file)
@@ -580,6 +580,7 @@ int main (int argc, char ** argv)
                printf (_("Couldn't find valid filesystem superblock.\n"));
                exit (1);
        }
+       fs->default_bitmap_type = EXT2FS_BMAP64_RBTREE;
        if (print_badblocks) {
                list_bad_blocks(fs, 1);
        } else {
index 74a0489..e49b433 100644 (file)
@@ -1925,6 +1925,7 @@ retry_open:
                ext2fs_free(fs);
                exit(1);
        }
+       fs->default_bitmap_type = EXT2FS_BMAP64_RBTREE;
 
        if (I_flag && !io_ptr_orig) {
                /*