===================================================================
--- linux-2.6.5-7.201.orig/fs/ext3/mballoc.c 2005-10-13 19:40:57.851699336 +0400
+++ linux-2.6.5-7.201/fs/ext3/mballoc.c 2005-10-14 09:02:36.000000000 +0400
-@@ -0,0 +1,1865 @@
+@@ -0,0 +1,1868 @@
+/*
+ * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com
+ * Written by Alex Tomas <alex@clusterfs.com>
+ * with 'ext3_mb_aggressive' set the allocator runs consistency checks over
+ * structures. these checks slow things down a lot
+ */
-+long ext3_mb_aggressive = 1;
++long ext3_mb_aggressive = 0;
+
+
+/*
+ if (!test_opt(e3b->bd_sb, MBALLOC))
+ return;
+
++ if (unlikely(!ext3_mb_aggressive))
++ return;
++
+ while (order > 1) {
+ buddy = mb_find_buddy(e3b, order, &max);
+ J_ASSERT(buddy);
+ ext3_error(sb, "ext3_new_block",
+ "Allocating block in system zone - "
+ "block = %u", block);
-+ if (ext3_mb_aggressive) {
++ if (unlikely(ext3_mb_aggressive)) {
+ for (i = 0; i < ac.ac_b_ex.fe_len; i++)
+ J_ASSERT(!mb_test_bit(ac.ac_b_ex.fe_start + i,
+ bitmap_bh->b_data));
+ INIT_LIST_HEAD(&EXT3_SB(sb)->s_committed_transaction);
+ set_opt(EXT3_SB(sb)->s_mount_opt, MBALLOC);
+
++ spin_lock_init(&EXT3_SB(sb)->s_bal_lock);
+ if (ext3_mb_stats) {
-+ spin_lock_init(&EXT3_SB(sb)->s_bal_lock);
+ printk("EXT3-fs: mballoc enabled (stats)\n");
+ } else {
+ printk("EXT3-fs: mballoc enabled\n");
+ if (err)
+ goto error_return;
+
-+ if (ext3_mb_aggressive) {
++ if (unlikely(ext3_mb_aggressive)) {
+ int i;
+ for (i = 0; i < count; i++)
+ J_ASSERT(mb_test_bit(bit + i, bitmap_bh->b_data));
===================================================================
--- linux-2.6.9.orig/fs/ext3/mballoc.c 2005-10-13 19:40:57.851699336 +0400
+++ linux-2.6.9/fs/ext3/mballoc.c 2005-10-14 09:10:31.000000000 +0400
-@@ -0,0 +1,1862 @@
+@@ -0,0 +1,1865 @@
+/*
+ * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com
+ * Written by Alex Tomas <alex@clusterfs.com>
+ * with 'ext3_mb_aggressive' set the allocator runs consistency checks over
+ * structures. these checks slow things down a lot
+ */
-+long ext3_mb_aggressive = 1;
++long ext3_mb_aggressive = 0;
+
+
+/*
+ if (!test_opt(e3b->bd_sb, MBALLOC))
+ return;
+
++ if (unlikely(!ext3_mb_aggressive))
++ return;
++
+ while (order > 1) {
+ buddy = mb_find_buddy(e3b, order, &max);
+ J_ASSERT(buddy);
+ ext3_error(sb, "ext3_new_block",
+ "Allocating block in system zone - "
+ "block = %u", block);
-+ if (ext3_mb_aggressive) {
++ if (unlikely(ext3_mb_aggressive)) {
+ for (i = 0; i < ac.ac_b_ex.fe_len; i++)
+ J_ASSERT(!mb_test_bit(ac.ac_b_ex.fe_start + i,
+ bitmap_bh->b_data));
+ INIT_LIST_HEAD(&EXT3_SB(sb)->s_committed_transaction);
+ set_opt(EXT3_SB(sb)->s_mount_opt, MBALLOC);
+
++ spin_lock_init(&EXT3_SB(sb)->s_bal_lock);
+ if (ext3_mb_stats) {
-+ spin_lock_init(&EXT3_SB(sb)->s_bal_lock);
+ printk("EXT3-fs: mballoc enabled (stats)\n");
+ } else {
+ printk("EXT3-fs: mballoc enabled\n");
+ if (err)
+ goto error_return;
+
-+ if (ext3_mb_aggressive) {
++ if (unlikely(ext3_mb_aggressive)) {
+ int i;
+ for (i = 0; i < count; i++)
+ J_ASSERT(mb_test_bit(bit + i, bitmap_bh->b_data));
===================================================================
--- linux-2.6.5-7.201.orig/fs/ext3/mballoc.c 2005-10-13 19:40:57.851699336 +0400
+++ linux-2.6.5-7.201/fs/ext3/mballoc.c 2005-10-14 09:02:36.000000000 +0400
-@@ -0,0 +1,1865 @@
+@@ -0,0 +1,1868 @@
+/*
+ * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com
+ * Written by Alex Tomas <alex@clusterfs.com>
+ * with 'ext3_mb_aggressive' set the allocator runs consistency checks over
+ * structures. these checks slow things down a lot
+ */
-+long ext3_mb_aggressive = 1;
++long ext3_mb_aggressive = 0;
+
+
+/*
+ if (!test_opt(e3b->bd_sb, MBALLOC))
+ return;
+
++ if (unlikely(!ext3_mb_aggressive))
++ return;
++
+ while (order > 1) {
+ buddy = mb_find_buddy(e3b, order, &max);
+ J_ASSERT(buddy);
+ ext3_error(sb, "ext3_new_block",
+ "Allocating block in system zone - "
+ "block = %u", block);
-+ if (ext3_mb_aggressive) {
++ if (unlikely(ext3_mb_aggressive)) {
+ for (i = 0; i < ac.ac_b_ex.fe_len; i++)
+ J_ASSERT(!mb_test_bit(ac.ac_b_ex.fe_start + i,
+ bitmap_bh->b_data));
+ INIT_LIST_HEAD(&EXT3_SB(sb)->s_committed_transaction);
+ set_opt(EXT3_SB(sb)->s_mount_opt, MBALLOC);
+
++ spin_lock_init(&EXT3_SB(sb)->s_bal_lock);
+ if (ext3_mb_stats) {
-+ spin_lock_init(&EXT3_SB(sb)->s_bal_lock);
+ printk("EXT3-fs: mballoc enabled (stats)\n");
+ } else {
+ printk("EXT3-fs: mballoc enabled\n");
+ if (err)
+ goto error_return;
+
-+ if (ext3_mb_aggressive) {
++ if (unlikely(ext3_mb_aggressive)) {
+ int i;
+ for (i = 0; i < count; i++)
+ J_ASSERT(mb_test_bit(bit + i, bitmap_bh->b_data));
===================================================================
--- linux-2.6.9.orig/fs/ext3/mballoc.c 2005-10-13 19:40:57.851699336 +0400
+++ linux-2.6.9/fs/ext3/mballoc.c 2005-10-14 09:10:31.000000000 +0400
-@@ -0,0 +1,1862 @@
+@@ -0,0 +1,1865 @@
+/*
+ * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com
+ * Written by Alex Tomas <alex@clusterfs.com>
+ * with 'ext3_mb_aggressive' set the allocator runs consistency checks over
+ * structures. these checks slow things down a lot
+ */
-+long ext3_mb_aggressive = 1;
++long ext3_mb_aggressive = 0;
+
+
+/*
+ if (!test_opt(e3b->bd_sb, MBALLOC))
+ return;
+
++ if (unlikely(!ext3_mb_aggressive))
++ return;
++
+ while (order > 1) {
+ buddy = mb_find_buddy(e3b, order, &max);
+ J_ASSERT(buddy);
+ ext3_error(sb, "ext3_new_block",
+ "Allocating block in system zone - "
+ "block = %u", block);
-+ if (ext3_mb_aggressive) {
++ if (unlikely(ext3_mb_aggressive)) {
+ for (i = 0; i < ac.ac_b_ex.fe_len; i++)
+ J_ASSERT(!mb_test_bit(ac.ac_b_ex.fe_start + i,
+ bitmap_bh->b_data));
+ INIT_LIST_HEAD(&EXT3_SB(sb)->s_committed_transaction);
+ set_opt(EXT3_SB(sb)->s_mount_opt, MBALLOC);
+
++ spin_lock_init(&EXT3_SB(sb)->s_bal_lock);
+ if (ext3_mb_stats) {
-+ spin_lock_init(&EXT3_SB(sb)->s_bal_lock);
+ printk("EXT3-fs: mballoc enabled (stats)\n");
+ } else {
+ printk("EXT3-fs: mballoc enabled\n");
+ if (err)
+ goto error_return;
+
-+ if (ext3_mb_aggressive) {
++ if (unlikely(ext3_mb_aggressive)) {
+ int i;
+ for (i = 0; i < count; i++)
+ J_ASSERT(mb_test_bit(bit + i, bitmap_bh->b_data));