Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755347AbcDNMGz (ORCPT ); Thu, 14 Apr 2016 08:06:55 -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 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 683 Lines: 25 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; } -- 1.9.1