From patchwork Sat Jun 9 12:30:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 10455615 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 12AAB6053F for ; Sat, 9 Jun 2018 12:34:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0444A1FF83 for ; Sat, 9 Jun 2018 12:34:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EACD2223A6; Sat, 9 Jun 2018 12:34:53 +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 904381FF83 for ; Sat, 9 Jun 2018 12:34:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 883D76B028C; Sat, 9 Jun 2018 08:34:52 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 833256B028E; Sat, 9 Jun 2018 08:34:52 -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 74C786B028F; Sat, 9 Jun 2018 08:34:52 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qt0-f197.google.com (mail-qt0-f197.google.com [209.85.216.197]) by kanga.kvack.org (Postfix) with ESMTP id 496726B028C for ; Sat, 9 Jun 2018 08:34:52 -0400 (EDT) Received: by mail-qt0-f197.google.com with SMTP id n33-v6so14196506qte.23 for ; Sat, 09 Jun 2018 05:34:52 -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=3niy5+2Z1MF6VDZsYuBE1MlFQYPFclrPYantNo2/5xI=; b=me61qU/3NMjt2xXn6P16LDn0qr0pHRce5l3enrtK2w4OQhKXKLfdxXPXvNO0UoCg04 2KXgoiHIiQUpn258PNjAdEFtXh26ijBuYnTJ1FXWD+kNgDlR85qjZLXmQmUVe5Wm+4de 3LEU0MX7NhBBQbnangAgKfuG0Z3F+dYAE2fPF5Y85wxKZbxogVhA9m3QOL3eMxHgsc0u ZU29VMsMrY5YXS+4v7lMtvhlAreNhnupIjwNLDdgjftEPZOwrnoI8FXrG5xHajOKbr4N /x1uFzspYlf6/X+sXYboJYClEgz1NAxuACmAmRfMlPqv+02SJzwj/CdpqBsh6hXXZUsJ upJg== 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: APt69E0yWd1OBUtd+PbANc6SD6qnrH+LGQIXpF6AV/TYSbp7OzYwihRu 1o3sPS3es4nmgQz36MPzsfLCupHH2yOm90ORDQYqrv+9YKFQTS98QGK9blOSol3KweGxD7OY14V EwDP5M6R9WWWf4kQ2b1MUsIWwYmlKEXykANOVjNK1vkxErKkiwzZEMhS03E/YmyNeLQ== X-Received: by 2002:a0c:e5c5:: with SMTP id u5-v6mr8920922qvm.248.1528547692108; Sat, 09 Jun 2018 05:34:52 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI8n49OsbHRj76rhddxrr2J2ZVir/hyEsvXZSMTraImfxY1JWqkYBGoXiabfBUq3Ea8QRFA X-Received: by 2002:a0c:e5c5:: with SMTP id u5-v6mr8920898qvm.248.1528547691570; Sat, 09 Jun 2018 05:34:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528547691; cv=none; d=google.com; s=arc-20160816; b=yaKPpXNjTkPxn/jS7Iz7qrDKpBxEL5j7njXsmmy5q8I3wepw6o70UI/SfAsVOb9I7r am3gX75HhBPLb4JBy10c6/IHyL7WQ7XdMDxFgiT4ErDCZiVqqd3JTHRNnwne1olrOFlP Es0+IDFloswXgqYhFwaMlWf4qJNzmbEGoF2mErwsLgVlrhKUASml3LSqtv4TROS4hTA3 JRUPxRrW7Ek6GFlSU+5psqpT9y+5tFdNSSJlyGGtLbZlXhejtVuUpprWvL3TsNWIYhK1 MduwR5B3bPJipdmRE6ic8q2cZG6RzgneonAZRmXLwyymjWpqDZMKoagcmzGmOYZRPS2T rJjQ== 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=3niy5+2Z1MF6VDZsYuBE1MlFQYPFclrPYantNo2/5xI=; b=FFKlCCnHpAGXdrPp1+g/2dKqOXDw04vmMLxEDTAxFrdQh74t7lviS+mUviEkbryPlz 0rz87rXe1r+6eDVcoI5WDusErJODF4KJiUa1JOZ2vvjDpSfi+GgsykpkU0er70OJd/sN 5mU8nvU4dNju+vqOPCZ0qzmpQiZtdvw3rzCJlU83oIF+2IsiqaChGXeUUen6hTAriLzG 29cu9OcwCsDK+7Cl56BqD9630mqw2JPtX5iEPn2ccz30Il3jC3wh82afF3RKKxKUmYBG s8ExOCmClq5Mm2UVcS0p8gJ1rueNz1K9cPLn9q1ae5fIPXl91jHTCzFgEEOcLp3zg7bl /tbg== 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 h18-v6si8416888qtb.333.2018.06.09.05.34.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Jun 2018 05:34:51 -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 140E4406E897; Sat, 9 Jun 2018 12:34:51 +0000 (UTC) Received: from localhost (ovpn-12-40.pek2.redhat.com [10.72.12.40]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6ED3042236; Sat, 9 Jun 2018 12:34:42 +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 , Randy Dunlap , Ming Lei Subject: [PATCH V6 22/30] ext4: conver to bio_for_each_chunk_segment_all Date: Sat, 9 Jun 2018 20:30:06 +0800 Message-Id: <20180609123014.8861-23-ming.lei@redhat.com> In-Reply-To: <20180609123014.8861-1-ming.lei@redhat.com> References: <20180609123014.8861-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.7]); Sat, 09 Jun 2018 12:34:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Sat, 09 Jun 2018 12:34:51 +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_segment_all() can't be used any more after multipage bvec is enabled, so we have to convert to bio_for_each_chunk_segment_all(). 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 db7590178dfc..d4e737e51176 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_chunk_iter citer; - bio_for_each_segment_all(bvec, bio, i) { + bio_for_each_chunk_segment_all(bvec, bio, i, citer) { 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 9ffa6fad18db..234e4486a90c 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_chunk_iter citer; 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_segment_all(bv, bio, i) { + bio_for_each_chunk_segment_all(bv, bio, i, citer) { struct page *page = bv->bv_page; if (!bio->bi_status) {