From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: Nikolay Borisov <nborisov@suse.com>, Qu Wenruo <wqu@suse.com>,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2 3/3] btrfs: file-item: refactor btrfs_lookup_bio_sums() to handle out-of-order bvecs
Date: Thu, 29 Oct 2020 14:54:15 +0100 [thread overview]
Message-ID: <20201029135415.GK6756@twin.jikos.cz> (raw)
In-Reply-To: <55275e3c-1828-7180-e902-8344a571516e@gmx.com>
On Thu, Oct 29, 2020 at 08:43:12PM +0800, Qu Wenruo wrote:
> On 2020/10/29 下午7:50, Nikolay Borisov wrote:
> > On 29.10.20 г. 9:12 ч., Qu Wenruo wrote:
> >> +{
> >> + struct btrfs_csum_item *item = NULL;
> >> + struct btrfs_key key;
> >> + u32 csum_size = btrfs_super_csum_size(fs_info->super_copy);
> >
> > nit: Why u32, btrfs_super_csum_size is defined as returning 'int',
> > however this function is really returning u16 since "struct btrfs_csums"
> > is defined as u16.
>
> It was misguided by u32 from btrfs super block, where sectorsize,
> nodesize are all u32.
>
> Any recommendation on this? Just u16 for csum_size or follow
> nodesize/sectorsize to use u32?
u32 is ok, this generates a bit better assembly than u16. I'm about to
send the patchset lifting it to fs_info and it uses u32.
next prev parent reply other threads:[~2020-10-29 13:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-29 7:12 [PATCH v2 0/3] btrfs: btrfs_lookup_bio_sums() related fixes Qu Wenruo
2020-10-29 7:12 ` [PATCH v2 1/3] btrfs: file-item: use nodesize to determine whether we need readhead for btrfs_lookup_bio_sums() Qu Wenruo
2020-10-29 18:57 ` Josef Bacik
2020-10-29 23:57 ` Qu Wenruo
2020-10-29 7:12 ` [PATCH v2 2/3] btrfs: file-item: remove the btrfs_find_ordered_sum() call in btrfs_lookup_bio_sums() Qu Wenruo
2020-10-29 7:47 ` Nikolay Borisov
2020-10-29 7:53 ` Qu Wenruo
2020-10-29 18:51 ` Josef Bacik
2020-10-29 7:12 ` [PATCH v2 3/3] btrfs: file-item: refactor btrfs_lookup_bio_sums() to handle out-of-order bvecs Qu Wenruo
2020-10-29 11:50 ` Nikolay Borisov
2020-10-29 12:43 ` Qu Wenruo
2020-10-29 13:54 ` David Sterba [this message]
2020-10-29 14:11 ` Qu Wenruo
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=20201029135415.GK6756@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=nborisov@suse.com \
--cc=quwenruo.btrfs@gmx.com \
--cc=wqu@suse.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