From: Christoph Hellwig <hch@infradead.org>
To: Carlos Maiolino <cmaiolino@redhat.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/3] xfs: use atomic operations to handle xfs_log_item flags
Date: Mon, 22 May 2017 12:11:11 -0700 [thread overview]
Message-ID: <20170522191111.GC17100@infradead.org> (raw)
In-Reply-To: <20170522153220.25072-2-cmaiolino@redhat.com>
> --- a/fs/xfs/xfs_buf_item.c
> +++ b/fs/xfs/xfs_buf_item.c
> @@ -587,7 +587,7 @@ xfs_buf_item_unlock(
> * (cancelled) buffers at unpin time, but we'll never go through the
> * pin/unpin cycle if we abort inside commit.
> */
> - aborted = (lip->li_flags & XFS_LI_ABORTED) ? true : false;
> + aborted = (test_bit(XFS_LI_ABORTED, &lip->li_flags)) ? true : false;
aborted = test_bit(XFS_LI_ABORTED, &lip->li_flags);
does the same job in a slightly simpler way.
> + ASSERT(!(test_bit(XFS_LI_IN_AIL, &bip->bli_item.li_flags)));
no need for the inner braces.
> + ASSERT(!(test_bit(XFS_LI_IN_AIL, &ip->i_itemp->ili_item.li_flags)));
Same here. Also please don't break lines after 80 characters.
> + !(test_bit(XFS_LI_IN_AIL, &dqp->q_logitem.qli_item.li_flags)));
Also no need for the braces around test_bit here.
> + if (!(test_bit(XFS_LI_IN_AIL, &lip->li_flags))) {
.. again
> + ASSERT(!(test_bit(XFS_LI_IN_AIL, &bip->bli_item.li_flags)));
.. again
Also last but not least the arguments to the *_bit functions are
bit indices, so they should be renumber to 0 and 1 (and the tracing
helpers will need some updates as well).
next prev parent reply other threads:[~2017-05-22 19:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-22 15:32 [PATCH 0/3 V2] Resubmit items failed during writeback Carlos Maiolino
2017-05-22 15:32 ` [PATCH 1/3] xfs: use atomic operations to handle xfs_log_item flags Carlos Maiolino
2017-05-22 19:11 ` Christoph Hellwig [this message]
2017-05-23 10:35 ` Carlos Maiolino
2017-05-23 10:42 ` Carlos Maiolino
2017-05-24 17:06 ` Brian Foster
2017-06-05 12:54 ` Carlos Maiolino
2017-06-05 13:13 ` Carlos Maiolino
2017-05-22 15:32 ` [PATCH 2/3 V2] xfs: Add infrastructure needed for error propagation during buffer IO failure Carlos Maiolino
2017-05-22 19:13 ` Christoph Hellwig
2017-05-23 11:21 ` Carlos Maiolino
2017-05-24 17:07 ` Brian Foster
2017-05-26 11:51 ` Brian Foster
2017-05-22 15:32 ` [PATCH 3/3 V2] xfs: Properly retry failed inode items in case of error during buffer writeback Carlos Maiolino
2017-05-24 17:08 ` Brian Foster
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=20170522191111.GC17100@infradead.org \
--to=hch@infradead.org \
--cc=cmaiolino@redhat.com \
--cc=linux-xfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).