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

Christoph Hellwig
2023-12-13T08:53:07Z

> +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?