diff options
author | Qu Wenruo <wqu@suse.com> | 2022-05-13 16:34:29 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-06-22 18:13:11 +0200 |
commit | a204b169d8ee1d7247ddecd18fa637f8ca7ad2c5 (patch) | |
tree | 446a10b2bb1a8dc987bb193ac2de17739afd3756 /fs/btrfs | |
parent | d54f27f9f2c5dd625589e1677bcf1117fef866e7 (diff) | |
download | linux-next-a204b169d8ee1d7247ddecd18fa637f8ca7ad2c5.tar.gz |
btrfs: use btrfs_chunk_max_errors() to replace tolerance calculation
In __btrfs_map_block() we have an assignment to @max_errors using
nr_parity_stripes().
Although it works for RAID56 it's confusing. Replace it with
btrfs_chunk_max_errors().
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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/volumes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index e12b139586e0..75a59423a1bf 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -6466,7 +6466,7 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, /* RAID[56] write or recovery. Return all stripes */ num_stripes = map->num_stripes; - max_errors = nr_parity_stripes(map); + max_errors = btrfs_chunk_max_errors(map); *length = map->stripe_len; stripe_index = 0; |