From patchwork Mon Sep 24 22:34:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 1500981 Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by patchwork2.kernel.org (Postfix) with ESMTP id 1F74ADF280 for ; Mon, 24 Sep 2012 22:40:55 +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 q8OMbGQs030612; Mon, 24 Sep 2012 18:37:16 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q8OMZw3m009285 for ; Mon, 24 Sep 2012 18:35:58 -0400 Received: from mx1.redhat.com (ext-mx13.extmail.prod.ext.phx2.redhat.com [10.5.110.18]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q8OMZrVP028084 for ; Mon, 24 Sep 2012 18:35:53 -0400 Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8OMZUrJ027107 for ; Mon, 24 Sep 2012 18:35:52 -0400 Received: by mail-pa0-f46.google.com with SMTP id hz1so1170114pad.33 for ; Mon, 24 Sep 2012 15:35:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=cLAcPPZ8JEj4MK+CJ/OII1IoaDwbG6qGUGXX9HCPdKI=; b=CA1aSMTnmjiVBzqpcxc/ks6x0+VHKl37g7Wulp14MGgS/PlhYkChAiSsrH9KuRyzKU ZRlLxBXlzXANBRLJkwqk6SvAQqYV1sYAO1due38tBInydDwZ1UyNZ0MBcpziX2op97KM g7CEiOkxRWHo4eq5ZqOn/M8yGsM5HB9kHp66XwvLwuM9vJlFrDRGrwx02LzowUxBRbb7 a3uZQyWhfD6pyJWotO9Csp2eVWYEq9FAqh7XCo9AoIpTSOXm8L8L24np1f/JuiowZEZM QaQ4T2FuAzm+eb2lU+Jm6QuN+rIITwx6T1AbTlsEbBko87aL201OA0gPt8uaZmCJ5SNH r4JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=cLAcPPZ8JEj4MK+CJ/OII1IoaDwbG6qGUGXX9HCPdKI=; b=edezZeK4WiCG7OtNSMXmrV9OzfjPL9aGAyWB6dFiZDfWXZGO6ISzZ4TTVj4zgl9ewM FYXq8Wa6ZsgCM6LL+gHNPRUIRt+1Pz0OFaq/tlvtWjmLVdXPELoFxQtTxRBe2ppPcM0f 5tqWlHGgnz9r0r/SZ/tiMdlQ+posmipsuq6u/6EvTb0PzHidQbnMePffYZ1n0WVkDhyL mh0eIZXpSaoUwjyAFKpeg7SYlmodKGbEX/COzZfm+sfCs++mW6+XyIBlfbQIYLNhwJa+ u/fmKWwWbp//lIL2REfhz8J7Q++fQzAMeMhqQ79xcN3khWPc8M+istErGmZll6Sv7M32 kyHw== Received: by 10.68.221.70 with SMTP id qc6mr41113106pbc.92.1348526152538; Mon, 24 Sep 2012 15:35:52 -0700 (PDT) Received: by 10.68.221.70 with SMTP id qc6mr41113069pbc.92.1348526152301; Mon, 24 Sep 2012 15:35:52 -0700 (PDT) Received: from formenos.mtv.corp.google.com (formenos.mtv.corp.google.com [172.18.110.66]) by mx.google.com with ESMTPS id nu8sm133316pbc.45.2012.09.24.15.35.51 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 24 Sep 2012 15:35:51 -0700 (PDT) From: Kent Overstreet To: linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org, dm-devel@redhat.com Date: Mon, 24 Sep 2012 15:34:59 -0700 Message-Id: <1348526106-17074-20-git-send-email-koverstreet@google.com> In-Reply-To: <1348526106-17074-1-git-send-email-koverstreet@google.com> References: <1348526106-17074-1-git-send-email-koverstreet@google.com> X-Gm-Message-State: ALoCoQliVhYOnZsbPlsLAZLDK9uzzh0DHKq+llGxPer/lfx1fGIAtgPzJWMPHH4ZmOvTYs/R4IBQNZRgKUsjoaZQ1LOMS3B0NfLAJvM6uB9wlfdbNEIR8s5YbftmouwzRLOiv4Hg07TmtpQKMQVTVe0KCq9vyOVE9LF95gKVKBnxrIsjQPVAvvkvDa/ek80ikV3Mka6Q4eox X-RedHat-Spam-Score: -3.512 (BAYES_00, 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.24 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.18 X-loop: dm-devel@redhat.com Cc: tj@kernel.org, axboe@kernel.dk, Kent Overstreet , vgoyal@redhat.com Subject: [dm-devel] [PATCH v3 19/26] raid1: use bio_copy_data() 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 This doesn't really delete any code _yet_, but once immutable bvecs are done we can just delete the rest of the code in that loop. Signed-off-by: Kent Overstreet CC: Jens Axboe CC: NeilBrown --- drivers/md/raid1.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index af39f74..1c40d90 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -1895,10 +1895,9 @@ static int process_checks(struct r1bio *r1_bio) else bi->bv_len = size; size -= PAGE_SIZE; - memcpy(page_address(bi->bv_page), - page_address(pbio->bi_io_vec[j].bv_page), - PAGE_SIZE); } + + bio_copy_data(sbio, pbio); } return 0; }