From 24dea55494ea753dbc8e4d965345cd2a7144d4fd Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Thu, 15 Mar 2012 16:39:56 -0400 Subject: [PATCH] Use rbtree bitmaps for dumpe2fs, debugfs, and tune2fs For large file systems, using the rbtree bitmap can save a lot of memory. Signed-off-by: "Theodore Ts'o" --- debugfs/debugfs.c | 1 + misc/dumpe2fs.c | 1 + misc/tune2fs.c | 1 + 3 files changed, 3 insertions(+) diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c index 04d5139..574759b 100644 --- a/debugfs/debugfs.c +++ b/debugfs/debugfs.c @@ -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"); diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c index 7b7e3fe..b91c383 100644 --- a/misc/dumpe2fs.c +++ b/misc/dumpe2fs.c @@ -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 { diff --git a/misc/tune2fs.c b/misc/tune2fs.c index 74a0489..e49b433 100644 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@ -1925,6 +1925,7 @@ retry_open: ext2fs_free(fs); exit(1); } + fs->default_bitmap_type = EXT2FS_BMAP64_RBTREE; if (I_flag && !io_ptr_orig) { /* -- 1.8.3.1