Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5a58c3ef22d6e5b84ff651a7d27ae2cbea9f9870
Commit:     5a58c3ef22d6e5b84ff651a7d27ae2cbea9f9870
Parent:     a46043e08f300982c51df317e2f8fb919dedadcd
Author:     Jan Kara <[EMAIL PROTECTED]>
AuthorDate: Tue Nov 13 19:59:33 2007 +0100
Committer:  Mark Fasheh <[EMAIL PROTECTED]>
CommitDate: Tue Nov 27 16:47:02 2007 -0800

    [PATCH] ocfs2: Remove expensive bitmap scanning
    
    Enable expensive bitmap scanning only if DEBUG option is enabled.
    The bitmap scanning quite loads the CPU and on my machine the write
    throughput of dd if=/dev/zero of=/ocfs2/file bs=1M count=500 conv=sync
    improves from 37 MB/s to 45.4 MB/s in local mode...
    
    Signed-off-by: Jan Kara <[EMAIL PROTECTED]>
    Signed-off-by: Mark Fasheh <[EMAIL PROTECTED]>
---
 fs/Kconfig            |    9 +++++++++
 fs/ocfs2/localalloc.c |    5 +++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/fs/Kconfig b/fs/Kconfig
index 429a002..635f3e2 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -459,6 +459,15 @@ config OCFS2_DEBUG_MASKLOG
          This option will enlarge your kernel, but it allows debugging of
          ocfs2 filesystem issues.
 
+config OCFS2_DEBUG_FS
+       bool "OCFS2 expensive checks"
+       depends on OCFS2_FS
+       default n
+       help
+         This option will enable expensive consistency checks. Enable
+         this option for debugging only as it is likely to decrease
+         performance of the filesystem.
+
 config MINIX_FS
        tristate "Minix fs support"
        help
diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c
index d272847..58ea88b 100644
--- a/fs/ocfs2/localalloc.c
+++ b/fs/ocfs2/localalloc.c
@@ -484,6 +484,7 @@ int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb,
 
        alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data;
 
+#ifdef OCFS2_DEBUG_FS
        if (le32_to_cpu(alloc->id1.bitmap1.i_used) !=
            ocfs2_local_alloc_count_bits(alloc)) {
                ocfs2_error(osb->sb, "local alloc inode %llu says it has "
@@ -494,6 +495,7 @@ int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb,
                status = -EIO;
                goto bail;
        }
+#endif
 
        free_bits = le32_to_cpu(alloc->id1.bitmap1.i_total) -
                le32_to_cpu(alloc->id1.bitmap1.i_used);
@@ -712,9 +714,8 @@ static int ocfs2_sync_local_to_main(struct ocfs2_super *osb,
        void *bitmap;
        struct ocfs2_local_alloc *la = OCFS2_LOCAL_ALLOC(alloc);
 
-       mlog_entry("total = %u, COUNT = %u, used = %u\n",
+       mlog_entry("total = %u, used = %u\n",
                   le32_to_cpu(alloc->id1.bitmap1.i_total),
-                  ocfs2_local_alloc_count_bits(alloc),
                   le32_to_cpu(alloc->id1.bitmap1.i_used));
 
        if (!alloc->id1.bitmap1.i_total) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to