Re: [PATCH 08/13] btrfs: factor out block mapping for RAID5/6

From: Christoph Hellwig
Date: Wed Dec 13 2023 - 03:53:11 EST


> +static void map_blocks_for_raid56(struct btrfs_chunk_map *map,
> + enum btrfs_map_op op,
> + struct btrfs_io_geometry *io_geom,
> + u64 logical, u64 *length)
> +{
> + int data_stripes = nr_data_stripes(map);
> +
> + if (op != BTRFS_MAP_READ || io_geom->mirror_num > 1) {

Any reason to not have separate read/write helpers here given that
they don't really share anything?