public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: Re: [PATCH v3 3/3] btrfs: rename struct btrfs_io_bio to btrfs_logical_bio
Date: Mon, 20 Sep 2021 10:04:10 +0300	[thread overview]
Message-ID: <b49cb262-0239-78eb-8144-523caed28bef@suse.com> (raw)
In-Reply-To: <20210915071718.59418-4-wqu@suse.com>



On 15.09.21 г. 10:17, Qu Wenruo wrote:
> Previously we have "struct btrfs_bio", which records IO context for
> mirrored IO and RAID56, and "strcut btrfs_io_bio", which records extra
> btrfs specific info for logical bytenr bio.
> 
> With "strcut btrfs_bio" renamed to "struct btrfs_io_context", we are
> safe to rename "strcut btrfs_io_bio" to "strcut btrfs_logical_bio" which
> is a more suitable name now.
> 
> Although the name, "btrfs_logical_bio", is a little long and name
> "btrfs_bio" can be much shorter, "btrfs_bio" conflicts with previous
> "btrfs_bio" structure and can cause a lot of problems for backports.
> 
> Thus here we choose the name "btrfs_logical_bio", which also emphasis
> those bios all work at logical bytenr.
> 
> Signed-off-by: Qu Wenruo <wqu@suse.com>


So thinking a bit more about the renaming we are trading "awkwardness"
for future generations so that we make backporting easier or rather more
fool proof.

What if we backport a patch that does BUILD_BUG_ON predicated on the
size of the btrfs_io_bio. That way if a patch backports cleanly and
automatically but in fact git got confused by btrfs_bio vs btrfs_io_bio
then a build failure would ensue due to mismatched sizes and that would
be a clear indication something has gone wrong so whoever is doing the
backport can go and correct the backport? David what do you think about
this?

  parent reply	other threads:[~2021-09-20  7:04 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15  7:17 [PATCH v3 0/3] btrfs: btrfs_bio and btrfs_io_bio rename Qu Wenruo
2021-09-15  7:17 ` [PATCH v3 1/3] btrfs: rename btrfs_bio to btrfs_io_context Qu Wenruo
2021-09-17 11:19   ` David Sterba
2021-09-17 11:24     ` Qu Wenruo
2021-09-17 11:27       ` Qu Wenruo
2021-09-17 11:33         ` David Sterba
2021-09-15  7:17 ` [PATCH v3 2/3] btrfs: remove btrfs_bio_alloc() helper Qu Wenruo
2021-09-17 12:27   ` Nikolay Borisov
2021-09-17 12:33     ` Qu Wenruo
2021-09-17 12:34       ` Nikolay Borisov
2021-09-17 12:43     ` David Sterba
2021-09-17 12:49       ` Nikolay Borisov
2021-09-20 10:33         ` Qu Wenruo
2021-09-20 12:41           ` David Sterba
2021-09-20 12:42             ` Qu Wenruo
2021-09-23  5:57   ` Qu Wenruo
2021-09-15  7:17 ` [PATCH v3 3/3] btrfs: rename struct btrfs_io_bio to btrfs_logical_bio Qu Wenruo
2021-09-17 11:39   ` David Sterba
2021-09-20  7:04   ` Nikolay Borisov [this message]
2021-09-20 12:23     ` David Sterba
2021-09-20 13:10       ` David Sterba
2021-09-17 11:39 ` [PATCH v3 0/3] btrfs: btrfs_bio and btrfs_io_bio rename David Sterba

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=b49cb262-0239-78eb-8144-523caed28bef@suse.com \
    --to=nborisov@suse.com \
    --cc=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --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