From patchwork Tue Apr 5 12:07:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 8750731 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 4EF3B9F36E for ; Tue, 5 Apr 2016 12:08:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8766F203A5 for ; Tue, 5 Apr 2016 12:08:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A506A20117 for ; Tue, 5 Apr 2016 12:08:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932762AbcDEMIk (ORCPT ); Tue, 5 Apr 2016 08:08:40 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:33051 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758315AbcDEMIh (ORCPT ); Tue, 5 Apr 2016 08:08:37 -0400 Received: by mail-pa0-f66.google.com with SMTP id q6so1146623pav.0; Tue, 05 Apr 2016 05:08:37 -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=OkiB4Zf0Kf+7yMiU+t7IXYBQnkC2PwQZ+45s4VQmczhEjJAMQeqodO3Z4Q1GTMsPwM 8N0U4/lrtA1sUepsha2gQsXhUF7vwV80sUvl0YNqBTdGPaNd0QUIK1DDtPzSaWs93RG3 sE/H3HWIG6uC7H+gRDe3bwwMeNQGEr5T1eM9l9slwoBiX08L9RbSUZcYkR5dZJyIoVSH yq2T10idP/6lMjGzybuL79q6jQvdCFedBhOv1IBnOx73TvLDcH81Hj0Uegy1hnhHWpEc Uyj3nbsk6OClbazPFhO35SzvklVQ8BZjZbwmqWMXVCX180Qk44O813XPXYHldsknzvOW MyAA== 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=JjcS4JrUL64Ceb7+sbQXbCDPafFaFxIxhwbMjxuPNRUimNqWDdwBME8OhnSaAZj9L3 dGUMceINYEOSqt3F4uTZFTdg0GhooXaTKZobZgq6bRb7qV0WbLwmKzh3orAufyGw5Qba eJE1jTSoVSdmQMODct9I59x+h/468r+qA2fcoSROnLQ1lw/LipXXbO9ZBO3lqkgpu5Fv fLUmSior+xNVpbWg/dROs+CqLJ4miESLHBORC/KZHlF56KYL7UELZnduUez+zBV0BxbK 2HrGYdKtRmZvFJHeng8BwCe2wI+AhcHXJGjyg5/S979btBG3sxzTUeVL81EmyQ+7DGZL 21Gw== X-Gm-Message-State: AD7BkJIpK317R2NWNerK7Y7hMWapnGOfueGEvcmllKbrw74bOVsUrfH/qJp1cnLbBbmdmA== X-Received: by 10.67.21.167 with SMTP id hl7mr61033150pad.16.1459858116996; Tue, 05 Apr 2016 05:08:36 -0700 (PDT) Received: from localhost (56.34.213.162.lcy-01.canonistack.canonical.com. [162.213.34.56]) by smtp.gmail.com with ESMTPSA id b82sm27801943pfd.89.2016.04.05.05.08.35 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 05 Apr 2016 05:08:36 -0700 (PDT) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Boaz Harrosh , 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 18/27] dm: dm-io.c: use bio_get_base_vec() Date: Tue, 5 Apr 2016 20:07:33 +0800 Message-Id: <1459858062-21075-4-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1459858062-21075-1-git-send-email-tom.leiming@gmail.com> References: <1459858062-21075-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=ham 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; }