xfs: refactor xfs_buf_ioend

Move the log recovery I/O completion handling entirely into the log
recovery code, and re-arrange the normal I/O completion handler flow
to prepare to lifting more logic into common code in the next commits.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:
Christoph Hellwig
2020-09-01 10:55:20 -07:00
committed by Darrick J. Wong
parent 76b2d32346
commit 23fb5a93c2
2 changed files with 24 additions and 31 deletions

View File

@ -269,15 +269,15 @@ void
xlog_recover_iodone(
struct xfs_buf *bp)
{
if (bp->b_error) {
if (!bp->b_error) {
bp->b_flags |= XBF_DONE;
} else if (!XFS_FORCED_SHUTDOWN(bp->b_mount)) {
/*
* We're not going to bother about retrying
* this during recovery. One strike!
* We're not going to bother about retrying this during
* recovery. One strike!
*/
if (!XFS_FORCED_SHUTDOWN(bp->b_mount)) {
xfs_buf_ioerror_alert(bp, __this_address);
xfs_force_shutdown(bp->b_mount, SHUTDOWN_META_IO_ERROR);
}
xfs_buf_ioerror_alert(bp, __this_address);
xfs_force_shutdown(bp->b_mount, SHUTDOWN_META_IO_ERROR);
}
/*