[PATCH] xfs: handle dquot buffer readahead in log recovery correctly
Dave Chinner
david at fromorbit.com
Wed Jan 6 16:24:10 CST 2016
On Wed, Jan 06, 2016 at 09:34:09AM -0500, Brian Foster wrote:
> On Wed, Jan 06, 2016 at 03:00:34PM +1100, Dave Chinner wrote:
> > @@ -264,6 +264,21 @@ xfs_dquot_buf_read_verify(
> > }
> >
> > /*
> > + * readahead errors are silent and simply leave the buffer as !done so
> > + * a real read will then be run with the xfs_dquot_buf_ops verifier.
> > + */
> > +static void
> > +xfs_dquot_buf_readahead_verify(
> > + struct xfs_buf *bp)
> > +{
> > + struct xfs_mount *mp = bp->b_target->bt_mount;
> > +
> > + if (!xfs_dquot_buf_verify_crc(mp, bp) &&
> > + !xfs_dquot_buf_verify(mp, bp, 0))
> > + bp->b_flags &= ~XBF_DONE;
>
> Shouldn't this condition trigger if either the crc or buffer
> verification fails (not if both fail)?
Yup, got my logic tangled there.
> Also, xfs_buf_ioend() sets XBF_DONE when bp->b_error == 0 after the read
> verifier is invoked. I don't see bp->b_error being set here, so it looks
> like clearing this flag wouldn't have any effect.
Hmmm - I just copied that from the inode readahead verifier. So
that's not working properly, either. I'll fix that, too.
Thanks, Brian.
Cheers,
Dave.
--
Dave Chinner
david at fromorbit.com
More information about the xfs
mailing list