Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1238336rwe; Thu, 1 Sep 2022 15:05:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR7n72eIWIFRrefGgzF1BPb926ZUgDrAJWfHA5TAg0jCnSIRg2PhPckqAXWHqGYgOfK4WTzP X-Received: by 2002:a63:43c7:0:b0:429:7abb:aaf7 with SMTP id q190-20020a6343c7000000b004297abbaaf7mr27548972pga.204.1662069935485; Thu, 01 Sep 2022 15:05:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662069935; cv=none; d=google.com; s=arc-20160816; b=RIvZIxi61U9ySOFDXm0fvvVnBrVIimHFHfUfCbNpK/2/dxaPheq0vx8ai8NT/n4t+X lz1dPyBLZ0yKLNL+6tUKt4jFa8SuADir1csMwjpUfro5t9PIN+xifeEi1NhMm7Fb9h2p HUItVft4M5Jdn8u285EmfuWNKJYFDML+NySsLaNd9GXu0eA4GAH9NfbQrqFb3p3tTCOo n+tBiybYkhmBbeA+NPcoSNj6ESoionNzdkV+fcYKyUiuIXnVRrM6SyNibFVfe5jj2FcG uMiPxMXFJe+wg5A2ZvIWUqWu1I6xNrBXBTw37QydnvYNM+9ARteA0qK2MIenMq1zhM4E 7cyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VVDEDDCx2d1u9kTxOO3+HYn0Qu0jVDr1kjF69+koZKM=; b=cvQ9J5cT+O7ol0nI9SCnRRDiAZ1MAjS7gxFMpGalCBhJRVpSuy08wHbWjKG4j6rd05 3M77I2Njf/04tnPG+wf37EuPdkzVpYlUsRgSdaa/Jlq+Bdl2Edxgyw2//0uk7I6/pClT q5sg++xpyEk79UQh1r8wz5usRWOt9Apr9cje6Pf1nyG7lc1f4AqREEeZWr/1IFUXuyZy QWrrByqU0/oioVmL7FtVKXkodZ6fEZSa7SxXwlo/wIMl+wL8u05p1rk6JCTjTB0UKwR8 2NFDm+sP1dT3oa92Ao8KIXVn2mZlodwWfOHOidszEQdPicrKg47UFWeny/OOw2G+dmKA PgCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="b1/QSkbA"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g1-20020a170902e38100b0016ee3b6681esi169195ple.75.2022.09.01.15.05.21; Thu, 01 Sep 2022 15:05:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="b1/QSkbA"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234727AbiIAWEv (ORCPT + 99 others); Thu, 1 Sep 2022 18:04:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234643AbiIAWEG (ORCPT ); Thu, 1 Sep 2022 18:04:06 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 774FB97EE7; Thu, 1 Sep 2022 15:02:53 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id l5so246890pjy.5; Thu, 01 Sep 2022 15:02:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=VVDEDDCx2d1u9kTxOO3+HYn0Qu0jVDr1kjF69+koZKM=; b=b1/QSkbA0KE2xUlFrUXQEVG0tKpol73bVxgD0JU9l+NoBY6qShuSjNB+kmeBlOMRM5 JTyIWvr9pHHuB5iH3YW16+gbFOwJPd0guEmk3lwDKP1rofaLlcFIYJW7KLMyPaqSsnUL 3ANonRcxOaEgEr3fjaSMK6EhvpBNrqrC9y5jO3YalIG74gceZr+XlLuEMojU3DQOF2YT ZNnm8VG78RQtVu2G6CZxxzpbZ3oGLbUw/rcEMpsLZCHgtIqvQM56vT9Mo84bDHjBrKPR idwfoeW+VWrVke2zu158oVXXH2A5l7M+GBuTmwchmOVovptMyXXZZra4FRtAg/MbnMB0 QMFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=VVDEDDCx2d1u9kTxOO3+HYn0Qu0jVDr1kjF69+koZKM=; b=DnPy02wDAb5/Md4QEYT13CDU6OMA0diYFyxo68sp2TjC+CY0wLjOKxvt5gS5/vgQpa N/XidK0X4idpqI+Gmjf0pM2O8jaXdhQquN0itp7Nri1NZbeSYwpXdRse8F4LVXE17nju pBdsj9DYwQC/4m2u6iCBH0Zy+7Ajt5I6oiV87UFm+afNjCCBNFpW6/1rISgKlgw3l1AU 1jsVdDD0oCK8bljXa72pxoiQ42sK8dY4MXL8WtsJ814wkYppmXvamSZPYQs1aVhA4F/J NZ1gS9UDshb9FL8yIMl/v4EDJFjeZLuVNxv9j01veGH+xhyV7Z0WYVnsHqMBBtOzCXJA 8Dbw== X-Gm-Message-State: ACgBeo0otgFNe1+XWOmWvHy4So9sv27MEbAateSYxVnIwmi1udknqH/y 6Ff9lP3GPDDE/iUvCtXkR55JYI5DcAqJOw== X-Received: by 2002:a17:90a:9309:b0:1fa:d28b:3751 with SMTP id p9-20020a17090a930900b001fad28b3751mr1262365pjo.189.1662069771948; Thu, 01 Sep 2022 15:02:51 -0700 (PDT) Received: from vmfolio.. (c-73-189-111-8.hsd1.ca.comcast.net. [73.189.111.8]) by smtp.googlemail.com with ESMTPSA id fv4-20020a17090b0e8400b001fb350026f1sm128894pjb.4.2022.09.01.15.02.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Sep 2022 15:02:51 -0700 (PDT) From: "Vishal Moola (Oracle)" To: linux-fsdevel@vger.kernel.org Cc: linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org, ceph-devel@vger.kernel.org, linux-cifs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, linux-nilfs@vger.kernel.org, linux-mm@kvack.org, "Vishal Moola (Oracle)" Subject: [PATCH 12/23] f2fs: Convert f2fs_flush_inline_data() to use filemap_get_folios_tag() Date: Thu, 1 Sep 2022 15:01:27 -0700 Message-Id: <20220901220138.182896-13-vishal.moola@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220901220138.182896-1-vishal.moola@gmail.com> References: <20220901220138.182896-1-vishal.moola@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Convert function to use folios. This is in preparation for the removal of find_get_pages_tag(). Does NOT support large folios. Signed-off-by: Vishal Moola (Oracle) --- fs/f2fs/node.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index a3c5eedfcf64..c2b54c58392a 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1885,17 +1885,18 @@ static bool flush_dirty_inode(struct page *page) void f2fs_flush_inline_data(struct f2fs_sb_info *sbi) { pgoff_t index = 0; - struct pagevec pvec; - int nr_pages; + struct folio_batch fbatch; + int nr_folios; - pagevec_init(&pvec); + folio_batch_init(&fbatch); - while ((nr_pages = pagevec_lookup_tag(&pvec, - NODE_MAPPING(sbi), &index, PAGECACHE_TAG_DIRTY))) { + while ((nr_folios = filemap_get_folios_tag(NODE_MAPPING(sbi), &index, + (pgoff_t)-1, PAGECACHE_TAG_DIRTY, + &fbatch))) { int i; - for (i = 0; i < nr_pages; i++) { - struct page *page = pvec.pages[i]; + for (i = 0; i < nr_folios; i++) { + struct page *page = &fbatch.folios[i]->page; if (!IS_DNODE(page)) continue; @@ -1922,7 +1923,7 @@ void f2fs_flush_inline_data(struct f2fs_sb_info *sbi) } unlock_page(page); } - pagevec_release(&pvec); + folio_batch_release(&fbatch); cond_resched(); } } -- 2.36.1