From: kaixuxia <xiakaixu1987@gmail.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org, Kaixu Xia <kaixuxia@tencent.com>
Subject: Re: [PATCH] xfs: remove the repeated crc verification in xfs_attr3_rmt_verify
Date: Thu, 17 Sep 2020 15:03:25 +0800 [thread overview]
Message-ID: <faf768f0-8db1-0188-fbf2-73bc6538178d@gmail.com> (raw)
In-Reply-To: <20200916184545.GI7955@magnolia>
On 2020/9/17 2:45, Darrick J. Wong wrote:
> On Wed, Sep 16, 2020 at 07:19:10PM +0800, xiakaixu1987@gmail.com wrote:
>> From: Kaixu Xia <kaixuxia@tencent.com>
>>
>> We already do the crc verification before calling the xfs_attr3_rmt_verify()
>
> Nit: The function call you're removing does not itself do crc
> verification; it merely checks that the *crc feature* is set. This
> commit message needs to make this distinction, because at first I
> thought "Why would you remove crc verification?"
>
> IOWs...
>
> "We already check that the crc feature is enabled before calling
> xfs_attr3_rmt_verify(), so remove the redundant feature check in that
> function."
Yes, right! The original commit message is confusing, will update it
in the next version.
Thanks,
Kaixu
>
> --D
>
>> function, and just return directly for non-crc buffers, so don't need
>> to do the repeated crc verification in xfs_attr3_rmt_verify().
>>
>> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
>> ---
>> fs/xfs/libxfs/xfs_attr_remote.c | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/fs/xfs/libxfs/xfs_attr_remote.c b/fs/xfs/libxfs/xfs_attr_remote.c
>> index 3f80cede7406..48d8e9caf86f 100644
>> --- a/fs/xfs/libxfs/xfs_attr_remote.c
>> +++ b/fs/xfs/libxfs/xfs_attr_remote.c
>> @@ -96,8 +96,6 @@ xfs_attr3_rmt_verify(
>> {
>> struct xfs_attr3_rmt_hdr *rmt = ptr;
>>
>> - if (!xfs_sb_version_hascrc(&mp->m_sb))
>> - return __this_address;
>> if (!xfs_verify_magic(bp, rmt->rm_magic))
>> return __this_address;
>> if (!uuid_equal(&rmt->rm_uuid, &mp->m_sb.sb_meta_uuid))
>> --
>> 2.20.0
>>
--
kaixuxia
next prev parent reply other threads:[~2020-09-17 7:04 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-16 11:19 [RFC PATCH 0/9]xfs: random fixes and code cleanup xiakaixu1987
2020-09-16 11:19 ` [PATCH] xfs: remove the unused SYNCHRONIZE macro xiakaixu1987
2020-09-16 21:28 ` Darrick J. Wong
2020-09-17 8:03 ` Christoph Hellwig
2020-09-16 11:19 ` [PATCH] xfs: use the existing type definition for di_projid xiakaixu1987
2020-09-16 21:30 ` Darrick J. Wong
2020-09-17 8:06 ` Christoph Hellwig
2020-09-16 11:19 ` [PATCH] xfs: remove the unnecessary xfs_dqid_t type cast xiakaixu1987
2020-09-16 21:30 ` Darrick J. Wong
2020-09-17 8:07 ` Christoph Hellwig
2020-09-16 11:19 ` [PATCH] xfs: do the assert for all the log done items in xfs_trans_cancel xiakaixu1987
2020-09-17 0:10 ` Darrick J. Wong
2020-09-17 8:06 ` kaixuxia
2020-09-17 8:08 ` Christoph Hellwig
2020-09-16 11:19 ` [PATCH] xfs: add the XFS_ITEM_LOG_INTENT flag to mark the log intent item xiakaixu1987
2020-09-16 11:19 ` [PATCH] xfs: remove the unnecessary variable error in xfs_trans_unreserve_and_mod_sb xiakaixu1987
2020-09-16 16:45 ` Darrick J. Wong
2020-09-17 6:47 ` kaixuxia
2020-09-16 11:19 ` [PATCH] xfs: remove the repeated crc verification in xfs_attr3_rmt_verify xiakaixu1987
2020-09-16 18:45 ` Darrick J. Wong
2020-09-17 7:03 ` kaixuxia [this message]
2020-09-16 11:19 ` [PATCH] xfs: cleanup the useless backslash in xfs_attr_leaf_entsize_remote xiakaixu1987
2020-09-16 18:50 ` Darrick J. Wong
2020-09-17 7:17 ` kaixuxia
2020-09-16 11:19 ` [PATCH] xfs: fix some comments xiakaixu1987
2020-09-16 21:31 ` Darrick J. Wong
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=faf768f0-8db1-0188-fbf2-73bc6538178d@gmail.com \
--to=xiakaixu1987@gmail.com \
--cc=darrick.wong@oracle.com \
--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