public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/2] btrfs: cleanup the argument list of scrub_chunk()
Date: Wed, 15 Dec 2021 16:45:36 +0100	[thread overview]
Message-ID: <20211215154536.GA28560@twin.jikos.cz> (raw)
In-Reply-To: <20211215065942.26683-1-wqu@suse.com>

On Wed, Dec 15, 2021 at 02:59:41PM +0800, Qu Wenruo wrote:
> The argument list of scrub_chunk() has the following problems:
> 
> - Duplicated @chunk_offset
>   It is the same as btrfs_block_group::start.
> 
> - Confusing @length
>   The most instinctive guess is chunk length, and one may want to delete
>   it, but the truth is, it's device extent length.
> 
> Fix this by:
> 
> - Remove @chunk_offset
>   Use btrfs_block_group::start instead.
> 
> - Rename @length to @dev_ext_len
>   Also rename the caller to remove the ambiguous naming.
> 
> - Rename @cache to @bg
>   The "_cache" suffix for btrfs_block_group is removed for a while.
> 
> Signed-off-by: Qu Wenruo <wqu@suse.com>

Good cleanups, added to misc-next, thanks. I've renamed the dev_ext_len
to dev_extent_len, as it's close to the key name BTRFS_DEV_EXTENT_KEY
and sounds more familiar.

      parent reply	other threads:[~2021-12-15 16:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15  6:59 [PATCH 1/2] btrfs: cleanup the argument list of scrub_chunk() Qu Wenruo
2021-12-15  6:59 ` [PATCH 2/2] btrfs: cleanup the argument list of scrub_stripe() Qu Wenruo
2021-12-15 15:45 ` 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=20211215154536.GA28560@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --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