Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp5601770rwn; Mon, 12 Sep 2022 11:29:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR5a1E1D/uCpuPuLboUjQXUkN/1xf1s5m9gqa6ScGfCe9iq+TVnYoOw9aKY6mVzjsJmJHqa+ X-Received: by 2002:aa7:c74d:0:b0:44f:d34:affb with SMTP id c13-20020aa7c74d000000b0044f0d34affbmr22468235eds.143.1663007345872; Mon, 12 Sep 2022 11:29:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663007345; cv=none; d=google.com; s=arc-20160816; b=S5L7rr1liadVxozzUdXwDA/w9IR0FsbZsL7+FhrqP0exY55aFEZHLb+jghs/q9cQbu VRfVJF04G0sWvHk+bAl8gmbc9HBab6/goeejTBh3plXXu8aHxat3B7ZJ2Ds/taWcYcSc yt373Ej3y6JmaATsL83R+OAhEBdzCUGhAI0gZrKpkA0Rb/oXd8wBe2DnqpkeCyWS53ON cTxfTbiqUu7fUxsfKWPW6U5+jHOaWcTY7OjCNiJowedjTk1JhEPFJdjq5dAZkZD7NAfT kGE90+oG+zfasAkJo94yJOJhxROk6/5GExYO7zZNFLFscLeRZM/GWij8rDQj9pLw8Rv1 Q8mQ== 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=iojfJcjDQGleQQ83vjpqPcebx/fBJkCxaNHJ2xUla4ZN2w7vJSiEDFh6SKNOpRASJK 4Nx+oalv9xCs50q65O3YkD46NzsZ+J2jzfc9mVPGPkcMQFUUx5pT0SlNwrOm7cdoJvVo kUP2hGOxpTbPzSP1ZUoJRadWvoNK7vqhx1HP8BW9kyjKOem417CTIZiMj4kxHrOQ1+gd +QB0vEk1bgzMxt2d/FjFjDI9tU5WT8fCOuCIa4C89OxkjL99LCpmRm7C/WB8Cf7A5o4r oMjT45OKWxmOh71klNdeb8/f1sgMjS599vSiUDHdCPYGn0Q7bKbr/okbhFoSC0CA6587 JzTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mWsacKal; 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 f20-20020a056402195400b0045196fd6a9dsi3741209edz.477.2022.09.12.11.28.40; Mon, 12 Sep 2022 11:29:05 -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=mWsacKal; 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 S230281AbiILS1J (ORCPT + 99 others); Mon, 12 Sep 2022 14:27:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230352AbiILS0E (ORCPT ); Mon, 12 Sep 2022 14:26:04 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82F2942ACC; Mon, 12 Sep 2022 11:25:42 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id i15-20020a17090a4b8f00b0020073b4ac27so8994968pjh.3; Mon, 12 Sep 2022 11:25:41 -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=mWsacKaljX8MUV8CQf+x9uPNXb4nwg1rqOzW988jKdDxldx2xBwpPizg4HUE3CpOyS CZXKfwZl7d7TRsEdibF4COy3CHTtCs9fDbuwKy/fifVJ1Wgwc7dTVk3A2qlzYF1+YqrM 8u30URko72IeT67j4F37ylnRUZD/Skd/5ByQpr+0jX44vN/bWC2IRka7MCfENYbM9JYD 72jwWqsS26F/r5BLgNzt2vuVnEfeh6py/P+5GlgXdd1rz/SFRFcCTDhHk5S6n46zAnHH K7NUMpASIWQTy8dJGAcYZr2Qd5aoXAfuyQB26U7wlP0wc30bz0T/it+tBSb7KpRupXtm b44g== 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=I8hTB9JeeYWuC4JXXTGyWtffLNJmTixj6i7xmPk6yEaDNH12TriyhaEGlOLzo8ex56 TRy7tnZVEbG/fmQXOwicOcmwbF2wRzpKa12hCvKjzLhpZICO/lxPJQ4obWx8dVt1ju/b Ym9DFkqAQ2QrAx0sEFk+zmStsTBcZsnAqJVz4nGlQHqoMVwIUS/pdOi5vtw0o3/IYU2K PU7938thK5VhIQ9j+UsC9W2tPMNJI9aMpPieYhIR3MAScp597SAgyjYiOB7FVafssi0A Q9zbCwbkgl9jbK9qT1oV5SAVN4JALfRKMyZOPxfAxuoLDXFybtUi6w+Rtx/NpjCZNZzB Ao1Q== X-Gm-Message-State: ACgBeo28lbh0rSpyhQ0PXUEDDSiRqrkFXOs5QHFs3zuXd8itKsK7eplJ /Dhlg5Ehbu6Pz2tAk877q+RbZnL8e/IqVQ== X-Received: by 2002:a17:902:f549:b0:177:f7ca:c870 with SMTP id h9-20020a170902f54900b00177f7cac870mr20847770plf.4.1663007141405; Mon, 12 Sep 2022 11:25:41 -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 x127-20020a626385000000b0053b2681b0e0sm5916894pfb.39.2022.09.12.11.25.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Sep 2022 11:25:41 -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 v2 12/23] f2fs: Convert f2fs_flush_inline_data() to use filemap_get_folios_tag() Date: Mon, 12 Sep 2022 11:22:13 -0700 Message-Id: <20220912182224.514561-13-vishal.moola@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220912182224.514561-1-vishal.moola@gmail.com> References: <20220912182224.514561-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