Skip to contentSkip to conversation

Btrfs: Do not limit RAID1 and DUP transfer length to one stripe.

RFC PATCH In review jim owens 1 participant 1 message Jan 4, 2010 Btrfs file system

lore
Share & tools
lore

jim owens

author
#0 lore raw

RFC PATCH 1/12 Btrfs: Do not limit RAID1 and DUP transfer length to one stripe.

The 65k stripe length should be ignored as the stripes are physically contiguous on disk so transfers can span stripes.

---
 fs/btrfs/volumes.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
fs/btrfs/volumes.c +3 -3
index 198cff2..f4b5666 100644
@@ -2697,13 +2697,13 @@ again:
 	/* stripe_offset is the offset of this block in its stripe*/
 	stripe_offset = offset - stripe_offset;
 
-	if (map->type & (BTRFS_BLOCK_GROUP_RAID0 | BTRFS_BLOCK_GROUP_RAID1 |
-			 BTRFS_BLOCK_GROUP_RAID10 |
-			 BTRFS_BLOCK_GROUP_DUP)) {
+	if (map->type & (BTRFS_BLOCK_GROUP_RAID0 |
+			 BTRFS_BLOCK_GROUP_RAID10)) {
 		/* we limit the length of each bio to what fits in a stripe */
 		*length = min_t(u64, em->len - offset,
 			      map->stripe_len - stripe_offset);
 	} else {
+		/* RAID1, DUP, and simple disk stripes are all contiguous */
 		*length = em->len - offset;
 	}
 
Signature · 1 line
1.5.6.3