aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJie Liu <jeff.liu@oracle.com>2013-07-01 09:51:32 -0400
committerBen Myers <bpm@sgi.com>2013-07-09 16:36:21 -0400
commit9cee4c5b7b706157554cb06ca949997240da725a (patch)
tree638109543b7107a3673adc885fd6c1c34d0e6bb7 /fs
parenta69c7c077228b0bef38ccb1d385c099e132fe54b (diff)
xfs: clean up unused codes at xfs_bulkstat()
There are some unused codes at xfs_bulkstat(): - Variable bp is defined to point to the on-disk inode cluster buffer, but it proved to be of no practical help. - We process the chunks of good inodes which were fetched by iterating btree records from an AG. When processing inodes from each chunk, the code recomputing agbno if run into the first inode of a cluster, however, the agbno is not being used thereafter. This patch tries to clean up those things. Signed-off-by: Jie Liu <jeff.liu@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/xfs_itable.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c
index bc92c5306a17..b93e14b86754 100644
--- a/fs/xfs/xfs_itable.c
+++ b/fs/xfs/xfs_itable.c
@@ -221,7 +221,6 @@ xfs_bulkstat(
221 char __user *ubufp; /* pointer into user's buffer */ 221 char __user *ubufp; /* pointer into user's buffer */
222 int ubelem; /* spaces used in user's buffer */ 222 int ubelem; /* spaces used in user's buffer */
223 int ubused; /* bytes used by formatter */ 223 int ubused; /* bytes used by formatter */
224 xfs_buf_t *bp; /* ptr to on-disk inode cluster buf */
225 224
226 /* 225 /*
227 * Get the last inode value, see if there's nothing to do. 226 * Get the last inode value, see if there's nothing to do.
@@ -263,7 +262,6 @@ xfs_bulkstat(
263 rval = 0; 262 rval = 0;
264 while (XFS_BULKSTAT_UBLEFT(ubleft) && agno < mp->m_sb.sb_agcount) { 263 while (XFS_BULKSTAT_UBLEFT(ubleft) && agno < mp->m_sb.sb_agcount) {
265 cond_resched(); 264 cond_resched();
266 bp = NULL;
267 error = xfs_ialloc_read_agi(mp, NULL, agno, &agbp); 265 error = xfs_ialloc_read_agi(mp, NULL, agno, &agbp);
268 if (error) { 266 if (error) {
269 /* 267 /*
@@ -436,27 +434,7 @@ xfs_bulkstat(
436 irbp->ir_freecount < XFS_INODES_PER_CHUNK; 434 irbp->ir_freecount < XFS_INODES_PER_CHUNK;
437 chunkidx++, clustidx++, agino++) { 435 chunkidx++, clustidx++, agino++) {
438 ASSERT(chunkidx < XFS_INODES_PER_CHUNK); 436 ASSERT(chunkidx < XFS_INODES_PER_CHUNK);
439 /* 437
440 * Recompute agbno if this is the
441 * first inode of the cluster.
442 *
443 * Careful with clustidx. There can be
444 * multiple clusters per chunk, a single
445 * cluster per chunk or a cluster that has
446 * inodes represented from several different
447 * chunks (if blocksize is large).
448 *
449 * Because of this, the starting clustidx is
450 * initialized to zero in this loop but must
451 * later be reset after reading in the cluster
452 * buffer.
453 */
454 if ((chunkidx & (nicluster - 1)) == 0) {
455 agbno = XFS_AGINO_TO_AGBNO(mp,
456 irbp->ir_startino) +
457 ((chunkidx & nimask) >>
458 mp->m_sb.sb_inopblog);
459 }
460 ino = XFS_AGINO_TO_INO(mp, agno, agino); 438 ino = XFS_AGINO_TO_INO(mp, agno, agino);
461 /* 439 /*
462 * Skip if this inode is free. 440 * Skip if this inode is free.
@@ -502,10 +480,6 @@ xfs_bulkstat(
502 480
503 cond_resched(); 481 cond_resched();
504 } 482 }
505
506 if (bp)
507 xfs_buf_relse(bp);
508
509 /* 483 /*
510 * Set up for the next loop iteration. 484 * Set up for the next loop iteration.
511 */ 485 */