From patchwork Thu Dec 17 19:04:11 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jim owens X-Patchwork-Id: 68545 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBI4ixvp005715 for ; Fri, 18 Dec 2009 04:47:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759805AbZLQTEP (ORCPT ); Thu, 17 Dec 2009 14:04:15 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759726AbZLQTEP (ORCPT ); Thu, 17 Dec 2009 14:04:15 -0500 Received: from g4t0015.houston.hp.com ([15.201.24.18]:13418 "EHLO g4t0015.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756544AbZLQTEO (ORCPT ); Thu, 17 Dec 2009 14:04:14 -0500 Received: from g4t0009.houston.hp.com (g4t0009.houston.hp.com [16.234.32.26]) by g4t0015.houston.hp.com (Postfix) with ESMTP id A98E78418; Thu, 17 Dec 2009 19:04:13 +0000 (UTC) Received: from ldl (linux.corp.hp.com [15.11.146.101]) by g4t0009.houston.hp.com (Postfix) with ESMTP id 83D0AC034; Thu, 17 Dec 2009 19:04:13 +0000 (UTC) Received: from localhost (ldl.fc.hp.com [127.0.0.1]) by ldl (Postfix) with ESMTP id 5AF6ECF002B; Thu, 17 Dec 2009 12:04:13 -0700 (MST) Received: from ldl ([127.0.0.1]) by localhost (ldl.fc.hp.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HWbhpRKsrzXk; Thu, 17 Dec 2009 12:04:13 -0700 (MST) Received: from [192.168.0.99] (squirrel.fc.hp.com [15.11.146.57]) (Authenticated sender: owens@fc.hp.com) by ldl (Postfix) with ESMTPA id C3732CF0007; Thu, 17 Dec 2009 12:04:12 -0700 (MST) Message-ID: <4B2A80AB.9080401@hp.com> Date: Thu, 17 Dec 2009 14:04:11 -0500 From: jim owens User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: linux-btrfs CC: Chris Mason Subject: PATCH] Do not limit RAID1 and DUP transfer length to one stripe Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org 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; }