xfs
[Top] [All Lists]

[PATCH 11/18] xfs: remove buftarg hash for external devices

To: xfs@xxxxxxxxxxx
Subject: [PATCH 11/18] xfs: remove buftarg hash for external devices
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Fri, 24 Sep 2010 22:31:09 +1000
In-reply-to: <1285331476-23015-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1285331476-23015-1-git-send-email-david@xxxxxxxxxxxxx>
From: Dave Chinner <dchinner@xxxxxxxxxx>

For RT and external log devices, we never use hashed buffers on them
now.  Remove the buftarg hash tables that are set up for them.

Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
Reviewed-by: Christoph Hellwig <hch@xxxxxx>
Reviewed-by: Alex Elder <aelder@xxxxxxx>
---
 fs/xfs/linux-2.6/xfs_buf.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c
index 975d658..251bcdc 100644
--- a/fs/xfs/linux-2.6/xfs_buf.c
+++ b/fs/xfs/linux-2.6/xfs_buf.c
@@ -1458,7 +1458,11 @@ xfs_alloc_bufhash(
 {
        unsigned int            i;
 
-       btp->bt_hashshift = external ? 3 : 12;  /* 8 or 4096 buckets */
+       if (external) {
+               btp->bt_hash = NULL;
+               return;
+       }
+       btp->bt_hashshift = 12; /* 4096 buckets */
        btp->bt_hash = kmem_zalloc_large((1 << btp->bt_hashshift) *
                                         sizeof(xfs_bufhash_t));
        for (i = 0; i < (1 << btp->bt_hashshift); i++) {
-- 
1.7.1

<Prev in Thread] Current Thread [Next in Thread>