From patchwork Wed Mar 27 17:39:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 2352461 Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by patchwork1.kernel.org (Postfix) with ESMTP id 80A3B3FC8C for ; Wed, 27 Mar 2013 17:43:48 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r2RHfO47030417; Wed, 27 Mar 2013 13:41:24 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r2RHevPC016219 for ; Wed, 27 Mar 2013 13:40:57 -0400 Received: from mx1.redhat.com (ext-mx12.extmail.prod.ext.phx2.redhat.com [10.5.110.17]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r2RHevmD026900 for ; Wed, 27 Mar 2013 13:40:57 -0400 Received: from mail-da0-f44.google.com (mail-da0-f44.google.com [209.85.210.44]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2RHeunL029517 for ; Wed, 27 Mar 2013 13:40:56 -0400 Received: by mail-da0-f44.google.com with SMTP id z20so4180730dae.17 for ; Wed, 27 Mar 2013 10:40:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=SqhRe3FnIah+GmaSAORhBUMsCpTtqaprs0PrhyNRFss=; b=RBmrgNWoS1+hEAyQ33YZ2wWhTV/I0wo5I9yO/xuZLWZC6RxH3FlqI7ougnsqj3ILL9 1SWW2lhbzCFVB+B7+aOIN95p4opzSai9Y5+WqSjmaXgwUdf5QqW4MlUb4yjY38E73nRL i+TJwDZFWfHqm9jsSXvouCXhjLd/ROFRLbRj9whDymqrkxeKa2ZcJy6sBRz82YpQjwmq X7QpbZUmVxunLjtvv8S/Nq702xnBs7JRocWwXpXyXvQSMnzdG7r9bJ23f0Vpn3cyUBdf 9mLX1U1TmMRgDszfYgX8STZYUs9qsURS4VxmdAuk1Jq/h83xKEU4FTeuP8c3l2H0YPqy tmVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=SqhRe3FnIah+GmaSAORhBUMsCpTtqaprs0PrhyNRFss=; b=URUQaXrQNzUTcMXK1pdiP7kRXfCjt4KhsIpj96+ogG6E55ndq7QDJ3GlE5Vg9GsgIk 47EWuKFQ8ss7LseApkMPeeoIuZPEB+oOyyoIuJIN1XmLjiDnb/yiN9hsShvqxIzhPQ6l 0aQ9DZcQsj74u5aCcFoEQvZ87AoGjX31nP9a9b9nHbM8dDnizemzp2/x1mLMnrdskciz VETlr4MMxaVbkAkHsY0KfM+erXifpK4s8fSJELUOp1LZ3ZRPn3HskVP6IBHUXXf2rE5W pZNNYj1eSh8QTbYQcRqa3cVJfKqBliRtpeuUivIhQYrbsZ5fOWZc+3ijIZq7bUQEFU3f +fMw== X-Received: by 10.66.49.38 with SMTP id r6mr30924355pan.212.1364406056218; Wed, 27 Mar 2013 10:40:56 -0700 (PDT) Received: from formenos.mtv.corp.google.com (formenos.mtv.corp.google.com [172.18.126.133]) by mx.google.com with ESMTPS id qd8sm22195440pbc.29.2013.03.27.10.40.55 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 27 Mar 2013 10:40:55 -0700 (PDT) From: Kent Overstreet To: axboe@kernel.dk, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, dm-devel@vger.kernel.org Date: Wed, 27 Mar 2013 10:39:50 -0700 Message-Id: <1364405992-28424-21-git-send-email-koverstreet@google.com> In-Reply-To: <1364405992-28424-1-git-send-email-koverstreet@google.com> References: <1364405992-28424-1-git-send-email-koverstreet@google.com> X-Gm-Message-State: ALoCoQmBelFIXh89dAPLDS9DVVNxpsA6uHceEt9JcPl5bufux5ebUOoyzhCGmoXjE3CfZcJXo1Jk+kg3kfBn2l4gdS6quyVv0fbJ6KPK5gAWkVhPWNLifE9tVpVSqfxoLbMwkE5qarps7xtXiU4J+VNErPmYDHTa0wEYag4c9GaivRHGGgfrQkPw0MzMlnxcXS7Sj1oTz1hF X-RedHat-Spam-Score: -4.4 (BAYES_00, DCC_REPUT_00_12, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.17 X-loop: dm-devel@redhat.com Cc: tj@kernel.org, Kent Overstreet , dm-devel@redhat.com, Alasdair Kergon Subject: [dm-devel] [PATCH 20/22] dm: Don't save bvec anymore X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com Now that drivers have been converted to the bvec_iter primitives, they shouldn't be modifying the biovec anymore and thus saving it is unnecessary. Signed-off-by: Kent Overstreet Cc: Alasdair Kergon Cc: dm-devel@redhat.com --- drivers/md/dm-bio-record.h | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/drivers/md/dm-bio-record.h b/drivers/md/dm-bio-record.h index 4f46e8e..dd36461 100644 --- a/drivers/md/dm-bio-record.h +++ b/drivers/md/dm-bio-record.h @@ -17,49 +17,24 @@ * original bio state. */ -struct dm_bio_vec_details { -#if PAGE_SIZE < 65536 - __u16 bv_len; - __u16 bv_offset; -#else - unsigned bv_len; - unsigned bv_offset; -#endif -}; - struct dm_bio_details { struct block_device *bi_bdev; unsigned long bi_flags; struct bvec_iter bi_iter; - struct dm_bio_vec_details bi_io_vec[BIO_MAX_PAGES]; }; static inline void dm_bio_record(struct dm_bio_details *bd, struct bio *bio) { - unsigned i; - bd->bi_bdev = bio->bi_bdev; bd->bi_flags = bio->bi_flags; bd->bi_iter = bio->bi_iter; - - for (i = 0; i < bio->bi_vcnt; i++) { - bd->bi_io_vec[i].bv_len = bio->bi_io_vec[i].bv_len; - bd->bi_io_vec[i].bv_offset = bio->bi_io_vec[i].bv_offset; - } } static inline void dm_bio_restore(struct dm_bio_details *bd, struct bio *bio) { - unsigned i; - bio->bi_bdev = bd->bi_bdev; bio->bi_flags = bd->bi_flags; bio->bi_iter = bd->bi_iter; - - for (i = 0; i < bio->bi_vcnt; i++) { - bio->bi_io_vec[i].bv_len = bd->bi_io_vec[i].bv_len; - bio->bi_io_vec[i].bv_offset = bd->bi_io_vec[i].bv_offset; - } } #endif