aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log_recover.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r--fs/xfs/xfs_log_recover.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index 07ab52ca8aba..22b6f35765c1 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -2523,19 +2523,19 @@ xlog_recover_buffer_pass2(
2523 * 2523 *
2524 * Also make sure that only inode buffers with good sizes stay in 2524 * Also make sure that only inode buffers with good sizes stay in
2525 * the buffer cache. The kernel moves inodes in buffers of 1 block 2525 * the buffer cache. The kernel moves inodes in buffers of 1 block
2526 * or XFS_INODE_CLUSTER_SIZE bytes, whichever is bigger. The inode 2526 * or mp->m_inode_cluster_size bytes, whichever is bigger. The inode
2527 * buffers in the log can be a different size if the log was generated 2527 * buffers in the log can be a different size if the log was generated
2528 * by an older kernel using unclustered inode buffers or a newer kernel 2528 * by an older kernel using unclustered inode buffers or a newer kernel
2529 * running with a different inode cluster size. Regardless, if the 2529 * running with a different inode cluster size. Regardless, if the
2530 * the inode buffer size isn't MAX(blocksize, XFS_INODE_CLUSTER_SIZE) 2530 * the inode buffer size isn't MAX(blocksize, mp->m_inode_cluster_size)
2531 * for *our* value of XFS_INODE_CLUSTER_SIZE, then we need to keep 2531 * for *our* value of mp->m_inode_cluster_size, then we need to keep
2532 * the buffer out of the buffer cache so that the buffer won't 2532 * the buffer out of the buffer cache so that the buffer won't
2533 * overlap with future reads of those inodes. 2533 * overlap with future reads of those inodes.
2534 */ 2534 */
2535 if (XFS_DINODE_MAGIC == 2535 if (XFS_DINODE_MAGIC ==
2536 be16_to_cpu(*((__be16 *)xfs_buf_offset(bp, 0))) && 2536 be16_to_cpu(*((__be16 *)xfs_buf_offset(bp, 0))) &&
2537 (BBTOB(bp->b_io_length) != MAX(log->l_mp->m_sb.sb_blocksize, 2537 (BBTOB(bp->b_io_length) != MAX(log->l_mp->m_sb.sb_blocksize,
2538 (__uint32_t)XFS_INODE_CLUSTER_SIZE(log->l_mp)))) { 2538 (__uint32_t)log->l_mp->m_inode_cluster_size))) {
2539 xfs_buf_stale(bp); 2539 xfs_buf_stale(bp);
2540 error = xfs_bwrite(bp); 2540 error = xfs_bwrite(bp);
2541 } else { 2541 } else {
@@ -3208,10 +3208,10 @@ xlog_recover_do_icreate_pass2(
3208 } 3208 }
3209 3209
3210 /* existing allocation is fixed value */ 3210 /* existing allocation is fixed value */
3211 ASSERT(count == XFS_IALLOC_INODES(mp)); 3211 ASSERT(count == mp->m_ialloc_inos);
3212 ASSERT(length == XFS_IALLOC_BLOCKS(mp)); 3212 ASSERT(length == mp->m_ialloc_blks);
3213 if (count != XFS_IALLOC_INODES(mp) || 3213 if (count != mp->m_ialloc_inos ||
3214 length != XFS_IALLOC_BLOCKS(mp)) { 3214 length != mp->m_ialloc_blks) {
3215 xfs_warn(log->l_mp, "xlog_recover_do_icreate_trans: bad count 2"); 3215 xfs_warn(log->l_mp, "xlog_recover_do_icreate_trans: bad count 2");
3216 return EINVAL; 3216 return EINVAL;
3217 } 3217 }