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

Johannes Thumshirn posted 4 patches 2 years, 2 months ago
[PATCH v3 2/4] btrfs: remove stride length check on read
Posted by Johannes Thumshirn 2 years, 2 months ago
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 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
Re: [PATCH v3 2/4] btrfs: remove stride length check on read
Posted by Johannes Thumshirn 2 years, 2 months ago
Fixes: 2d606e264676 ("btrfs: lookup physical address from stripe extent")