[PATCH v3 2/4] btrfs: remove stride length check on read

From: Johannes Thumshirn
Date: Wed Oct 04 2023 - 03:56:38 EST


Signed-off-by: Johannes Thumshirn <johannes.thumshirn@xxxxxxx>
---
fs/btrfs/raid-stripe-tree.c | 8 --------
1 file changed, 8 deletions(-)

diff --git a/fs/btrfs/raid-stripe-tree.c b/fs/btrfs/raid-stripe-tree.c
index 248e048810d3..944e8f1862aa 100644
--- a/fs/btrfs/raid-stripe-tree.c
+++ b/fs/btrfs/raid-stripe-tree.c
@@ -237,16 +237,8 @@ int btrfs_get_raid_extent_offset(struct btrfs_fs_info *fs_info,
for (int i = 0; i < num_stripes; i++) {
struct btrfs_raid_stride *stride = &stripe_extent->strides[i];
u64 devid = btrfs_raid_stride_devid(leaf, stride);
- u64 len = btrfs_raid_stride_length(leaf, stride);
u64 physical = btrfs_raid_stride_physical(leaf, stride);

- if (offset >= len) {
- offset -= len;
-
- if (offset >= BTRFS_STRIPE_LEN)
- continue;
- }
-
if (devid != stripe->dev->devid)
continue;


--
2.41.0