diff mbox series

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

Message ID 20231004-rst-updates-v3-2-7729c4474ade@wdc.com (mailing list archive)
State New, archived
Headers show
Series btrfs: RAID stripe tree updates | expand

Commit Message

Johannes Thumshirn Oct. 4, 2023, 7:56 a.m. UTC
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 fs/btrfs/raid-stripe-tree.c | 8 --------
 1 file changed, 8 deletions(-)

Comments

Johannes Thumshirn Oct. 4, 2023, 12:43 p.m. UTC | #1
Fixes: 2d606e264676 ("btrfs: lookup physical address from stripe extent")
diff mbox series

Patch

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;