From patchwork Fri May 25 03:46:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 10426125 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 13B07602D6 for ; Fri, 25 May 2018 03:51:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00DF6295A6 for ; Fri, 25 May 2018 03:51:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E9341295B3; Fri, 25 May 2018 03:51:40 +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=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8658A295A6 for ; Fri, 25 May 2018 03:51:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A037F6B02BE; Thu, 24 May 2018 23:51:39 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 9BDEB6B02C0; Thu, 24 May 2018 23:51:39 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 852706B02C1; Thu, 24 May 2018 23:51:39 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk0-f199.google.com (mail-qk0-f199.google.com [209.85.220.199]) by kanga.kvack.org (Postfix) with ESMTP id 57F836B02BE for ; Thu, 24 May 2018 23:51:39 -0400 (EDT) Received: by mail-qk0-f199.google.com with SMTP id l7-v6so2993317qkk.20 for ; Thu, 24 May 2018 20:51:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=LlV2KufI0o/YeDYSKgBc9k059ri1adKmgALSIRvFcyU=; b=seCxzLsbL2JD4gmVB6WJ0nujT0g5UjD/3avG+aciY1/OjQVWm+eQdoL7fsxx8c+Zzu OSIp6zlphZSnuS9ZPHt85P9BE/QOCZHgaY5BpgVmNWw9pQWwVDufsd/powcXo+TNzOP9 vGcHwI8FckjiK2yJHY/SmYuVYwInhhG/Zu3ptFLWBWRNAZTISC2zkFTL9Y9aa+u3bec5 /m07Yc9TkcYSWGEW3VxKuXKU22D+28bNrzLnn1yrX/nnjoVtAtHmvcVIvOgpM6hgxoQG tjfpB9WKfmLMwRKfkvlSX12VLePNeN5P3/BsjP/y9ht3Br90bO+fnhMnUInDa7szB7Yo QfKw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 66.187.233.73 as permitted sender) smtp.mailfrom=ming.lei@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Gm-Message-State: ALKqPweYaq51tuRRJoJ8gkgIJ0LiB1QjfoYV/xCGwLrDEWXcz2De1aNI 7k6Pw8gnY5nCRNiQxVz7ryS3rtwISF0aW/0IS+KdidO1sbcv2ZvxsLAPaukezXJIC9dUz5o4TUi 9aqzK+LslTSdHJtJVoqZJXTKOznsVe1wdxCs4OtiXlV2v8gwXkHIEjqFb9M1TKMassA== X-Received: by 2002:a37:d14f:: with SMTP id s76-v6mr562341qki.324.1527220299166; Thu, 24 May 2018 20:51:39 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL/gzTLgaHftcSPaRb9FUBy7eLwJYMQPZNFIiDOoAA/yydUr2GtgbSBXhRrO5OD439CRIEk X-Received: by 2002:a37:d14f:: with SMTP id s76-v6mr562320qki.324.1527220298668; Thu, 24 May 2018 20:51:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527220298; cv=none; d=google.com; s=arc-20160816; b=en5RmYRgsc7IcWNMlZfp9u8VWCNoiLtFtSXpFdC0Wf1TTWw4cZcnBZfNvzkhaIN49v Hti0koN13DIqaefIEn7IXTXi2t7Nskr+SNUijS/D/FwFaFQqN9xYP79WMBu7ujfias1C XeB7U7ddqlkEIgRXzjmjQ+yS51Cn60jB9wpWK43w4ErgYYxSXEwxzvQ5twPu6qgGF65j Ec76CDAgPmqFhTdFJ0b79EbKerHeXntDiqmQOxu4ToikkdYxuys3KgwzIEt+Xsc9OYct SJ0ve1pWW8Evt0oNHUYSIvCj00d3Wxm6J42RDqdLJw4+3rCrTzjTlvzGQhTR/QM2fic5 nwxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=LlV2KufI0o/YeDYSKgBc9k059ri1adKmgALSIRvFcyU=; b=qK/N3nzHG7oCMUGCFevm/XLQrWsp1Y2TN4FqQlrlhiNZLyv/CCIFhQ7JnBJ0rRjoCa r7t5w1qKyn6hwwXTxsqgPZfCb8g5Jg6sDw6O2zH5cJmg9mVLgCUEBbEa/YesK3r4X8uX /bwcN/3lGusmJqbhQLgAfm7dWvFFajQMrwO9DlM9K51GRHFIWyhKDJ32Sdg7t2kgsUdV KJfWLHdtb5wF36WGVFC9AK2idsDnIgSGo9PcLOHGBeOK4p6K9VaCsGBstkzWaoHu2t7c 66X8lGqiVgDy4tWmIAty9kSXcL6CssOOru7RfcO2OTP3eZWQc9HYgw78O239f8AYsb67 /1iQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 66.187.233.73 as permitted sender) smtp.mailfrom=ming.lei@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from mx1.redhat.com (mx3-rdu2.redhat.com. [66.187.233.73]) by mx.google.com with ESMTPS id q17-v6si8400976qvn.178.2018.05.24.20.51.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 May 2018 20:51:38 -0700 (PDT) Received-SPF: pass (google.com: domain of ming.lei@redhat.com designates 66.187.233.73 as permitted sender) client-ip=66.187.233.73; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 66.187.233.73 as permitted sender) smtp.mailfrom=ming.lei@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 47ABD40704B8; Fri, 25 May 2018 03:51:38 +0000 (UTC) Received: from localhost (ovpn-12-30.pek2.redhat.com [10.72.12.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 41FBA2166BB2; Fri, 25 May 2018 03:51:30 +0000 (UTC) From: Ming Lei To: Jens Axboe , Christoph Hellwig , Alexander Viro , Kent Overstreet Cc: David Sterba , Huang Ying , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Theodore Ts'o , "Darrick J . Wong" , Coly Li , Filipe Manana , Ming Lei Subject: [RESEND PATCH V5 26/33] exofs: conver to bio_for_each_page_all2 Date: Fri, 25 May 2018 11:46:14 +0800 Message-Id: <20180525034621.31147-27-ming.lei@redhat.com> In-Reply-To: <20180525034621.31147-1-ming.lei@redhat.com> References: <20180525034621.31147-1-ming.lei@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 25 May 2018 03:51:38 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 25 May 2018 03:51:38 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'ming.lei@redhat.com' RCPT:'' X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP bio_for_each_page_all() can't be used any more after multipage bvec is enabled, so we have to convert to bio_for_each_page_all2(). Signed-off-by: Ming Lei --- fs/exofs/ore.c | 3 ++- fs/exofs/ore_raid.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/exofs/ore.c b/fs/exofs/ore.c index fe81fd6fe553..2a7e93f21695 100644 --- a/fs/exofs/ore.c +++ b/fs/exofs/ore.c @@ -406,8 +406,9 @@ static void _clear_bio(struct bio *bio) { struct bio_vec *bv; unsigned i; + struct bvec_iter_all bia; - bio_for_each_page_all(bv, bio, i) { + bio_for_each_page_all2(bv, bio, i, bia) { unsigned this_count = bv->bv_len; if (likely(PAGE_SIZE == this_count)) diff --git a/fs/exofs/ore_raid.c b/fs/exofs/ore_raid.c index 2c3346cd1b29..bb0cc314a987 100644 --- a/fs/exofs/ore_raid.c +++ b/fs/exofs/ore_raid.c @@ -433,11 +433,12 @@ static void _mark_read4write_pages_uptodate(struct ore_io_state *ios, int ret) /* loop on all devices all pages */ for (d = 0; d < ios->numdevs; d++) { struct bio *bio = ios->per_dev[d].bio; + struct bvec_iter_all bia; if (!bio) continue; - bio_for_each_page_all(bv, bio, i) { + bio_for_each_page_all2(bv, bio, i, bia) { struct page *page = bv->bv_page; SetPageUptodate(page);