diff options
author | Johannes Thumshirn <johannes.thumshirn@wdc.com> | 2024-05-13 18:01:43 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-07-11 15:33:28 +0200 |
commit | 2422547e99f99f952d1a37f26b63289f749d5fcd (patch) | |
tree | 7f67f3749a19ee368255a3f431cc45f63a847de9 /fs/btrfs/raid-stripe-tree.h | |
parent | e2c1887329086148625fef5205719112ceb4a829 (diff) |
btrfs: remove raid-stripe-tree encoding field from stripe_extent
Remove the encoding field from 'struct btrfs_stripe_extent'. It was
originally intended to encode the RAID type as well as if we're a data
or a parity stripe.
But the RAID type can be inferred form the block-group and the data vs.
parity differentiation can be done easier with adding a new key type
for parity stripes in the RAID stripe tree.
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.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.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/raid-stripe-tree.h b/fs/btrfs/raid-stripe-tree.h index c9c258f84903..1ac1c21aac2f 100644 --- a/fs/btrfs/raid-stripe-tree.h +++ b/fs/btrfs/raid-stripe-tree.h @@ -48,8 +48,7 @@ static inline bool btrfs_need_stripe_tree_update(struct btrfs_fs_info *fs_info, static inline int btrfs_num_raid_stripes(u32 item_size) { - return (item_size - offsetof(struct btrfs_stripe_extent, strides)) / - sizeof(struct btrfs_raid_stride); + return item_size / sizeof(struct btrfs_raid_stride); } #endif |