xfs
[Top] [All Lists]

Re: [PATCH 6/6] xfs: rename XFS_BUF_ZEROFLAGS macro

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 6/6] xfs: rename XFS_BUF_ZEROFLAGS macro
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 9 Feb 2016 09:31:20 +1100
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20160208091235.GN5534@xxxxxxxxxxxxx>
References: <1454632683-20543-1-git-send-email-david@xxxxxxxxxxxxx> <1454632683-20543-7-git-send-email-david@xxxxxxxxxxxxx> <20160208091235.GN5534@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, Feb 08, 2016 at 01:12:36AM -0800, Christoph Hellwig wrote:
> Instead of just renaming it I'd rather dig deeper.
> 
> In xlog_bwrite we call xfs_bwrite, which already handles all flag
> clearing, so the call to XFS_BUF_ZEROFLAGS can just
> be removed.

Done.

> 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.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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