]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: scrub: cleanup the argument list of scrub_chunk()
authorQu Wenruo <wqu@suse.com>
Wed, 15 Dec 2021 06:59:41 +0000 (14:59 +0800)
committerDavid Sterba <dsterba@suse.com>
Fri, 7 Jan 2022 13:18:26 +0000 (14:18 +0100)
commit284e0257071232ffe799541a41d96e13305d915b
treeff6ad3e517d2bc7ca3e4d3a41f575f2d7b8c6428
parent5c37098b26a84c297ef8172664ac0477b09423e4
btrfs: scrub: cleanup the argument list of scrub_chunk()

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 the device extent length.

Fix this by:

- Remove @chunk_offset
  Use btrfs_block_group::start instead.

- Rename @length to @dev_extent_len
  Also rename the caller to remove the ambiguous naming.

- Rename @cache to @bg
  The "_cache" suffix for btrfs_block_group has been removed for a while.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/scrub.c