From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: dsterba@suse.cz, Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 3/3] btrfs: file-item: refactor btrfs_lookup_bio_sums() to handle out-of-order bvecs
Date: Mon, 16 Nov 2020 17:27:02 +0100 [thread overview]
Message-ID: <20201116162702.GS6756@twin.jikos.cz> (raw)
In-Reply-To: <2e0deb82-c2cf-088b-5abf-92003823613b@gmx.com>
On Wed, Nov 04, 2020 at 07:42:21AM +0800, Qu Wenruo wrote:
> >> + if (path->nodes[0]) {
> >> + item = btrfs_item_ptr(path->nodes[0], path->slots[0],
> >> + struct btrfs_csum_item);
> >> + btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]);
> >> + csum_start = key.offset;
> >> + csum_len = btrfs_item_size_nr(path->nodes[0], path->slots[0]) /
> >> + csum_size * sectorsize;
> >
> > path->slots[0]) / csum_size * sectorsize
> >
> > This expresission would be better on one line
>
> But it's already over 80 charactors.
>
> Or maybe I could use a small helper to do the csum_len calcuation like
> calc_csum_lenght(path)?
If it's a slight 80 columns overflow I'm joining the lines, there are
exceptions like ending ); or ) { or if the first part of the word is
enough to understand.
prev parent reply other threads:[~2020-11-16 16:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-28 7:24 [PATCH 0/3] btrfs: btrfs_lookup_bio_sums() related fixes Qu Wenruo
2020-10-28 7:24 ` [PATCH 1/3] btrfs: file-item: use nodesize to determine whether we need readhead for btrfs_lookup_bio_sums() Qu Wenruo
2020-10-29 7:25 ` Nikolay Borisov
2020-10-28 7:24 ` [PATCH 2/3] btrfs: ordered-data: rename parameter @len to @nr_sectors Qu Wenruo
2020-10-29 7:32 ` Nikolay Borisov
2020-11-03 19:16 ` David Sterba
2020-11-03 19:23 ` Amy Parker
2020-11-03 23:36 ` Qu Wenruo
2020-10-28 7:24 ` [PATCH 3/3] btrfs: file-item: refactor btrfs_lookup_bio_sums() to handle out-of-order bvecs Qu Wenruo
2020-11-03 19:46 ` David Sterba
2020-11-03 23:42 ` Qu Wenruo
2020-11-16 16:27 ` David Sterba [this message]
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=20201116162702.GS6756@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).