Message ID | b10b56b94a518bb423b89e29c82639584b68eb64.1652428644.git.wqu@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs: cleanups and preparation for the incoming RAID56J features | expand |
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index a49d72d845b1..c6c55ef17000 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -6480,7 +6480,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;
In __btrfs_map_block() we have a very weird assignment to @max_errors using nr_parity_stripes(). Although it works for RAID56 without problem, it's not reader friendly. Just replace it with btrfs_chunk_max_errors(). Signed-off-by: Qu Wenruo <wqu@suse.com> --- fs/btrfs/volumes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)