Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2999471imm; Thu, 24 May 2018 20:52:04 -0700 (PDT) X-Google-Smtp-Source: AB8JxZomHAGkm8PuEabTVcFJzaR1HvgYe96wK/NLoNtrW3h83WAG8ImXcrnJGb4mbquT0xCrF167 X-Received: by 2002:a17:902:6b86:: with SMTP id p6-v6mr810816plk.75.1527220324668; Thu, 24 May 2018 20:52:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527220324; cv=none; d=google.com; s=arc-20160816; b=anxEGYL83kIGQvxsy5kZWejmsrijH1vUvgpvD1VqikzeW/fKy3bk6AQBTTPuRHmX89 FdYWWFkNAA82+5qDeNnJ18kxnRdyEoo+j465YxlZKJGWa9btnBlDBrfe53iBUekD4tB/ 6OBNIEd0gc/9iyrBlsDOeZ3lkH9lJgDxnXDG88K5o9kdV32bFI+SB3/VR81Z8dfYiaQv 5MqVNHxaBupITXVF0w5FuISWaQmyObylNLKepVAIOUJkW/vKN5GsBEQUEQuLSrqxc90o Sn/gtsLd8rSGNoytYfM0mLr3DKiOLCRe1fgLXAYwO39o7h9MRwCs0u3GneRu9JF97UlQ S8vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=vEY0tIwHPsq1SCMJk7bgrrbJqcYHqeqWPKoG+Ka8OBQ=; b=mmFcBtTKUkdAh3HW2MLwPygb0WlVXENrpldDeNyQofSrVyQtq85/pNVImfDdzRAEuA CP9IwbwPmMAU7tKkkgKYNE+tDRBNSBrquWRa0HvXuDqIrXidwhzAqEZMlb5Qs2W8eV52 btmDYNkGU0Ljw+CUITWsY+MR/mzYLk7Ti2ru/lWhZnlUMUb/sshCseQ4y1Ult2v3jTov xEBSrdRLaFuYnijvTZDngPl3Kb2/guTcH9PXskCO6c9kCML7P0vxraU18qOxSYxcmKZR 0WHbOBpAJsCMkqW2NRfoU/TR+E4HnOu6hNEV52H2oOeasO9EMHMnLVX1u6m/VgWPgpYq tDWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bi1-v6si21596394plb.267.2018.05.24.20.51.50; Thu, 24 May 2018 20:52:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965096AbeEYDvU (ORCPT + 99 others); Thu, 24 May 2018 23:51:20 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:49896 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933493AbeEYDvS (ORCPT ); Thu, 24 May 2018 23:51:18 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 30E48407048B; Fri, 25 May 2018 03:51:17 +0000 (UTC) Received: from localhost (ovpn-12-30.pek2.redhat.com [10.72.12.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 91582202345C; Fri, 25 May 2018 03:51:09 +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 24/33] f2fs: conver to bio_for_each_page_all2 Date: Fri, 25 May 2018 11:46:12 +0800 Message-Id: <20180525034621.31147-25-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.4 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:17 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 25 May 2018 03:51:17 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'ming.lei@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/f2fs/data.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 89da84b0f0bd..924284e2f358 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -54,6 +54,7 @@ static void f2fs_read_end_io(struct bio *bio) { struct bio_vec *bvec; int i; + struct bvec_iter_all bia; #ifdef CONFIG_F2FS_FAULT_INJECTION if (time_to_inject(F2FS_P_SB(bio_first_page_all(bio)), FAULT_IO)) { @@ -71,7 +72,7 @@ static void f2fs_read_end_io(struct bio *bio) } } - bio_for_each_page_all(bvec, bio, i) { + bio_for_each_page_all2(bvec, bio, i, bia) { struct page *page = bvec->bv_page; if (!bio->bi_status) { @@ -91,8 +92,9 @@ static void f2fs_write_end_io(struct bio *bio) struct f2fs_sb_info *sbi = bio->bi_private; struct bio_vec *bvec; int i; + 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; enum count_type type = WB_DATA_TYPE(page); @@ -267,6 +269,7 @@ static bool __has_merged_page(struct f2fs_bio_info *io, struct bio_vec *bvec; struct page *target; int i; + struct bvec_iter_all bia; if (!io->bio) return false; @@ -274,7 +277,7 @@ static bool __has_merged_page(struct f2fs_bio_info *io, if (!inode && !ino) return true; - bio_for_each_page_all(bvec, io->bio, i) { + bio_for_each_page_all2(bvec, io->bio, i, bia) { if (bvec->bv_page->mapping) target = bvec->bv_page; -- 2.9.5