瀏覽代碼

xfs: remove buftarg hash for external devices

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>
Dave Chinner 15 年之前
父節點
當前提交
69d6cc76cf
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      fs/xfs/linux-2.6/xfs_buf.c

+ 5 - 1
fs/xfs/linux-2.6/xfs_buf.c

@@ -1458,7 +1458,11 @@ xfs_alloc_bufhash(
 {
 {
 	unsigned int		i;
 	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) *
 	btp->bt_hash = kmem_zalloc_large((1 << btp->bt_hashshift) *
 					 sizeof(xfs_bufhash_t));
 					 sizeof(xfs_bufhash_t));
 	for (i = 0; i < (1 << btp->bt_hashshift); i++) {
 	for (i = 0; i < (1 << btp->bt_hashshift); i++) {