From patchwork Mon Jan 4 21:12:31 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jim owens X-Patchwork-Id: 70738 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 o04LDM6I024937 for ; Mon, 4 Jan 2010 21:13:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754100Ab0ADVMp (ORCPT ); Mon, 4 Jan 2010 16:12:45 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753921Ab0ADVMp (ORCPT ); Mon, 4 Jan 2010 16:12:45 -0500 Received: from g1t0029.austin.hp.com ([15.216.28.36]:24509 "EHLO g1t0029.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754120Ab0ADVMf (ORCPT ); Mon, 4 Jan 2010 16:12:35 -0500 Received: from g1t0039.austin.hp.com (g1t0039.austin.hp.com [16.236.32.45]) by g1t0029.austin.hp.com (Postfix) with ESMTP id 0031A383FD for ; Mon, 4 Jan 2010 21:12:34 +0000 (UTC) Received: from ldl (ldl.fc.hp.com [15.11.146.30]) by g1t0039.austin.hp.com (Postfix) with ESMTP id E57EE34040 for ; Mon, 4 Jan 2010 21:12:34 +0000 (UTC) Received: from localhost (ldl.fc.hp.com [127.0.0.1]) by ldl (Postfix) with ESMTP id B2D57CF0013; Mon, 4 Jan 2010 14:12:34 -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 D1mEQrXUPwp3; Mon, 4 Jan 2010 14:12:34 -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 D9607CF000E; Mon, 4 Jan 2010 14:12:33 -0700 (MST) Message-ID: <4B4259BF.9020607@hp.com> Date: Mon, 04 Jan 2010 16:12:31 -0500 From: jim owens User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: linux-btrfs Subject: [RFC 01/12 RESEND PATCH] Btrfs: 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 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; }