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: 8835111 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 51FA29F3A0 for ; Thu, 14 Apr 2016 12:07:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 99AE42020F for ; Thu, 14 Apr 2016 12:07:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C05C920109 for ; Thu, 14 Apr 2016 12:07:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755019AbcDNMGy (ORCPT ); Thu, 14 Apr 2016 08:06:54 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:34213 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754985AbcDNMDj (ORCPT ); Thu, 14 Apr 2016 08:03:39 -0400 Received: by mail-oi0-f65.google.com with SMTP id q133so9554771oib.1; 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=KbV4waSfEhoUZ7mUzOXHhnNGzupyeKQz3OMWWUOVAM97VtkA41JSeoZypNRh9xohKp /bFgS64htA2QnDTDTPN7FIi7uxvdHo+52vZ2FQnTe8wr/n50/jcdWUrTWUMnoI96W+ts DrfUH+LqBaa+EUiQ5tf5FtcqcOnRBhfqAsKKNY+ZP5+LRovpHplICvCabDj5X5eI4JUX szOf2hDtbPEZH7vBBZMUPzbyr/WQRkYJ9FSW4gJFheQdZHairof/Mln4LQR7a/Vvahf1 cESBOQI/9AtFJBNhnjSOdXYXsdfMMyWfmgLmmH/sYEfjSGevj0TkRV4wer7xSFY8iqq7 4Yyw== X-Gm-Message-State: AOPr4FVSsX93lgVfzjX+DYDNrlt4bn0Vay4vlu8zWviAtzURLYaEn43ljou21Si2AfpjZA== 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 Cc: linux-block@vger.kernel.org, Christoph Hellwig , Ming Lei , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com (maintainer:DEVICE-MAPPER (LVM)), Shaohua Li , linux-raid@vger.kernel.org (open list:SOFTWARE RAID (Multiple Disks) SUPPORT) Subject: [PATCH v1 18/27] dm: dm-io.c: use bio_get_base_vec() Date: Thu, 14 Apr 2016 20:02:36 +0800 Message-Id: <1460635375-28282-19-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460635375-28282-1-git-send-email-tom.leiming@gmail.com> References: <1460635375-28282-1-git-send-email-tom.leiming@gmail.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org 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; }