aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_itable.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_itable.c')
-rw-r--r--fs/xfs/xfs_itable.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c
index 612689940659..0fbbd7b9c696 100644
--- a/fs/xfs/xfs_itable.c
+++ b/fs/xfs/xfs_itable.c
@@ -326,7 +326,6 @@ xfs_bulkstat(
326 int i; /* loop index */ 326 int i; /* loop index */
327 int icount; /* count of inodes good in irbuf */ 327 int icount; /* count of inodes good in irbuf */
328 int irbsize; /* size of irec buffer in bytes */ 328 int irbsize; /* size of irec buffer in bytes */
329 unsigned int kmflags; /* flags for allocating irec buffer */
330 xfs_ino_t ino; /* inode number (filesystem) */ 329 xfs_ino_t ino; /* inode number (filesystem) */
331 xfs_inobt_rec_incore_t *irbp; /* current irec buffer pointer */ 330 xfs_inobt_rec_incore_t *irbp; /* current irec buffer pointer */
332 xfs_inobt_rec_incore_t *irbuf; /* start of irec buffer */ 331 xfs_inobt_rec_incore_t *irbuf; /* start of irec buffer */
@@ -371,19 +370,8 @@ xfs_bulkstat(
371 (XFS_INODE_CLUSTER_SIZE(mp) >> mp->m_sb.sb_inodelog); 370 (XFS_INODE_CLUSTER_SIZE(mp) >> mp->m_sb.sb_inodelog);
372 nimask = ~(nicluster - 1); 371 nimask = ~(nicluster - 1);
373 nbcluster = nicluster >> mp->m_sb.sb_inopblog; 372 nbcluster = nicluster >> mp->m_sb.sb_inopblog;
374 /* 373 irbuf = kmem_zalloc_greedy(&irbsize, NBPC, NBPC * 4,
375 * Allocate a local buffer for inode cluster btree records. 374 KM_SLEEP | KM_MAYFAIL | KM_LARGE);
376 * This caps our maximum readahead window (so don't be stingy)
377 * but we must handle the case where we can't get a contiguous
378 * multi-page buffer, so we drop back toward pagesize; the end
379 * case we ensure succeeds, via appropriate allocation flags.
380 */
381 irbsize = NBPP * 4;
382 kmflags = KM_SLEEP | KM_MAYFAIL;
383 while (!(irbuf = kmem_alloc(irbsize, kmflags))) {
384 if ((irbsize >>= 1) <= NBPP)
385 kmflags = KM_SLEEP;
386 }
387 nirbuf = irbsize / sizeof(*irbuf); 375 nirbuf = irbsize / sizeof(*irbuf);
388 376
389 /* 377 /*