Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp13798069rwl; Wed, 4 Jan 2023 13:16:40 -0800 (PST) X-Google-Smtp-Source: AMrXdXthZbGObKiKnfNxpHy/Z8jAUBYURtc721kW+gvtxWW7Gra2ObRiXjdJ30OoXby01pNc88ky X-Received: by 2002:a62:7950:0:b0:581:3204:b714 with SMTP id u77-20020a627950000000b005813204b714mr35757402pfc.10.1672867000348; Wed, 04 Jan 2023 13:16:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672867000; cv=none; d=google.com; s=arc-20160816; b=Nc32sh6pojgKaAw81OIn1iie7/+zkBlsfxYCNV/k/7X0onEGCF1LQGd9RTd4//w6i6 qAdQDw6w/lzYL1jVGXwqhtzttSMPHVO2xkTa61vqEvhvyvjBSBX9t+RklbDhmg0ovvXw D/w4ZyHitLAkxI/hDzXD9rcqcVw/HRgJ8y2mn4TxjTjL9VgmAmCJWXD3VJmeqw5SEklM ydo3LdTw4ZJp3MMz6dETasO4twCCXm9v/a+DeY2wPCp/VvQPHI6R0cy+QysfSgrcHbSp K+6RaRy72gsnK02xwxRrWImNxd8S5G55zLbYBBShCDo3JbXDzeUAWyLm94jhitzVsnas /9ug== 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=5JTMc/Rft/vIyJlvWKFcn8nkQrf+O33NuNawnN6rRgI=; b=pkIhUrQJBIpz7kOsxhCz0wcmMSUDHhTWim5ZjHu0/QHbHjH6ME7uvXz8Lu16OMT+BL iLcF9Ss+ALP+yPWhhermZAeCTP/MYb0wLqbrp2ijWkNTiVymOrPyM66rQuAZX43L+6Kl gHv8erFJGSNcEpZaBph7WrXiALFyKt/XtVhBjySggMb5IAeDoo7BisB4WeccmJ5V/m9s FtfBMJ0g73ydkERhsBtgEvZXGG9N1Jj4TzBVBw7IqxFFNML+DwLAs/tYv1AkcqE5wP7L 5krZKrxk/ifWRYrL9UTKBbujle4xOykl2QcWsGsCLtl7a7UtLuTWWojj4TR/bITiE0JV Igxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nqEuKaTI; 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 cp8-20020a056a00348800b005827af240basi2328312pfb.289.2023.01.04.13.16.19; Wed, 04 Jan 2023 13:16:40 -0800 (PST) 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=nqEuKaTI; 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 S240447AbjADVPs (ORCPT + 99 others); Wed, 4 Jan 2023 16:15:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240340AbjADVPO (ORCPT ); Wed, 4 Jan 2023 16:15:14 -0500 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B7CD1DDD0; Wed, 4 Jan 2023 13:15:14 -0800 (PST) Received: by mail-pl1-x62b.google.com with SMTP id w3so5568774ply.3; Wed, 04 Jan 2023 13:15:14 -0800 (PST) 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 :message-id:reply-to; bh=5JTMc/Rft/vIyJlvWKFcn8nkQrf+O33NuNawnN6rRgI=; b=nqEuKaTI9dAXbJiKNF6NFVlHonYqdpnzDFZQRbj6c6q33P4q7zmgWoLXJ3cvwJxiFU R4EchBW4P9btK5EV2Ivos6RVjg1pCqpX1sdrjygOWSOWvR56x6MAcYlVYqzqYxU9e9pD 7EqyoRZKmtKUIC4XqucME2BOGZCWoquaRcoAjwG6f440GMABya0GF45MLcEdcWoBQIPQ aSrPTzqxY2gV56movVnmY+sLkzpn2sZ/+NfGjAOpD0jKjJOna2t97nyuQoo/S3JNHjEa jJZ5wa0Qe7mURn1kHsaymS4r8Y1pr0V1FypBr74zDvcLsepES4cYIoRevgoh6RoBOUZe pZpg== 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:message-id:reply-to; bh=5JTMc/Rft/vIyJlvWKFcn8nkQrf+O33NuNawnN6rRgI=; b=hrb7oAREyLNFhTSN5b1GgMNCj0kt+b7U5E9iB7w33PzlCZjcEyHHmZ1eCXoryFV6uM 80gzkASSPLZgkgxsA56SaWtJaJM1Ti2n2q0E3lPRpk00GvBU8CyeZcS0o908fz2hMzoJ LQD9ct+9Y/9pGB+yGyvmYOmUdRoHLt2vUP7KUjO0ssbf3g1bRgf7oMNUydR6tMyF2i6W 83vcxy/qtt9Mh+znEXJl6nQjWr9U6ryqe+beL3c93yKlbQQMvVsmmhFvPXPTHz7gR5gr DZxBE9hn+hFQbEPq8zieJQaiWOHsgfRBn5CLzj/o+6LKlzkKKIVvGh2/eEpZh3G5h3Gj WKvg== X-Gm-Message-State: AFqh2kpIHJvxBQN5aFOCLO5rCu0lZPErM64zreh98fCIfox708eSTaOJ e03or1fq+GEjaw1vlO34lJ9Lr09uk2t8rg== X-Received: by 2002:a05:6a20:8e10:b0:a4:a73e:d1e2 with SMTP id y16-20020a056a208e1000b000a4a73ed1e2mr72696381pzj.57.1672866913342; Wed, 04 Jan 2023 13:15:13 -0800 (PST) Received: from fedora.hsd1.ca.comcast.net ([2601:644:8002:1c20::a55d]) by smtp.googlemail.com with ESMTPSA id i8-20020a17090a138800b00226369149cesm6408pja.21.2023.01.04.13.15.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Jan 2023 13:15:13 -0800 (PST) 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)" , Chao Yu Subject: [PATCH v5 12/23] f2fs: Convert f2fs_flush_inline_data() to use filemap_get_folios_tag() Date: Wed, 4 Jan 2023 13:14:37 -0800 Message-Id: <20230104211448.4804-13-vishal.moola@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230104211448.4804-1-vishal.moola@gmail.com> References: <20230104211448.4804-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 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 a folio_batch instead of pagevec. This is in preparation for the removal of find_get_pages_tag(). Signed-off-by: Vishal Moola (Oracle) Acked-by: Chao Yu --- 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 3e0362794e27..1c5dc7a3207e 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1890,17 +1890,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; @@ -1927,7 +1928,7 @@ void f2fs_flush_inline_data(struct f2fs_sb_info *sbi) } unlock_page(page); } - pagevec_release(&pvec); + folio_batch_release(&fbatch); cond_resched(); } } -- 2.38.1