diff options
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 43 |
1 files changed, 20 insertions, 23 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index a199dbcee7d8..541a508adea1 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -183,8 +183,7 @@ xlog_bread_noalign( | |||
183 | xfsbdstrat(log->l_mp, bp); | 183 | xfsbdstrat(log->l_mp, bp); |
184 | error = xfs_buf_iowait(bp); | 184 | error = xfs_buf_iowait(bp); |
185 | if (error) | 185 | if (error) |
186 | xfs_ioerror_alert("xlog_bread", log->l_mp, | 186 | xfs_buf_ioerror_alert(bp, __func__); |
187 | bp, XFS_BUF_ADDR(bp)); | ||
188 | return error; | 187 | return error; |
189 | } | 188 | } |
190 | 189 | ||
@@ -268,9 +267,10 @@ xlog_bwrite( | |||
268 | xfs_buf_lock(bp); | 267 | xfs_buf_lock(bp); |
269 | XFS_BUF_SET_COUNT(bp, BBTOB(nbblks)); | 268 | XFS_BUF_SET_COUNT(bp, BBTOB(nbblks)); |
270 | 269 | ||
271 | if ((error = xfs_bwrite(log->l_mp, bp))) | 270 | error = xfs_bwrite(bp); |
272 | xfs_ioerror_alert("xlog_bwrite", log->l_mp, | 271 | if (error) |
273 | bp, XFS_BUF_ADDR(bp)); | 272 | xfs_buf_ioerror_alert(bp, __func__); |
273 | xfs_buf_relse(bp); | ||
274 | return error; | 274 | return error; |
275 | } | 275 | } |
276 | 276 | ||
@@ -361,9 +361,7 @@ xlog_recover_iodone( | |||
361 | * We're not going to bother about retrying | 361 | * We're not going to bother about retrying |
362 | * this during recovery. One strike! | 362 | * this during recovery. One strike! |
363 | */ | 363 | */ |
364 | xfs_ioerror_alert("xlog_recover_iodone", | 364 | xfs_buf_ioerror_alert(bp, __func__); |
365 | bp->b_target->bt_mount, bp, | ||
366 | XFS_BUF_ADDR(bp)); | ||
367 | xfs_force_shutdown(bp->b_target->bt_mount, | 365 | xfs_force_shutdown(bp->b_target->bt_mount, |
368 | SHUTDOWN_META_IO_ERROR); | 366 | SHUTDOWN_META_IO_ERROR); |
369 | } | 367 | } |
@@ -2135,8 +2133,7 @@ xlog_recover_buffer_pass2( | |||
2135 | return XFS_ERROR(ENOMEM); | 2133 | return XFS_ERROR(ENOMEM); |
2136 | error = bp->b_error; | 2134 | error = bp->b_error; |
2137 | if (error) { | 2135 | if (error) { |
2138 | xfs_ioerror_alert("xlog_recover_do..(read#1)", mp, | 2136 | xfs_buf_ioerror_alert(bp, "xlog_recover_do..(read#1)"); |
2139 | bp, buf_f->blf_blkno); | ||
2140 | xfs_buf_relse(bp); | 2137 | xfs_buf_relse(bp); |
2141 | return error; | 2138 | return error; |
2142 | } | 2139 | } |
@@ -2171,15 +2168,16 @@ xlog_recover_buffer_pass2( | |||
2171 | be16_to_cpu(*((__be16 *)xfs_buf_offset(bp, 0))) && | 2168 | be16_to_cpu(*((__be16 *)xfs_buf_offset(bp, 0))) && |
2172 | (XFS_BUF_COUNT(bp) != MAX(log->l_mp->m_sb.sb_blocksize, | 2169 | (XFS_BUF_COUNT(bp) != MAX(log->l_mp->m_sb.sb_blocksize, |
2173 | (__uint32_t)XFS_INODE_CLUSTER_SIZE(log->l_mp)))) { | 2170 | (__uint32_t)XFS_INODE_CLUSTER_SIZE(log->l_mp)))) { |
2174 | XFS_BUF_STALE(bp); | 2171 | xfs_buf_stale(bp); |
2175 | error = xfs_bwrite(mp, bp); | 2172 | error = xfs_bwrite(bp); |
2176 | } else { | 2173 | } else { |
2177 | ASSERT(bp->b_target->bt_mount == mp); | 2174 | ASSERT(bp->b_target->bt_mount == mp); |
2178 | bp->b_iodone = xlog_recover_iodone; | 2175 | bp->b_iodone = xlog_recover_iodone; |
2179 | xfs_bdwrite(mp, bp); | 2176 | xfs_buf_delwri_queue(bp); |
2180 | } | 2177 | } |
2181 | 2178 | ||
2182 | return (error); | 2179 | xfs_buf_relse(bp); |
2180 | return error; | ||
2183 | } | 2181 | } |
2184 | 2182 | ||
2185 | STATIC int | 2183 | STATIC int |
@@ -2230,8 +2228,7 @@ xlog_recover_inode_pass2( | |||
2230 | } | 2228 | } |
2231 | error = bp->b_error; | 2229 | error = bp->b_error; |
2232 | if (error) { | 2230 | if (error) { |
2233 | xfs_ioerror_alert("xlog_recover_do..(read#2)", mp, | 2231 | xfs_buf_ioerror_alert(bp, "xlog_recover_do..(read#2)"); |
2234 | bp, in_f->ilf_blkno); | ||
2235 | xfs_buf_relse(bp); | 2232 | xfs_buf_relse(bp); |
2236 | goto error; | 2233 | goto error; |
2237 | } | 2234 | } |
@@ -2439,7 +2436,8 @@ xlog_recover_inode_pass2( | |||
2439 | write_inode_buffer: | 2436 | write_inode_buffer: |
2440 | ASSERT(bp->b_target->bt_mount == mp); | 2437 | ASSERT(bp->b_target->bt_mount == mp); |
2441 | bp->b_iodone = xlog_recover_iodone; | 2438 | bp->b_iodone = xlog_recover_iodone; |
2442 | xfs_bdwrite(mp, bp); | 2439 | xfs_buf_delwri_queue(bp); |
2440 | xfs_buf_relse(bp); | ||
2443 | error: | 2441 | error: |
2444 | if (need_free) | 2442 | if (need_free) |
2445 | kmem_free(in_f); | 2443 | kmem_free(in_f); |
@@ -2537,8 +2535,7 @@ xlog_recover_dquot_pass2( | |||
2537 | XFS_FSB_TO_BB(mp, dq_f->qlf_len), | 2535 | XFS_FSB_TO_BB(mp, dq_f->qlf_len), |
2538 | 0, &bp); | 2536 | 0, &bp); |
2539 | if (error) { | 2537 | if (error) { |
2540 | xfs_ioerror_alert("xlog_recover_do..(read#3)", mp, | 2538 | xfs_buf_ioerror_alert(bp, "xlog_recover_do..(read#3)"); |
2541 | bp, dq_f->qlf_blkno); | ||
2542 | return error; | 2539 | return error; |
2543 | } | 2540 | } |
2544 | ASSERT(bp); | 2541 | ASSERT(bp); |
@@ -2561,7 +2558,8 @@ xlog_recover_dquot_pass2( | |||
2561 | ASSERT(dq_f->qlf_size == 2); | 2558 | ASSERT(dq_f->qlf_size == 2); |
2562 | ASSERT(bp->b_target->bt_mount == mp); | 2559 | ASSERT(bp->b_target->bt_mount == mp); |
2563 | bp->b_iodone = xlog_recover_iodone; | 2560 | bp->b_iodone = xlog_recover_iodone; |
2564 | xfs_bdwrite(mp, bp); | 2561 | xfs_buf_delwri_queue(bp); |
2562 | xfs_buf_relse(bp); | ||
2565 | 2563 | ||
2566 | return (0); | 2564 | return (0); |
2567 | } | 2565 | } |
@@ -3656,7 +3654,7 @@ xlog_do_recover( | |||
3656 | return error; | 3654 | return error; |
3657 | } | 3655 | } |
3658 | 3656 | ||
3659 | XFS_bflush(log->l_mp->m_ddev_targp); | 3657 | xfs_flush_buftarg(log->l_mp->m_ddev_targp, 1); |
3660 | 3658 | ||
3661 | /* | 3659 | /* |
3662 | * If IO errors happened during recovery, bail out. | 3660 | * If IO errors happened during recovery, bail out. |
@@ -3689,8 +3687,7 @@ xlog_do_recover( | |||
3689 | xfsbdstrat(log->l_mp, bp); | 3687 | xfsbdstrat(log->l_mp, bp); |
3690 | error = xfs_buf_iowait(bp); | 3688 | error = xfs_buf_iowait(bp); |
3691 | if (error) { | 3689 | if (error) { |
3692 | xfs_ioerror_alert("xlog_do_recover", | 3690 | xfs_buf_ioerror_alert(bp, __func__); |
3693 | log->l_mp, bp, XFS_BUF_ADDR(bp)); | ||
3694 | ASSERT(0); | 3691 | ASSERT(0); |
3695 | xfs_buf_relse(bp); | 3692 | xfs_buf_relse(bp); |
3696 | return error; | 3693 | return error; |