xfs
[Top] [All Lists]

Re: [PATCH V2] xfs: skip verification if initial sb read is wrong length

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: [PATCH V2] xfs: skip verification if initial sb read is wrong length
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Fri, 14 Feb 2014 10:02:26 +1100
Cc: Eric Sandeen <sandeen@xxxxxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <52FD4B10.2010005@xxxxxxxxxxx>
References: <52FD3C59.3050400@xxxxxxxxxx> <52FD4B10.2010005@xxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Feb 13, 2014 at 04:45:36PM -0600, Eric Sandeen wrote:
> @@ -334,7 +341,12 @@ reread:
>       if (sector_size < sbp->sb_sectsize) {
>               xfs_buf_relse(bp);
>               sector_size = sbp->sb_sectsize;
> +             buf_ops = loud ? &xfs_sb_buf_ops : &xfs_sb_quiet_buf_ops;
>               goto reread;
> +     } else {
> +             /* We guessed right!  Verify it. */
> +             bp->b_ops = &xfs_sb_buf_ops;
> +             bp->b_ops->verify_read(bp);
>       }

One needs to check bp->b_error after verification ;)

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>