From: kaixuxia <xiakaixu1987@gmail.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-xfs@vger.kernel.org, darrick.wong@oracle.com,
Kaixu Xia <kaixuxia@tencent.com>
Subject: Re: [PATCH v2 4/7] xfs: do the assert for all the log done items in xfs_trans_cancel
Date: Wed, 23 Sep 2020 11:26:36 +0800 [thread overview]
Message-ID: <c978b255-54db-c060-7ce9-2666e2741eb3@gmail.com> (raw)
In-Reply-To: <20200919062708.GA13501@infradead.org>
On 2020/9/19 14:27, Christoph Hellwig wrote:
> On Thu, Sep 17, 2020 at 07:38:45PM +0800, xiakaixu1987@gmail.com wrote:
>> From: Kaixu Xia <kaixuxia@tencent.com>
>>
>> We should do the assert for all the log intent-done items if they appear
>> here. This patch detect intent-done items by the fact that their item ops
>> don't have iop_unpin and iop_push methods.
>>
>> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
>> ---
>> fs/xfs/xfs_trans.c | 9 ++++++++-
>> 1 file changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
>> index ca18a040336a..0d5d5a53fa5a 100644
>> --- a/fs/xfs/xfs_trans.c
>> +++ b/fs/xfs/xfs_trans.c
>> @@ -925,6 +925,13 @@ xfs_trans_commit(
>> return __xfs_trans_commit(tp, false);
>> }
>>
>> +/* Is this a log intent-done item? */
>> +static inline bool xlog_item_is_intent_done(struct xfs_log_item *lip)
>> +{
>> + return lip->li_ops->iop_unpin == NULL &&
>> + lip->li_ops->iop_push == NULL;
>> +}
>
> I think this helper should go into xfs_trans.h, next to the
> xfs_log_item log item definition. And xlog_item_is_intent should
> be moved there as well.
>
Yeah,make more sense, will move them to xfs_trans.h in the next version.
Thanks,
Kaixu
> Otherwise looks good:
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
--
kaixuxia
next prev parent reply other threads:[~2020-09-23 3:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-17 11:38 [PATCH v2 0/7] xfs: random fixes and code cleanup xiakaixu1987
2020-09-17 11:38 ` [PATCH v2 1/7] xfs: remove the unused SYNCHRONIZE macro xiakaixu1987
2020-09-17 11:38 ` [PATCH v2 2/7] xfs: use the existing type definition for di_projid xiakaixu1987
2020-09-17 11:38 ` [PATCH v2 3/7] xfs: remove the unnecessary xfs_dqid_t type cast xiakaixu1987
2020-09-17 11:38 ` [PATCH v2 4/7] xfs: do the assert for all the log done items in xfs_trans_cancel xiakaixu1987
2020-09-17 18:18 ` Darrick J. Wong
2020-09-19 6:27 ` Christoph Hellwig
2020-09-23 3:26 ` kaixuxia [this message]
2020-09-17 11:38 ` [PATCH v2 5/7] xfs: remove the redundant crc feature check in xfs_attr3_rmt_verify xiakaixu1987
2020-09-17 18:18 ` Darrick J. Wong
2020-09-19 6:27 ` Christoph Hellwig
2020-09-19 6:28 ` Christoph Hellwig
2020-09-17 11:38 ` [PATCH v2 6/7] xfs: code cleanup in xfs_attr_leaf_entsize_{remote,local} xiakaixu1987
2020-09-17 18:19 ` Darrick J. Wong
2020-09-19 6:29 ` Christoph Hellwig
2020-09-23 3:21 ` kaixuxia
2020-09-17 11:38 ` [PATCH v2 7/7] xfs: fix some comments xiakaixu1987
2020-09-19 6:30 ` Christoph Hellwig
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=c978b255-54db-c060-7ce9-2666e2741eb3@gmail.com \
--to=xiakaixu1987@gmail.com \
--cc=darrick.wong@oracle.com \
--cc=hch@infradead.org \
--cc=kaixuxia@tencent.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