From patchwork Thu Apr 14 12:02:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 8868401 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 27BE6BF29F for ; Mon, 18 Apr 2016 07:26:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 44F3020259 for ; Mon, 18 Apr 2016 07:26:05 +0000 (UTC) Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 667F7200F2 for ; Mon, 18 Apr 2016 07:26:04 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u3I7MFOG024925; Mon, 18 Apr 2016 03:22:15 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u3EC3el6026776 for ; Thu, 14 Apr 2016 08:03:40 -0400 Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3EC3eJY016574 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 14 Apr 2016 08:03:40 -0400 Received: from mail-oi0-f66.google.com (mail-oi0-f66.google.com [209.85.218.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 339EB7F0A7; Thu, 14 Apr 2016 12:03:39 +0000 (UTC) Received: by mail-oi0-f66.google.com with SMTP id w18so9555384oie.2; Thu, 14 Apr 2016 05:03:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dK4+rAwdojLgpafSZl8VrkHQEJa7YqVbifzHqXls3TQ=; b=l0hSonOOb65fQZ9TbUnv+zItcjza0jwgQAOe3co5Bn65Z/BUOSc0Pj/GDLGTKorEU6 TzRFgvO9D2L9/IA2bbuwEv4UEmHRIsVYifNT7cPt1WjuFIE6vuApkuCdYqAwLz6tDFYw 1mqw1SY8HPboq3Lm1KfjqHMxg9hVC9+RyaEIqnaIc+YHzOL6S6VURI1cBiAY8GU8KmWs mw8PWIrc+Eol4v1Vz9eBH5xbrgWVCcxyY/IomUJyi5kB6APPM0HVqYxz1W8iMegnFSpx FW/qQvOL6HGbis23guVsUBs994nxLLXxtv4hwZE/gSWuLcH9AksGydEiTkBB0yybbqEo LBpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=dK4+rAwdojLgpafSZl8VrkHQEJa7YqVbifzHqXls3TQ=; b=jPBwfjzdpQaiaFFO1yVLhg4G6CHH3/8T+G4GLJLU+CHeYS3+P3A1t8pv8+B7vkgAdu 5gSyzQzniqgQFjy1ZLpEE6b7SCdUEmxx1NS0CjoqZXq4LkOj1Dh6m6pcWTY8Jy8HlXPl exAZMbnPmaY/Uh3/4ph8xK4byN34Iz2w98ObdYDcPkWuNC7rmaFEBWp2f9wXI31DTtn4 tjxA3kMFNZXenhjQQmfNcjSjF5yjgHFwYsMVMgney0+7zioRLTlhi6fz1+CcG8GTXJtg T9oozPrOeJiXCUDdX9kLvFeO7HFKC97qhbVoo68ONluZEppBz71Kap8+w9HBB6z78W7R RbwQ== X-Gm-Message-State: AOPr4FXss7xJHMTMrEhJ/9mPr5z/ZEoLfLyNXprHqT0fY2V+3P+RDh61orWhW8/jhr+4+Q== X-Received: by 10.157.27.155 with SMTP id z27mr6772064otd.99.1460635418644; Thu, 14 Apr 2016 05:03:38 -0700 (PDT) Received: from localhost ([12.228.154.70]) by smtp.gmail.com with ESMTPSA id g9sm7921952otc.9.2016.04.14.05.03.37 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 14 Apr 2016 05:03:38 -0700 (PDT) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Date: Thu, 14 Apr 2016 20:02:36 +0800 Message-Id: <1460635375-28282-19-git-send-email-tom.leiming@gmail.com> In-Reply-To: <1460635375-28282-1-git-send-email-tom.leiming@gmail.com> References: <1460635375-28282-1-git-send-email-tom.leiming@gmail.com> X-RedHat-Spam-Score: -0.02 (BAYES_50, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 209.85.218.66 mail-oi0-f66.google.com 209.85.218.66 mail-oi0-f66.google.com X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Scanned-By: MIMEDefang 2.75 on 10.5.110.26 X-loop: dm-devel@redhat.com X-Mailman-Approved-At: Mon, 18 Apr 2016 03:22:14 -0400 Cc: Christoph Hellwig , Mike Snitzer , Ming Lei , linux-block@vger.kernel.org, "maintainer:DEVICE-MAPPER LVM, Shaohua Li , linux-raid@vger.kernel.org open list:SOFTWARE RAID Multiple DisksSUPPORT" , Alasdair Kergon Subject: [dm-devel] [PATCH v1 18/27] dm: dm-io.c: use bio_get_base_vec() X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk 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 X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Ming Lei --- drivers/md/dm-io.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c index 06d426e..6b0e466 100644 --- a/drivers/md/dm-io.c +++ b/drivers/md/dm-io.c @@ -221,7 +221,12 @@ static void bio_dp_init(struct dpages *dp, struct bio *bio) { dp->get_page = bio_get_page; dp->next_page = bio_next_page; - dp->context_ptr = __bvec_iter_bvec(bio->bi_io_vec, bio->bi_iter); + + /* + * need to fix both bio_get_page() and bio_next_page() + * before multipage bvecs + */ + dp->context_ptr = bio_get_base_vec(bio); dp->context_u = bio->bi_iter.bi_bvec_done; }