From patchwork Fri May 25 03:46:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 10426111 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 D5BA2602D6 for ; Fri, 25 May 2018 03:51:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6943295A4 for ; Fri, 25 May 2018 03:51:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB27A295A6; Fri, 25 May 2018 03:51:09 +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 62CBE295A4 for ; Fri, 25 May 2018 03:51:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 76C026B02B8; Thu, 24 May 2018 23:51:08 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 6F1EE6B02BA; Thu, 24 May 2018 23:51:08 -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 593886B02BB; Thu, 24 May 2018 23:51:08 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qt0-f199.google.com (mail-qt0-f199.google.com [209.85.216.199]) by kanga.kvack.org (Postfix) with ESMTP id 2F8996B02B8 for ; Thu, 24 May 2018 23:51:08 -0400 (EDT) Received: by mail-qt0-f199.google.com with SMTP id m20-v6so2838146qtm.6 for ; Thu, 24 May 2018 20:51:08 -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=F5D4S5XGRBMvNwWw2SeItz+UyCLm+CsiwNxRb6u5yOA=; b=MZVwnzJIMnuA2DS1ug0L5SxXvWVhwycysmJwBWB3HCZMXXWYeEhEnoeD879HYfGip/ oXfENYZEUXjH8tgHd8sAiTLenD4lSWdqWPUmebAYm68P8wxlIFIxtmTTlE8V0jpi7xIE Y4eW/rCQme3cIA38yqS9cIFaU2IHeEh554J+HDhEIkIyK/q3W3kmgWQTrUGrj64IqBpI gd+GUwVB52eqkpKbhXrMzIxeCc8zL0TZz5D0u0dIYuixxKP5lUVqTU0xuCCX8PV/CM/o AtOGuwtQsnfPy+6Jqtc0QKJ3lCsCD8lYI0tKvJ9AYaeuKyB5pd9F0g3V2tOOiIVdNLrx RoBA== 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: ALKqPwdwkyJilv59wBIrKTD/U8DjGepXaXYjE+0Fp5x0qIWOPpObbWRh YSdmyIY0GfM50+PWbMY+JAtVMcSs+vB/EYDxXqJ0lDi4fXxt7r5l1bvPF/hdda9x+/5Bu5ur4+E qNTtXgY5ip9qRJZHt96dZlewk0p2Yr0bGVIYN5v9itYJz4xNB+U1LP6p/eR/XUZ5OJA== X-Received: by 2002:a0c:d8c1:: with SMTP id w1-v6mr638357qvj.40.1527220268005; Thu, 24 May 2018 20:51:08 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLLa+EyJBws6c+tWeIlfhZ45kEZBW11Aa9vt5PGzon1k8W0EA0pNPGCjcBsgbA59oLviSlQ X-Received: by 2002:a0c:d8c1:: with SMTP id w1-v6mr638336qvj.40.1527220267480; Thu, 24 May 2018 20:51:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527220267; cv=none; d=google.com; s=arc-20160816; b=uil+OKtycNWB1iHnlBrFBdzI2yrvQIaUfWwVPwgjp4fVn0ONFoM56qM4guP8KxAjD+ 7qqBvEUaiDR7UayZIU3XHKfhpu6B5B4gxhM8wiGU1JTf9AGuA32uBE9LRAcMyPUmXXlE YAFfi72VTO1YNDssU3UEdMBcsyVKVSuDMcDbLcTRZrWeRT/kIWcsQlUcPsFcusSnnhEw ping+QRD4Yj5fgInisN3hgZFuJkhDgD0RWXtAYjd1ejPhUliZ6164Nd/6guqHUZNLpjm 2P9zpaa8X3RQXWC/H7tgBNXhMXWxB/LTg627OtZYJKIxqytP4/UYXsKGVwkqzusN1ear fDBw== 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=F5D4S5XGRBMvNwWw2SeItz+UyCLm+CsiwNxRb6u5yOA=; b=Kg55+12p3JMtYCvtUfAtOnbrj7Sa/CbYnvSm8cbPKsubBQmoE5zOWC12dK9WaxdAwO ub+Y5Xoizr1Z4B2+NwGtzBfpYemNucJYfMgR/eQnF5U7E3F/8QPhBe85U+Rc+BfAWG61 Uy9hd7L5WO1OIn84g4R7RjP7jCX6eISFJc7/HO0smc5v6VR6T0pQMGw64tTjprDFa1lv QPuD2S+eWN6SdOQHilHIX5PVwbzlEswHAiuw5EC2W37k/h83yWcbn4CX0qVY6/jrSvtR aIf1MBo5ZlvHYhsHmByQiXeF8XYq4lf1SgQ5w1Tf/UNWpupkGEfGkJ2YHjF6yo/JMlrT DRAg== 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 y140-v6si759128qkb.190.2018.05.24.20.51.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 May 2018 20:51:07 -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-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0DF4340203F4; Fri, 25 May 2018 03:51:07 +0000 (UTC) Received: from localhost (ovpn-12-30.pek2.redhat.com [10.72.12.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 960359457F; Fri, 25 May 2018 03:50:57 +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 23/33] ext4: conver to bio_for_each_page_all2 Date: Fri, 25 May 2018 11:46:11 +0800 Message-Id: <20180525034621.31147-24-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.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Fri, 25 May 2018 03:51:07 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Fri, 25 May 2018 03:51:07 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.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/ext4/page-io.c | 3 ++- fs/ext4/readpage.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c index 52f2937f5603..b56a733f33c0 100644 --- a/fs/ext4/page-io.c +++ b/fs/ext4/page-io.c @@ -63,8 +63,9 @@ static void ext4_finish_bio(struct bio *bio) { int i; struct bio_vec *bvec; + struct bvec_iter_all bia; - bio_for_each_page_all(bvec, bio, i) { + bio_for_each_page_all2(bvec, bio, i, bia) { struct page *page = bvec->bv_page; #ifdef CONFIG_EXT4_FS_ENCRYPTION struct page *data_page = NULL; diff --git a/fs/ext4/readpage.c b/fs/ext4/readpage.c index 572b6296f709..c46b5ff68fa8 100644 --- a/fs/ext4/readpage.c +++ b/fs/ext4/readpage.c @@ -72,6 +72,7 @@ static void mpage_end_io(struct bio *bio) { struct bio_vec *bv; int i; + struct bvec_iter_all bia; if (ext4_bio_encrypted(bio)) { if (bio->bi_status) { @@ -81,7 +82,7 @@ static void mpage_end_io(struct bio *bio) return; } } - bio_for_each_page_all(bv, bio, i) { + bio_for_each_page_all2(bv, bio, i, bia) { struct page *page = bv->bv_page; if (!bio->bi_status) {