summaryrefslogtreecommitdiff
path: root/fs/btrfs/raid-stripe-tree.h
diff options
context:
space:
mode:
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>2023-09-14 19:07:02 +0300
committerDavid Sterba <dsterba@suse.com>2023-10-12 17:44:09 +0300
commit568220fa96572e7bb48cfe8f2d04ab44e0dfe08e (patch)
tree8dea0cb609e0a8c79f2d5f0dd2a2d23bf2a637c5 /fs/btrfs/raid-stripe-tree.h
parent9acaa64187f9b4cbb75622883c96ea1a893d5431 (diff)
downloadlinux-568220fa96572e7bb48cfe8f2d04ab44e0dfe08e.tar.xz
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/raid-stripe-tree.h')
-rw-r--r--fs/btrfs/raid-stripe-tree.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/btrfs/raid-stripe-tree.h b/fs/btrfs/raid-stripe-tree.h
index f0f3c99b8a6f..cdb58b38fcb5 100644
--- a/fs/btrfs/raid-stripe-tree.h
+++ b/fs/btrfs/raid-stripe-tree.h
@@ -6,6 +6,11 @@
#ifndef BTRFS_RAID_STRIPE_TREE_H
#define BTRFS_RAID_STRIPE_TREE_H
+#define BTRFS_RST_SUPP_BLOCK_GROUP_MASK (BTRFS_BLOCK_GROUP_DUP | \
+ BTRFS_BLOCK_GROUP_RAID1_MASK | \
+ BTRFS_BLOCK_GROUP_RAID0 | \
+ BTRFS_BLOCK_GROUP_RAID10)
+
struct btrfs_io_context;
struct btrfs_io_stripe;
struct btrfs_ordered_extent;
@@ -30,7 +35,7 @@ static inline bool btrfs_need_stripe_tree_update(struct btrfs_fs_info *fs_info,
if (type != BTRFS_BLOCK_GROUP_DATA)
return false;
- if (profile & BTRFS_BLOCK_GROUP_RAID1_MASK)
+ if (profile & BTRFS_RST_SUPP_BLOCK_GROUP_MASK)
return true;
return false;