diff mbox

[RFC,01/12,RESEND] Btrfs: Do not limit RAID1 and DUP transfer length to one stripe.

Message ID 4B4259BF.9020607@hp.com (mailing list archive)
State Under Review, archived
Headers show

Commit Message

jim owens Jan. 4, 2010, 9:12 p.m. UTC
None
diff mbox

Patch

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 198cff2..f4b5666 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -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;
 	}