From patchwork Tue Dec 27 16:04:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9489591 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D4DCA62AB0 for ; Tue, 27 Dec 2016 16:12:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C74D6223B2 for ; Tue, 27 Dec 2016 16:12:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B961425D99; Tue, 27 Dec 2016 16:12:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 702E525D99 for ; Tue, 27 Dec 2016 16:12:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932972AbcL0QMR (ORCPT ); Tue, 27 Dec 2016 11:12:17 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:33089 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932937AbcL0QGb (ORCPT ); Tue, 27 Dec 2016 11:06:31 -0500 Received: by mail-pg0-f68.google.com with SMTP id g1so12811209pgn.0; Tue, 27 Dec 2016 08:06:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MblcQ6D7xnOUdzGL3KGpApjtH7zhp2+bIe0jxwzbu6Y=; b=PnZiQNgyIPjRCU6wAhSG2tmEwSeom0DJL28Ho7MdHV20MyTSOxavHVBO6AE35jiDLw KIkCkjDhl4ZMEjjh0zlnC0otZKO9ObOcZL0j+Sbf8uCd1IV5AlWvOI7Whvw1JsW0jNqL 6CxKdBIWHDR6BaFjq9no8PZ2H1o3HlaJ5zpYv0/Qu7znS71g9S/7BVh8JsFAj5VqCF1v xSmGNS1U1i7Px4dsVvlYoZpCvZt9ejl+oG2F3HzqZNTf8EZTS0sTD1z0thYvyk1ZNBlw bY1VdRDAfcww4JZ7M2KfTe1mT58lQ+uhj/Aw2aQ77HxvgRetYgk9XX6yDHeWABecgJU4 1owQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MblcQ6D7xnOUdzGL3KGpApjtH7zhp2+bIe0jxwzbu6Y=; b=FP6oFJ5iDvdOVFgq4n2qN2bFjqnxuNz/Tnzsw0Vh+BNE1QtSoniSsJ4KxaDH3yRwE8 zqleW7lQ95BD6dsGWCW5InO2Uc2GKsJQh/DEnAxcrgzFrgCsSvyHdcHcoh0Oa9UA5d4I LWYJJspw6toizpKbHLilzD5QGFUMreyMvhKsfPG34OL7w+ECTNbw00w82mSQYFW58Af2 ZsOCDJveGwbGiAHPK/NV201Qb5/9ilxvNLthbcgm28QcjWEpKkStJr6pkQJyKOju9wzX cERWwaJA+akk2U+NaLnpok+r9LwgzLP4hND+wWIkIn8Gc7BrhR02RFc9zIxE7cMGBe8x jjMw== X-Gm-Message-State: AIkVDXL4PieWE7MZz+hJYN7fDVA92SJniYDQUPMn7r+EL9r8AiRXBjGyKxrQaRyfTifHBg== X-Received: by 10.98.65.72 with SMTP id o69mr30707779pfa.128.1482854789899; Tue, 27 Dec 2016 08:06:29 -0800 (PST) Received: from localhost ([45.35.47.137]) by smtp.gmail.com with ESMTPSA id m3sm34389765pgn.40.2016.12.27.08.06.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Dec 2016 08:06:28 -0800 (PST) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Ming Lei , Steven Whitehouse , Bob Peterson , cluster-devel@redhat.com (open list:GFS2 FILE SYSTEM) Subject: [PATCH v1 43/54] gfs2: convert to bio_for_each_segment_all_sp() Date: Wed, 28 Dec 2016 00:04:52 +0800 Message-Id: <1482854706-14128-12-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482854706-14128-1-git-send-email-tom.leiming@gmail.com> References: <1482854706-14128-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-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Ming Lei --- fs/gfs2/lops.c | 3 ++- fs/gfs2/meta_io.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index b1f9144b42c7..ddbd1f772cdb 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c @@ -208,13 +208,14 @@ static void gfs2_end_log_write(struct bio *bio) struct bio_vec *bvec; struct page *page; int i; + struct bvec_iter_all bia; if (bio->bi_error) { sdp->sd_log_error = bio->bi_error; fs_err(sdp, "Error %d writing to log\n", bio->bi_error); } - bio_for_each_segment_all(bvec, bio, i) { + bio_for_each_segment_all_sp(bvec, bio, i, bia) { page = bvec->bv_page; if (page_has_buffers(page)) gfs2_end_log_write_bh(sdp, bvec, bio->bi_error); diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c index 49db8ef13fdf..317cc8ed74ce 100644 --- a/fs/gfs2/meta_io.c +++ b/fs/gfs2/meta_io.c @@ -190,8 +190,9 @@ static void gfs2_meta_read_endio(struct bio *bio) { struct bio_vec *bvec; int i; + struct bvec_iter_all bia; - bio_for_each_segment_all(bvec, bio, i) { + bio_for_each_segment_all_sp(bvec, bio, i, bia) { struct page *page = bvec->bv_page; struct buffer_head *bh = page_buffers(page); unsigned int len = bvec->bv_len;