public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Chandra Seetharaman <sekharan@us.ibm.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 02/12] xfs: Remove the macro XFS_BUF_ZEROFLAGS
Date: Fri, 15 Jul 2011 21:59:01 -0400	[thread overview]
Message-ID: <20110716015901.GC589@infradead.org> (raw)
In-Reply-To: <20110716012116.6629.48217.sendpatchset@chandra-lucid.beaverton.ibm.com>

> --- a/fs/xfs/xfs_log.c
> +++ b/fs/xfs/xfs_log.c
> @@ -1367,7 +1367,7 @@ xlog_sync(xlog_t		*log,
>  	}
>  	XFS_BUF_SET_COUNT(bp, count);
>  	XFS_BUF_SET_FSPRIVATE(bp, iclog);	/* save for later */
> -	XFS_BUF_ZEROFLAGS(bp);
> +	bp->b_flags &= ~(XBF_READ|XBF_WRITE|XBF_ASYNC|XBF_DELWRI|XBF_ORDERED);
>  	XFS_BUF_BUSY(bp);
>  	XFS_BUF_ASYNC(bp);
>  	bp->b_flags |= XBF_LOG_BUFFER;

Note that XBF_ORDERED is gone in the current tree, you need to rebase
your patches to pick up the buffer changes I recently sent out.

I don't link this blind expansion.  For one all that flag setting is
duplicated in two places in xlog_sync, please send a patch to
consolidate it in xlog_bdstrat.  Second XBF_READ and XBF_DELWRI
won't ever be set here, so no need to clear them.  And XBF_WRITE
and XBF_ASYNC will get re-set a few lines down the code, so no need
to clear them either.  The XBF_FLUSH and XBF_FUA flag also get set
conditionally a little below, so I'd just clear them in an else
clause for the if condition checking if they should be set.

> diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
> index 04142ca..75ba081 100644
> --- a/fs/xfs/xfs_log_recover.c
> +++ b/fs/xfs/xfs_log_recover.c
> @@ -261,7 +261,7 @@ xlog_bwrite(
>  	ASSERT(BBTOB(nbblks) <= XFS_BUF_SIZE(bp));
>  
>  	XFS_BUF_SET_ADDR(bp, log->l_logBBstart + blk_no);
> -	XFS_BUF_ZEROFLAGS(bp);
> +	bp->b_flags &= ~(XBF_READ|XBF_WRITE|XBF_ASYNC|XBF_DELWRI|XBF_ORDERED);
>  	XFS_BUF_BUSY(bp);
>  	XFS_BUF_HOLD(bp);
>  	XFS_BUF_PSEMA(bp, PRIBIO);

XBF_READ, XBF_WRITE, XBF_ASYNC and XBF_DELWRI already get dealt with
in xfs_bwrite a few lines down, and XBF_ORDERED can't be set here. IOW
this line can simply be removed.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2011-07-16  1:59 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-16  1:21 [PATCH 00/12] Remove number of macros from xfs_buf.h Chandra Seetharaman
2011-07-16  1:21 ` [PATCH 01/12] xfs: Remove the macro XFS_BUF_BFLAGS Chandra Seetharaman
2011-07-16  1:54   ` Christoph Hellwig
2011-07-19  1:36     ` Chandra Seetharaman
2011-07-16  1:21 ` [PATCH 02/12] xfs: Remove the macro XFS_BUF_ZEROFLAGS Chandra Seetharaman
2011-07-16  1:59   ` Christoph Hellwig [this message]
2011-07-21 17:29     ` Chandra Seetharaman
2011-07-22 15:18       ` Christoph Hellwig
2011-07-16  1:21 ` [PATCH 03/12] xfs: Remove the macro XFS_BUF_ERROR and family Chandra Seetharaman
2011-07-16  2:00   ` Christoph Hellwig
2011-07-16  1:21 ` [PATCH 04/12] xfs: Remove macro XFS_BUF_BUSY " Chandra Seetharaman
2011-07-16  2:01   ` Christoph Hellwig
2011-07-16  1:21 ` [PATCH 05/12] xfs: Remove macro XFS_BUF_HOLD Chandra Seetharaman
2011-07-16  2:01   ` Christoph Hellwig
2011-07-16  1:21 ` [PATCH 06/12] xfs: Remove macro XFS_BUF_SET_START Chandra Seetharaman
2011-07-16 16:17   ` Christoph Hellwig
2011-07-16  1:21 ` [PATCH 07/12] xfs: Remove the macro XFS_BUF_PTR Chandra Seetharaman
2011-07-16 17:03   ` Christoph Hellwig
2011-07-16  1:21 ` [PATCH 08/12] xfs: Remove the macro XFS_BUF_SET_PTR Chandra Seetharaman
2011-07-16 16:44   ` Christoph Hellwig
2011-07-16  1:21 ` [PATCH 09/12] Replace the macro XFS_BUF_ISPINNED with helper xfs_buf_ispinned Chandra Seetharaman
2011-07-16  2:05   ` Christoph Hellwig
2011-07-16  1:22 ` [PATCH 10/12] xfs: Remove the macro XFS_BUF_SET_TARGET Chandra Seetharaman
2011-07-16  2:06   ` Christoph Hellwig
2011-07-16  1:22 ` [PATCH 11/12] xfs: Remove the macro XFS_BUF_TARGET Chandra Seetharaman
2011-07-16  2:06   ` Christoph Hellwig
2011-07-16  1:22 ` [PATCH 12/12] xfs: Remove the macro XFS_BUFTARG_NAME Chandra Seetharaman
2011-07-16  2:06   ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2011-07-22  0:32 [PATCH 00/12] Remove number of macros from xfs_buf.h Chandra Seetharaman
2011-07-22  0:32 ` [PATCH 02/12] xfs: Remove the macro XFS_BUF_ZEROFLAGS Chandra Seetharaman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110716015901.GC589@infradead.org \
    --to=hch@infradead.org \
    --cc=sekharan@us.ibm.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox