diff options
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 61 |
1 files changed, 5 insertions, 56 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 3cb678e3a13..ca74d3f5910 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -1514,7 +1514,6 @@ xlog_recover_reorder_trans( { xlog_recover_item_t *first_item, *itemq, *itemq_next; xfs_buf_log_format_t *buf_f; - xfs_buf_log_format_v1_t *obuf_f; ushort flags = 0; first_item = itemq = trans->r_itemq; @@ -1522,29 +1521,16 @@ xlog_recover_reorder_trans( do { itemq_next = itemq->ri_next; buf_f = (xfs_buf_log_format_t *)itemq->ri_buf[0].i_addr; - switch (ITEM_TYPE(itemq)) { - case XFS_LI_BUF: - flags = buf_f->blf_flags; - break; - case XFS_LI_6_1_BUF: - case XFS_LI_5_3_BUF: - obuf_f = (xfs_buf_log_format_v1_t*)buf_f; - flags = obuf_f->blf_flags; - break; - } switch (ITEM_TYPE(itemq)) { case XFS_LI_BUF: - case XFS_LI_6_1_BUF: - case XFS_LI_5_3_BUF: + flags = buf_f->blf_flags; if (!(flags & XFS_BLI_CANCEL)) { xlog_recover_insert_item_frontq(&trans->r_itemq, itemq); break; } case XFS_LI_INODE: - case XFS_LI_6_1_INODE: - case XFS_LI_5_3_INODE: case XFS_LI_DQUOT: case XFS_LI_QUOTAOFF: case XFS_LI_EFD: @@ -1583,7 +1569,6 @@ xlog_recover_do_buffer_pass1( xfs_buf_cancel_t *nextp; xfs_buf_cancel_t *prevp; xfs_buf_cancel_t **bucket; - xfs_buf_log_format_v1_t *obuf_f; xfs_daddr_t blkno = 0; uint len = 0; ushort flags = 0; @@ -1594,13 +1579,6 @@ xlog_recover_do_buffer_pass1( len = buf_f->blf_len; flags = buf_f->blf_flags; break; - case XFS_LI_6_1_BUF: - case XFS_LI_5_3_BUF: - obuf_f = (xfs_buf_log_format_v1_t*)buf_f; - blkno = (xfs_daddr_t) obuf_f->blf_blkno; - len = obuf_f->blf_len; - flags = obuf_f->blf_flags; - break; } /* @@ -1746,7 +1724,6 @@ xlog_recover_do_buffer_pass2( xlog_t *log, xfs_buf_log_format_t *buf_f) { - xfs_buf_log_format_v1_t *obuf_f; xfs_daddr_t blkno = 0; ushort flags = 0; uint len = 0; @@ -1757,13 +1734,6 @@ xlog_recover_do_buffer_pass2( flags = buf_f->blf_flags; len = buf_f->blf_len; break; - case XFS_LI_6_1_BUF: - case XFS_LI_5_3_BUF: - obuf_f = (xfs_buf_log_format_v1_t*)buf_f; - blkno = (xfs_daddr_t) obuf_f->blf_blkno; - flags = obuf_f->blf_flags; - len = (xfs_daddr_t) obuf_f->blf_len; - break; } return xlog_check_buffer_cancelled(log, blkno, len, flags); @@ -1799,7 +1769,6 @@ xlog_recover_do_inode_buffer( int inodes_per_buf; xfs_agino_t *logged_nextp; xfs_agino_t *buffer_nextp; - xfs_buf_log_format_v1_t *obuf_f; unsigned int *data_map = NULL; unsigned int map_size = 0; @@ -1808,12 +1777,6 @@ xlog_recover_do_inode_buffer( data_map = buf_f->blf_data_map; map_size = buf_f->blf_map_size; break; - case XFS_LI_6_1_BUF: - case XFS_LI_5_3_BUF: - obuf_f = (xfs_buf_log_format_v1_t*)buf_f; - data_map = obuf_f->blf_data_map; - map_size = obuf_f->blf_map_size; - break; } /* * Set the variables corresponding to the current region to @@ -1912,7 +1875,6 @@ xlog_recover_do_reg_buffer( int i; int bit; int nbits; - xfs_buf_log_format_v1_t *obuf_f; unsigned int *data_map = NULL; unsigned int map_size = 0; int error; @@ -1922,12 +1884,6 @@ xlog_recover_do_reg_buffer( data_map = buf_f->blf_data_map; map_size = buf_f->blf_map_size; break; - case XFS_LI_6_1_BUF: - case XFS_LI_5_3_BUF: - obuf_f = (xfs_buf_log_format_v1_t*)buf_f; - data_map = obuf_f->blf_data_map; - map_size = obuf_f->blf_map_size; - break; } bit = 0; i = 1; /* 0 is the buf format structure */ @@ -2160,7 +2116,6 @@ xlog_recover_do_buffer_trans( int pass) { xfs_buf_log_format_t *buf_f; - xfs_buf_log_format_v1_t *obuf_f; xfs_mount_t *mp; xfs_buf_t *bp; int error; @@ -2197,13 +2152,6 @@ xlog_recover_do_buffer_trans( len = buf_f->blf_len; flags = buf_f->blf_flags; break; - case XFS_LI_6_1_BUF: - case XFS_LI_5_3_BUF: - obuf_f = (xfs_buf_log_format_v1_t*)buf_f; - blkno = obuf_f->blf_blkno; - len = obuf_f->blf_len; - flags = obuf_f->blf_flags; - break; default: xfs_fs_cmn_err(CE_ALERT, log->l_mp, "xfs_log_recover: unknown buffer type 0x%x, logdev %s", @@ -2830,9 +2778,7 @@ xlog_recover_do_trans( * where xfs_daddr_t is 32-bits but mount will warn us * off a > 1 TB filesystem before we get here. */ - if ((ITEM_TYPE(item) == XFS_LI_BUF) || - (ITEM_TYPE(item) == XFS_LI_6_1_BUF) || - (ITEM_TYPE(item) == XFS_LI_5_3_BUF)) { + if ((ITEM_TYPE(item) == XFS_LI_BUF)) { if ((error = xlog_recover_do_buffer_trans(log, item, pass))) break; @@ -3902,6 +3848,9 @@ xlog_do_recover( ASSERT(XFS_SB_GOOD_VERSION(sbp)); xfs_buf_relse(bp); + /* We've re-read the superblock so re-initialize per-cpu counters */ + xfs_icsb_reinit_counters(log->l_mp); + xlog_recover_check_summary(log); /* Normal transactions can now occur */ |