diff options
author | Johannes Thumshirn <johannes.thumshirn@wdc.com> | 2023-09-14 09:07:02 -0700 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-10-12 16:44:09 +0200 |
commit | 568220fa96572e7bb48cfe8f2d04ab44e0dfe08e (patch) | |
tree | 8dea0cb609e0a8c79f2d5f0dd2a2d23bf2a637c5 /fs/btrfs/volumes.c | |
parent | 9acaa64187f9b4cbb75622883c96ea1a893d5431 (diff) | |
download | linux-568220fa96572e7bb48cfe8f2d04ab44e0dfe08e.tar.gz linux-568220fa96572e7bb48cfe8f2d04ab44e0dfe08e.tar.bz2 linux-568220fa96572e7bb48cfe8f2d04ab44e0dfe08e.zip |
btrfs: zoned: support RAID0/1/10 on top of raid stripe tree
When we have a raid-stripe-tree, we can do RAID0/1/10 on zoned devices
for data block groups. For metadata block groups, we don't actually
need anything special, as all metadata I/O is protected by the
btrfs_zoned_meta_io_lock() already.
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index af0abc775b7f..bc8d46cbc7c5 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -6453,6 +6453,8 @@ int btrfs_map_block(struct btrfs_fs_info *fs_info, enum btrfs_map_op op, * I/O context structure. */ if (smap && num_alloc_stripes == 1 && + !(btrfs_need_stripe_tree_update(fs_info, map->type) && + op != BTRFS_MAP_READ) && !((map->type & BTRFS_BLOCK_GROUP_RAID56_MASK) && mirror_num > 1)) { ret = set_io_stripe(fs_info, op, logical, length, smap, map, stripe_index, stripe_offset, stripe_nr); |