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

The argument list of btrfs_stripe() has similar problems of
scrub_chunk():

- Duplicated and ambiguous @base argument
  Can be fetched from btrfs_block_group::bg.

- Ambiguous argument @length
  It's again device extent length

- Ambiguous argument @num
  The instinctive guess would be mirror number, but in fact it's stripe
  index.

Fix it by:

- Remove @base parameter

- Rename @length to @dev_extent_len

- Rename @num to @stripe_index

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