[PATCH 6/6] xfs: rename XFS_BUF_ZEROFLAGS macro
Dave Chinner
david at fromorbit.com
Tue Feb 9 15:23:36 CST 2016
On Tue, Feb 09, 2016 at 01:16:32AM -0800, Christoph Hellwig wrote:
> On Tue, Feb 09, 2016 at 09:31:20AM +1100, Dave Chinner wrote:
> > > xlog_sync already sets a lot of these flags again, and is called on an
> > > iclog buffer which never has the READ or XBF_WRITE_FAIL set, so just
> > > replacing it with an opencoded
> > >
> > > bp->b_flags &= (XBF_FUA | XBF_FLUSH);
> >
> > We can't do that because there are internal flags like _XBF_PAGES
> > that are set on log buffers. Clearing such flags will cause problems
> > when the iclog buffer is finally released on unmount. Hence I'd
> > prefer to keep the code as it stands.
>
> Sorry - meabt to write:
>
> bp->b_flags &= ~(XBF_FUA | XBF_FLUSH);
>
> which is all we'll need. All other flags cleared by XFS_BUF_ZEROFLAGS
> are either never set for log buffers (XBF_READ, XBF_WRITE_FAIL), or
> always set for log buffers (XBF_WRITE, XBF_ASYNC, XBF_SYNCIO).
Ah, that makes more sense. I should have realised that, but there
are places where we do clear buffer flags like your original
suggestion so it didn't occur to me it was just a typo. I'll fix it
up.
Cheers,
Dave.
--
Dave Chinner
david at fromorbit.com
More information about the xfs
mailing list