public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* PATCH] Do not limit RAID1 and DUP transfer length to one stripe
@ 2009-12-17 19:04 jim owens
  2009-12-18 14:23 ` Chris Mason
  0 siblings, 1 reply; 3+ messages in thread
From: jim owens @ 2009-12-17 19:04 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Chris Mason


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

Signed-off-by: jim owens <jowens@hp.com>
---
 fs/btrfs/volumes.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 20cbd2e..4a0c8e5 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;
 	}
 
-- 
1.5.6.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-18 15:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-17 19:04 PATCH] Do not limit RAID1 and DUP transfer length to one stripe jim owens
2009-12-18 14:23 ` Chris Mason
2009-12-18 15:43   ` jim owens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox