xfs: reuse _xfs_buf_read for re-reading the superblock
Instead of poking deeply into buffer cache internals when re-reading the superblock during log recovery just generalize _xfs_buf_read and use it there. Note that we don't have to explicitly set up the ops as they must be set from the initial read. 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:

committed by
Darrick J. Wong

parent
b3f8e08ca8
commit
26e328759b
@@ -3309,13 +3309,7 @@ xlog_do_recover(
|
||||
*/
|
||||
xfs_buf_lock(bp);
|
||||
xfs_buf_hold(bp);
|
||||
ASSERT(bp->b_flags & XBF_DONE);
|
||||
bp->b_flags &= ~(XBF_DONE | XBF_ASYNC);
|
||||
ASSERT(!(bp->b_flags & XBF_WRITE));
|
||||
bp->b_flags |= XBF_READ;
|
||||
bp->b_ops = &xfs_sb_buf_ops;
|
||||
|
||||
error = xfs_buf_submit(bp);
|
||||
error = _xfs_buf_read(bp, XBF_READ);
|
||||
if (error) {
|
||||
if (!XFS_FORCED_SHUTDOWN(mp)) {
|
||||
xfs_buf_ioerror_alert(bp, __this_address);
|
||||
|
Reference in New Issue
Block a user