linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] e2freefrag: use 64-bit rbtree bitmaps
@ 2012-10-05  3:44 Theodore Ts'o
  2012-10-05  3:44 ` [PATCH 2/2] libext2fs: optimize rb_test_bit Theodore Ts'o
  0 siblings, 1 reply; 12+ messages in thread
From: Theodore Ts'o @ 2012-10-05  3:44 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Theodore Ts'o

Enable the use of 64-bit bitmaps, so e2freefrag will work on file
systems with the 64-bit feature enabled.  In addition, enable the
rbtree-based bitmaps, which significantly saves the amount of memory
required (from 97 megs to 1.7 megs for an empty 3T file system) at the
cost of additional CPU overhead (but we will claw back some of the
additional CPU overhead in the next commit).

Addresses-Google-Bug: 7269948

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
 misc/e2freefrag.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/misc/e2freefrag.c b/misc/e2freefrag.c
index 30af43e..58f1ff5 100644
--- a/misc/e2freefrag.c
+++ b/misc/e2freefrag.c
@@ -249,13 +249,14 @@ static void collect_info(ext2_filsys fs, struct chunk_info *chunk_info, FILE *f)
 static void open_device(char *device_name, ext2_filsys *fs)
 {
 	int retval;
-	int flag = EXT2_FLAG_FORCE;
+	int flag = EXT2_FLAG_FORCE | EXT2_FLAG_64BITS;
 
 	retval = ext2fs_open(device_name, flag, 0, 0, unix_io_manager, fs);
 	if (retval) {
 		com_err(device_name, retval, "while opening filesystem");
 		exit(1);
 	}
+	(*fs)->default_bitmap_type = EXT2FS_BMAP64_RBTREE;
 }
 #endif
 
-- 
1.7.12.rc0.22.gcdd159b


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-10-10  8:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-05  3:44 [PATCH 1/2] e2freefrag: use 64-bit rbtree bitmaps Theodore Ts'o
2012-10-05  3:44 ` [PATCH 2/2] libext2fs: optimize rb_test_bit Theodore Ts'o
2012-10-06  2:04   ` [PATCH 1/3] libext2fs: remove pointless indirection in rbtree bitmaps Theodore Ts'o
2012-10-06  2:04     ` [PATCH 2/3] libext2fs: further optimize rb_test_bit Theodore Ts'o
2012-10-06  2:04     ` [PATCH 3/3] Fix makefiles to compile e2freefrag with profiling Theodore Ts'o
2012-10-06 15:54       ` Eric Sandeen
2012-10-06 15:52     ` [PATCH 1/3] libext2fs: remove pointless indirection in rbtree bitmaps Eric Sandeen
2012-10-08  8:08   ` [PATCH 2/2] libext2fs: optimize rb_test_bit Lukáš Czerner
2012-10-08  8:25     ` Lukáš Czerner
2012-10-08 18:17       ` Theodore Ts'o
2012-10-09  7:18         ` Lukáš Czerner
2012-10-09 19:55           ` Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).