diff options
author | Dave Chinner <dchinner@redhat.com> | 2010-09-21 20:47:20 -0400 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-10-18 16:07:48 -0400 |
commit | ebad861b5702c3e2332a3e906978f47144d22f70 (patch) | |
tree | 7b4502277c46d26d1d26258d05596b58ab6b868a /fs/xfs/xfs_log_recover.c | |
parent | 5adc94c247c3779782c7b0b8b5e28cf50596eb37 (diff) |
xfs: store xfs_mount in the buftarg instead of in the xfs_buf
Each buffer contains both a buftarg pointer and a mount pointer. If
we add a mount pointer into the buftarg, we can avoid needing the
b_mount field in every buffer and grab it from the buftarg when
needed instead. This shrinks the xfs_buf by 8 bytes.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 3d887542b037..351d71117f16 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -322,10 +322,11 @@ xlog_recover_iodone( | |||
322 | * this during recovery. One strike! | 322 | * this during recovery. One strike! |
323 | */ | 323 | */ |
324 | xfs_ioerror_alert("xlog_recover_iodone", | 324 | xfs_ioerror_alert("xlog_recover_iodone", |
325 | bp->b_mount, bp, XFS_BUF_ADDR(bp)); | 325 | bp->b_target->bt_mount, bp, |
326 | xfs_force_shutdown(bp->b_mount, SHUTDOWN_META_IO_ERROR); | 326 | XFS_BUF_ADDR(bp)); |
327 | xfs_force_shutdown(bp->b_target->bt_mount, | ||
328 | SHUTDOWN_META_IO_ERROR); | ||
327 | } | 329 | } |
328 | bp->b_mount = NULL; | ||
329 | XFS_BUF_CLR_IODONE_FUNC(bp); | 330 | XFS_BUF_CLR_IODONE_FUNC(bp); |
330 | xfs_biodone(bp); | 331 | xfs_biodone(bp); |
331 | } | 332 | } |
@@ -2276,8 +2277,7 @@ xlog_recover_do_buffer_trans( | |||
2276 | XFS_BUF_STALE(bp); | 2277 | XFS_BUF_STALE(bp); |
2277 | error = xfs_bwrite(mp, bp); | 2278 | error = xfs_bwrite(mp, bp); |
2278 | } else { | 2279 | } else { |
2279 | ASSERT(bp->b_mount == NULL || bp->b_mount == mp); | 2280 | ASSERT(bp->b_target->bt_mount == mp); |
2280 | bp->b_mount = mp; | ||
2281 | XFS_BUF_SET_IODONE_FUNC(bp, xlog_recover_iodone); | 2281 | XFS_BUF_SET_IODONE_FUNC(bp, xlog_recover_iodone); |
2282 | xfs_bdwrite(mp, bp); | 2282 | xfs_bdwrite(mp, bp); |
2283 | } | 2283 | } |
@@ -2541,8 +2541,7 @@ xlog_recover_do_inode_trans( | |||
2541 | } | 2541 | } |
2542 | 2542 | ||
2543 | write_inode_buffer: | 2543 | write_inode_buffer: |
2544 | ASSERT(bp->b_mount == NULL || bp->b_mount == mp); | 2544 | ASSERT(bp->b_target->bt_mount == mp); |
2545 | bp->b_mount = mp; | ||
2546 | XFS_BUF_SET_IODONE_FUNC(bp, xlog_recover_iodone); | 2545 | XFS_BUF_SET_IODONE_FUNC(bp, xlog_recover_iodone); |
2547 | xfs_bdwrite(mp, bp); | 2546 | xfs_bdwrite(mp, bp); |
2548 | error: | 2547 | error: |
@@ -2679,8 +2678,7 @@ xlog_recover_do_dquot_trans( | |||
2679 | memcpy(ddq, recddq, item->ri_buf[1].i_len); | 2678 | memcpy(ddq, recddq, item->ri_buf[1].i_len); |
2680 | 2679 | ||
2681 | ASSERT(dq_f->qlf_size == 2); | 2680 | ASSERT(dq_f->qlf_size == 2); |
2682 | ASSERT(bp->b_mount == NULL || bp->b_mount == mp); | 2681 | ASSERT(bp->b_target->bt_mount == mp); |
2683 | bp->b_mount = mp; | ||
2684 | XFS_BUF_SET_IODONE_FUNC(bp, xlog_recover_iodone); | 2682 | XFS_BUF_SET_IODONE_FUNC(bp, xlog_recover_iodone); |
2685 | xfs_bdwrite(mp, bp); | 2683 | xfs_bdwrite(mp, bp); |
2686 | 2684 | ||