From patchwork Fri May 25 03:46:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 10426117 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 40BE4602D6 for ; Fri, 25 May 2018 03:51:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FAA6295A4 for ; Fri, 25 May 2018 03:51:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 22324295A6; Fri, 25 May 2018 03:51:20 +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 AAE71295A4 for ; Fri, 25 May 2018 03:51:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B86B56B02BA; Thu, 24 May 2018 23:51:18 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id B10B16B02BC; Thu, 24 May 2018 23:51:18 -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 9B2E96B02BD; Thu, 24 May 2018 23:51:18 -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 6D6EB6B02BA for ; Thu, 24 May 2018 23:51:18 -0400 (EDT) Received: by mail-qk0-f199.google.com with SMTP id c73-v6so3018271qke.2 for ; Thu, 24 May 2018 20:51:18 -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=vEY0tIwHPsq1SCMJk7bgrrbJqcYHqeqWPKoG+Ka8OBQ=; b=hCqouFXdexA/hom93mTSgnOd1AF2mSTjD+MdQQ4fVABu8XXvAJpbkNsawZps2Ex+5M JXre3Y1WedMFl96A52BeBrwyNMJ+v4CsYxen6o2T6n5Kxc2UN6D1tFpgI6jCKRjBGlgo gI3n2OYNfNRH4xjLOXOvtSHV7u1qLVXzybo6PXm7zTQnwDPUAo6bAueWkyEf6DReBdHr t5Wbu0nSUTVYDQD/zAqhMhw+oHSzGRfUGACU7UQwaiL4JkGrgsPXiPpICFOaeuwHdy6K hReavuM1pGXqO7DPVvl/BZGGeBqyEeJXCr2hWs27lP/heI2CCty3DoKlRn57YkSQL56D PTdw== 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: ALKqPwfUxjbQbdWT3sm732isjT1As9HTr5D9rNqRfr4nM6tGxxiZdam+ 2yjRR4BBziSx329rkN3g5V7wXEZqfLn3VZDDXa8wUeGr5y1es/T4IxpZuk2TgLm8CzFrg7pXZsC Y1Oc2QECXR9XWF7qw7oRRN0aGKHahevyAn/FbDrzGn3dyDwAC08Ti0e1qIfmZylGIrQ== X-Received: by 2002:a37:21de:: with SMTP id f91-v6mr542383qki.395.1527220278243; Thu, 24 May 2018 20:51:18 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIZg4kIvskodEERUSVSP1IvuFiyaBh84mIevrNJnyNzTEK12CA9fFXrjbY6x9Mnzut1n7Z6 X-Received: by 2002:a37:21de:: with SMTP id f91-v6mr542372qki.395.1527220277678; Thu, 24 May 2018 20:51:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527220277; cv=none; d=google.com; s=arc-20160816; b=auvrX0J8UMJuztiSWkmq4eAqKRQKiRC91BI6U/N2lzcF/dsZ41z+R/T06AMwbfEw1J ntaZp5DtmI0Ud39vQ88zetPe73rdyf5IBONiOf8UZ9otxd63/Wr/Q7Mm9KPgxbcIAb8P unkthN02qErbfMWxttcnJuuaE09J2iHYADQJLfg9ZYLk0d8QsXhiX34yoML+f/eanhBl Pa4YuVWelfxKdKvo97LUrKnVuSsAD3wuOxtCVDCKk298oPFT8W4ayBGCPxrC5L6qXQPm K1tljL0jlrfkLvrc759GCSNJB+Wks8GImimEhfffAT6My1adoBcUsdP/Il4fvHwh5ehS b/ew== 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=vEY0tIwHPsq1SCMJk7bgrrbJqcYHqeqWPKoG+Ka8OBQ=; b=VZ24gsnlhwCw0dBULx7BcrbiODF6hMWy+GKV5MgkPYws0htNOyAMpPcxqpLZbGJoH0 JV/6MUeeLSVUy+mmIFmh5YaO2jT2RQEp3z8IpWOQwYkRBr9X3xAwO6nNJG1AhQ8I3mNd bXYfGgqeR+DCOf0GYHKp++r3d9Ud/yHkoFsp9vnuucY04/PMbKKeIX3QNlHCfXG5denE hhMYqdq6xae6NlHmfCA4Wr8/y8aled+SGMS15EM3HWt8PABYIXuDWTseKogGTyH9pYdr zWDgWascckamT4K1Lku+VCdqcXWQRtwpivkXBot3rZdsfdjY10/rGMHy0gvjqBeq0u98 Gm0Q== 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 o207-v6si4377122qke.209.2018.05.24.20.51.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 May 2018 20:51:17 -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-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:'' 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 Acked-by: Chao Yu --- 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;