Merge branch '2.6.36-xfs-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/xfsdev

+11 -11
+1 -7
fs/xfs/linux-2.6/xfs_buf.c
··· 440 440 ASSERT(btp == bp->b_target); 441 441 if (bp->b_file_offset == range_base && 442 442 bp->b_buffer_length == range_length) { 443 - /* 444 - * If we look at something, bring it to the 445 - * front of the list for next time. 446 - */ 447 443 atomic_inc(&bp->b_hold); 448 - list_move(&bp->b_hash_list, &hash->bh_list); 449 444 goto found; 450 445 } 451 446 } ··· 1438 1443 { 1439 1444 unsigned int i; 1440 1445 1441 - btp->bt_hashshift = external ? 3 : 8; /* 8 or 256 buckets */ 1442 - btp->bt_hashmask = (1 << btp->bt_hashshift) - 1; 1446 + btp->bt_hashshift = external ? 3 : 12; /* 8 or 4096 buckets */ 1443 1447 btp->bt_hash = kmem_zalloc_large((1 << btp->bt_hashshift) * 1444 1448 sizeof(xfs_bufhash_t)); 1445 1449 for (i = 0; i < (1 << btp->bt_hashshift); i++) {
-1
fs/xfs/linux-2.6/xfs_buf.h
··· 137 137 size_t bt_smask; 138 138 139 139 /* per device buffer hash table */ 140 - uint bt_hashmask; 141 140 uint bt_hashshift; 142 141 xfs_bufhash_t *bt_hash; 143 142
+10 -3
fs/xfs/xfs_vnodeops.c
··· 2299 2299 e = allocatesize_fsb; 2300 2300 } 2301 2301 2302 + /* 2303 + * The transaction reservation is limited to a 32-bit block 2304 + * count, hence we need to limit the number of blocks we are 2305 + * trying to reserve to avoid an overflow. We can't allocate 2306 + * more than @nimaps extents, and an extent is limited on disk 2307 + * to MAXEXTLEN (21 bits), so use that to enforce the limit. 2308 + */ 2309 + resblks = min_t(xfs_fileoff_t, (e - s), (MAXEXTLEN * nimaps)); 2302 2310 if (unlikely(rt)) { 2303 - resrtextents = qblocks = (uint)(e - s); 2311 + resrtextents = qblocks = resblks; 2304 2312 resrtextents /= mp->m_sb.sb_rextsize; 2305 2313 resblks = XFS_DIOSTRAT_SPACE_RES(mp, 0); 2306 2314 quota_flag = XFS_QMOPT_RES_RTBLKS; 2307 2315 } else { 2308 2316 resrtextents = 0; 2309 - resblks = qblocks = \ 2310 - XFS_DIOSTRAT_SPACE_RES(mp, (uint)(e - s)); 2317 + resblks = qblocks = XFS_DIOSTRAT_SPACE_RES(mp, resblks); 2311 2318 quota_flag = XFS_QMOPT_RES_REGBLKS; 2312 2319 } 2313 2320