Hi,
This patch speeds up e2fsck on Ext3 significantly using a technique
called Metaclustering. Metaclustering is being discussed on LKML in some
other threads, here is the latest patch against the 2.6.23.13 stable
kernel, any help in testing and evaluating this will be greatly
appreciated! While I'd direct anyone interested in details of
metaclustering to other LKML threads discussing it, I've enclosed a brief
description here:
Metaclustering refers to storing indirect blocks in clusters on a
per-group basis instead of spreading them out along with the data blocks.
This makes e2fsck faster since it can now read and verify all indirect
blocks without much seeks. However, done naively it can affect IO
performance, so we have built in some optimizations to prevent that from
happening. Finally, the benefit in fsck performance is noticeable only
when indirect block reads are the bottleneck which is not always the case,
but quite frequently is, in the case of moderate to large disks with lot
of data on them. However, when indirect block reads are not the
bottleneck, e2fsck is generally quite fast anyway to warrant any
performance improvements.
Thanks!
Abhishek
Signed-off-by: Abhishek Rai <abhishekrai@google.com>
diff -rupdN linux-2.6.23.13-clean/fs/ext3/balloc.c linux-2.6.23.13-ext3mc/fs/ext3/balloc.c
--- linux-2.6.23.13-clean/fs/ext3/balloc.c 2008-01-09 12:18:17.000000000 -0500
+++ linux-2.6.23.13-ext3mc/fs/ext3/balloc.c 2008-01-12 23:59:36.000000000 -0500
@@ -33,6 +33,29 @@
* super block. Each descriptor contains the number of the bitmap block and
* the free blocks count in the block. The descriptors are loaded in memory
* when a file system is mounted (see ext3_fill_super).
+ *
+ * A note on ext3 metaclustering:
+ *
+ * Start of End of
+ * block group block group
+ * ________________________________________________________________
+ * | NON-MC REGION | MC REGION |
+ * | |Overflow |
+ * |Data blocks ...