From: Carlos Maiolino <cmaiolino@redhat.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 2/1 V2] xfs: remove extraneous buffer flag changes
Date: Tue, 19 Jul 2016 09:57:05 +0200 [thread overview]
Message-ID: <20160719075705.GC8134@redhat.com> (raw)
In-Reply-To: <929bf9d2-968d-6c4a-bca6-24ffc0c54702@sandeen.net>
On Fri, Jul 08, 2016 at 11:28:02PM -0500, Eric Sandeen wrote:
> Fix up a couple places where extra flag manipulation occurs.
>
> In the first case we clear XBF_ASYNC and then immediately
> reset it - so don't bother clearing in the first place.
>
> In the 2nd case we are at a point in the function where the
> buffer must already be async, so there is no need to reset it.
>
> Add consistent spacing around the " | " while we're at it.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
This makes sense too.
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
> ---
>
> V2: fix subject, sorry!
>
> diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
> index e71cfbd..5d52e44 100644
> --- a/fs/xfs/xfs_buf.c
> +++ b/fs/xfs/xfs_buf.c
> @@ -1816,7 +1816,7 @@ __xfs_buf_delwri_submit(
>
> blk_start_plug(&plug);
> list_for_each_entry_safe(bp, n, io_list, b_list) {
> - bp->b_flags &= ~(_XBF_DELWRI_Q | XBF_ASYNC | XBF_WRITE_FAIL);
> + bp->b_flags &= ~(_XBF_DELWRI_Q | XBF_WRITE_FAIL);
> bp->b_flags |= XBF_WRITE | XBF_ASYNC;
>
> /*
> diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c
> index 3425799..6a2f429 100644
> --- a/fs/xfs/xfs_buf_item.c
> +++ b/fs/xfs/xfs_buf_item.c
> @@ -1080,10 +1080,9 @@ xfs_buf_iodone_callback_error(
> * async write failure at least once, but we also need to set the buffer
> * up to behave correctly now for repeated failures.
> */
> - if (!(bp->b_flags & (XBF_STALE|XBF_WRITE_FAIL)) ||
> + if (!(bp->b_flags & (XBF_STALE | XBF_WRITE_FAIL)) ||
> bp->b_last_error != bp->b_error) {
> - bp->b_flags |= (XBF_WRITE | XBF_ASYNC |
> - XBF_DONE | XBF_WRITE_FAIL);
> + bp->b_flags |= (XBF_WRITE | XBF_DONE | XBF_WRITE_FAIL);
> bp->b_last_error = bp->b_error;
> bp->b_retries = 0;
> bp->b_first_retry_time = jiffies;
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
--
Carlos
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2016-07-19 7:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-08 19:32 [PATCH] xfs: fix xfs_error_get_cfg for negative errnos Eric Sandeen
2016-07-09 4:26 ` [PATCH 2/1] " Eric Sandeen
2016-07-09 4:28 ` [PATCH 2/1 V2] xfs: remove extraneous buffer flag changes Eric Sandeen
2016-07-19 7:57 ` Carlos Maiolino [this message]
2016-07-09 4:33 ` [PATCH 3/1] xfs: don't reset b_retries to 0 on every failure Eric Sandeen
2016-07-19 7:42 ` Carlos Maiolino
2016-07-19 7:52 ` [PATCH] xfs: fix xfs_error_get_cfg for negative errnos Carlos Maiolino
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=20160719075705.GC8134@redhat.com \
--to=cmaiolino@redhat.com \
--cc=sandeen@sandeen.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.