]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: remove parameter dev_extent_len from scrub_stripe()
authorQu Wenruo <wqu@suse.com>
Fri, 13 May 2022 08:34:28 +0000 (16:34 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Jul 2022 15:45:36 +0000 (17:45 +0200)
commitceae3f334fb73c2ae286783c32e9607e5cc54700
tree31c0e693b177c3f610047f6c4d302fc9c39e2a4b
parent59c5dc3c868d0bdd9f795e579f4f20e2d23d9263
btrfs: remove parameter dev_extent_len from scrub_stripe()

For scrub_stripe() we can easily calculate the dev extent length as we
have the full info of the chunk.

Thus there is no need to pass @dev_extent_len from the caller, and we
introduce a helper, btrfs_calc_stripe_length(), to do the calculation
from extent_map structure.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
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
fs/btrfs/volumes.c
fs/btrfs/volumes.h