Re: [PATCH 1/2] btrfs: cleanup the argument list of scrub_chunk()

David Sterba
2021-12-15T16:01:20Z

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.