Skip to content

Commit

Permalink
xfs: remove buftarg hash for external devices
Browse files Browse the repository at this point in the history
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@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
  • Loading branch information
Dave Chinner authored and Alex Elder committed Oct 18, 2010
1 parent 1922c94 commit 69d6cc7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fs/xfs/linux-2.6/xfs_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit 69d6cc7

Please sign in to comment.