From patchwork Sat Oct 29 08:08: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: 9403221 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 6482360588 for ; Sat, 29 Oct 2016 08:16:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51D632A60D for ; Sat, 29 Oct 2016 08:16:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 464502A639; Sat, 29 Oct 2016 08:16:11 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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 1DDC32A615 for ; Sat, 29 Oct 2016 08:16:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966393AbcJ2IQF (ORCPT ); Sat, 29 Oct 2016 04:16:05 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33467 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966389AbcJ2IP7 (ORCPT ); Sat, 29 Oct 2016 04:15:59 -0400 Received: by mail-pf0-f195.google.com with SMTP id a136so4330pfa.0; Sat, 29 Oct 2016 01:15:59 -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=5Oge5k2AD21Fm7IQIa3geYKgCWtmh5vmtWK/8P+8Ers=; b=aSa8XvSpvCx57uZLRZ1ChWpJQvM2SjkVWcBHCF5ZQwNKVPqzDQ6yUjrshCm5AovnpA 0if6DV2fQUonZbY8ccULfD9Btk+PbvcU2czPeCQGFcVSxI5o0/UVD3zQRrqLZmubu+p3 ZUZp92p6g6PiNcBnMQsZXfClvI7HrpoN9RUduefft62yvb5vdI2SdBxCLLmcaxGZDBk8 2DmVe1OMDrrn8ikkOlPoO4HW6PUm2ZFYUZOaocAgSaJRroSAMvYElsj+kecBDNdvtXQl 1yY7ABMTPp8z70SBSQScp75NoTK7/tL+7jJsGy2bL7KU+hD65L22YqkmIof03W7VYXE9 4JNg== 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=5Oge5k2AD21Fm7IQIa3geYKgCWtmh5vmtWK/8P+8Ers=; b=UfqSK6MpqBeHfEkvMl+H/7Ne/vn25HXkyTsuqCTseA7g7GImk9XVdSbe1TyOTAa9+S e3IqxiNPvlMNlZdy8akSr7QvRtqJIU2I721bAX27FAB9kl76p1g6sC0Hzi8m5t2EPyTX +5n6HJkRhWya87C75pE0HHMJKpHo11ubQms0GElRWSvNNQzec+2NDZK2P5LSd2G8awpQ zIbXjmdk0/nlNf3XYGDXgCzE1i9ysvoiDkoJ87iRN81PtwXKLSY0Zxh6eE1ln7iTRncc LAFeB4jeX2NpL6pifKBrw4jOsU1AjFVOBBEfcFtKdnrYbpxw6wrVUs+K7HD0WPCUH29R 1Log== X-Gm-Message-State: ABUngveZIf883reMYGP8FbnKSXGhedIIgEncjut+iwbkVLLKlUAPhi4PFYfmoD3NYaFxEA== X-Received: by 10.99.39.130 with SMTP id n124mr25953678pgn.85.1477728959235; Sat, 29 Oct 2016 01:15:59 -0700 (PDT) Received: from localhost ([45.34.23.101]) by smtp.gmail.com with ESMTPSA id r77sm22220849pfa.85.2016.10.29.01.15.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Oct 2016 01:15:58 -0700 (PDT) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig , "Kirill A . Shutemov" , Ming Lei , Steven Whitehouse , Bob Peterson , cluster-devel@redhat.com (open list:GFS2 FILE SYSTEM) Subject: [PATCH 53/60] gfs2: convert to bio_for_each_segment_all_rd() Date: Sat, 29 Oct 2016 16:08:52 +0800 Message-Id: <1477728600-12938-54-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> References: <1477728600-12938-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 49d5a1b61b06..f03a52e06ce5 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_rd(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 373639a59782..3ab7a8609009 100644 --- a/fs/gfs2/meta_io.c +++ b/fs/gfs2/meta_io.c @@ -191,8 +191,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_rd(bvec, bio, i, bia) { struct page *page = bvec->bv_page; struct buffer_head *bh = page_buffers(page); unsigned int len = bvec->bv_len;