From patchwork Thu Apr 14 12:02:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 8835361 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 33CE59F36E for ; Thu, 14 Apr 2016 12:13:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5284E201D3 for ; Thu, 14 Apr 2016 12:13:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8061820173 for ; Thu, 14 Apr 2016 12:13:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754127AbcDNMMv (ORCPT ); Thu, 14 Apr 2016 08:12:51 -0400 Received: from mail-ob0-f196.google.com ([209.85.214.196]:33179 "EHLO mail-ob0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754508AbcDNMDP (ORCPT ); Thu, 14 Apr 2016 08:03:15 -0400 Received: by mail-ob0-f196.google.com with SMTP id js7so4888663obc.0; Thu, 14 Apr 2016 05:03:14 -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=KJp7rEzN5gs7Izp89FP/odWXsm9C0l5cNCHUuRGfYa8=; b=ZQsbMWgRxqncSW1xb7gyhnxiL2qQigp56jWItDl+7BOHNc/U8cd7uqjJhZKrvrFmAv I5xbbyy20WaAMgexU3qOTwhTDMAeHEECisG16v77/S2ICnxuJCQOG5fCZEQ0EnrMUQ0m DGyp0KWJxZ6AKTIDrOCFP6Lel+FDZsBag3SsG8nBtzJ66WKmP0AYb3NqfU8nj8yVVpKr 9tCkIdx1iuKaTIeXhNZQIY5o7e3l7LhFVVmeuQt1BLh+ii3qaDPxQOS1P8+zXb0+8DL1 HJbg7pPBTztRu8dXsuaQ7ip7Mo1XuHr9H/mtHowo63ZXghnrdACquFydiupz6XoVYOpc dhHw== 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=KJp7rEzN5gs7Izp89FP/odWXsm9C0l5cNCHUuRGfYa8=; b=hZKjtRvZIDgdbre587J3iqk0z14JSu9OA21H2O8BleS9/im0o3bSWxBedGV+EeQBEn qe60MKnOsOCWEqAtpicSTkov1PmGmG4iNGltQuQ/YFuyw3llSPauGLcumJAaRMucMc0z hOzVmgumRfm0rh7tyZLfUp753roQLhsvlBUnu0oo7l58XrFF6db3T3GfpVEinAPOkUZY 6MxlxDcO6JQGTY4dfPW8EfNr4Uu5in8c2rXsR2FzpUWFAy06bt3QTwXmJzrYqhhNLMCF 0KnGLwHpvsugpCHFG3ez5QZmq4cR3hffvBgDwC01vDRV2sAlZ7CKD2k2ZNcq6TLRH16l 6/MQ== X-Gm-Message-State: AOPr4FU71aRBI9tNq0cwMEGLaVfcqg7kbTBCJelSyxYr6qTuG8GbgPSO21hmVSCdknPWfg== X-Received: by 10.60.147.228 with SMTP id tn4mr7350635oeb.33.1460635394125; Thu, 14 Apr 2016 05:03:14 -0700 (PDT) Received: from localhost ([12.228.154.70]) by smtp.gmail.com with ESMTPSA id b7sm5857957oej.16.2016.04.14.05.03.13 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 14 Apr 2016 05:03:13 -0700 (PDT) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Ming Lei , Philipp Reisner , Lars Ellenberg , drbd-dev@lists.linbit.com (open list:DRBD DRIVER) Subject: [PATCH v1 02/27] block: drbd: use bio_get_base_vec() to retrieve the 1st bvec Date: Thu, 14 Apr 2016 20:02:20 +0800 Message-Id: <1460635375-28282-3-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=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/block/drbd/drbd_bitmap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c index 92d6fc0..ccbd1e0 100644 --- a/drivers/block/drbd/drbd_bitmap.c +++ b/drivers/block/drbd/drbd_bitmap.c @@ -938,7 +938,9 @@ static void drbd_bm_endio(struct bio *bio) struct drbd_bm_aio_ctx *ctx = bio->bi_private; struct drbd_device *device = ctx->device; struct drbd_bitmap *b = device->bitmap; - unsigned int idx = bm_page_to_idx(bio->bi_io_vec[0].bv_page); + /* single bvec bio */ + const struct bio_vec *bvec = bio_get_base_vec(bio); + unsigned int idx = bm_page_to_idx(bvec->bv_page); if ((ctx->flags & BM_AIO_COPY_PAGES) == 0 && !bm_test_page_unchanged(b->bm_pages[idx]))