Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1240574rwe; Thu, 1 Sep 2022 15:07:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR4sSTiYe0anwduQ4t7HVHedI6EDxX27+w6Nk50KKx+l6pA4jz60wzeU19dMegbQQAoteFh1 X-Received: by 2002:a63:65c7:0:b0:42c:87a1:a1a9 with SMTP id z190-20020a6365c7000000b0042c87a1a1a9mr14021482pgb.403.1662070068501; Thu, 01 Sep 2022 15:07:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662070068; cv=none; d=google.com; s=arc-20160816; b=l9PPmqJUBM1qHqU6UtR7lz3NabJ1r5Pab1xsB4sEa1KlbW3B4mWVFg7pzVvQOKihEe +hRlP7OVcHDr7Bha863wq9DqynrhDjednFuZ53IPGHyKAfC1t6s3dU42ZMWuYlUhCEW8 bOJCWNuwMnfj6z0XF1HKr2ZigIbnbOv4U6Mq0BFx04JlxU53WugH/yW+Inwzrz7XQ3Rb c8cLU5kfqVW9Kp7jMaeB+/y6KeUgnHqsuvGL24GUYKIwka0fhjEgCnEL5NsUleZQHgEH ml0Aup1gwlpYkKspzLxa+EYnLjvu6s4XYng1COzodTKQLKlMhiFRdjy4L1V747/DZXp9 Y2xw== 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=R1s+Q+mQAi/BIrt6gOgtRlGYE9v+cGNlC5URnwM67nk=; b=sCLn/GvVVC+l9PPdpzvVk0Hj/o+4ambCVy4wwqd8+A5/a5co4IFP1xJdoRmufmpp/o 59m8WjtgCDMg4VKjRyhASL62f1qpdXlEv5bNyNPg5KcIJ/KjzamtlYlaqTGmZKThn1pC zK9I+vuVpB2xm/t6t8EmGlqMB0m8gnALVJafyUMSXSPrntbzrhld6tgJk+59+t0Mbb7a EKH8RhRrA3bUlc2Kx7nwexT528oWrfTZnTx4IHA4fROS7OiqAhx5lvA29l/C4qCqr7Vl w50P7nw6vuSANSyKDbh02anSHFmQheU4BnNt4EKNoF0jUYdgQIKHvbIycFR9+b5r7hxM 6nhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=g6fAyp3i; 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 q12-20020a170902e30c00b001753e9d0659si133975plc.455.2022.09.01.15.07.32; Thu, 01 Sep 2022 15:07:48 -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=g6fAyp3i; 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 S235194AbiIAWHJ (ORCPT + 99 others); Thu, 1 Sep 2022 18:07:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234852AbiIAWFx (ORCPT ); Thu, 1 Sep 2022 18:05:53 -0400 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 427F89F1B4; Thu, 1 Sep 2022 15:03:22 -0700 (PDT) Received: by mail-pj1-x1034.google.com with SMTP id u1-20020a17090a410100b001fff314d14fso354413pjf.5; Thu, 01 Sep 2022 15:03:21 -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=R1s+Q+mQAi/BIrt6gOgtRlGYE9v+cGNlC5URnwM67nk=; b=g6fAyp3iJgf3LzmTu5bD5zWTZ7od9i2yk9cu47djS4LzM5/vaCauETEa79FJPDbfwN cLdqlUh9d8nI0Nm+LbuAhIItiLNmHGfoqlGAYhSfTiRw4ljsDmSdVadB+3m2xO1TNUJa 0nuVGnoNqQQoLmodKszRhMXSnkLvvjZ4R3brnkvtlDRm/qXRnT+DMRacWFesHhTBBNKc 0V+89RIxZ0WLehbpnGAbTdJ5uOSPOqVqMofTzLN0E95dgYKuDPhCGssRW2KFzlTQQNsi D66yCF12E7iDcZecg+ujt+pmVYyoJIOMaXlKUD3A3/5c5nIgJRrzLjZgJB8I6DmUxegn s9WQ== 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=R1s+Q+mQAi/BIrt6gOgtRlGYE9v+cGNlC5URnwM67nk=; b=wAwheg8L5Zew79laPnd99Jfs5Ey7q4ez37ymFeptbtm7ar33QdKVPsvlmCLVC0mJ08 aEVeEyAXc2Gu9lLaWu/qa4FJ9l/29R56HT5++KoCtT7EPtB+kr7fPtoiXsrRVGlgrnFh hmQAJtB/Y3YuzeTfioa4bHmcC7NexGVMPoOtoDAbdrT0PdngvU3h/aOx+bzuZvnYU1mg ygA3oDBkMTOTSplp6a408APy8/I4Q0IaSxA/A4FgIlyArXBsMcYWULI/147viGpdPbCA nCqN05G79TR3w0VQidbcCqmDwP7Y/L2Amt3ZcviF6maPQwD/LN66PVQhGnltyWxnyMlF 7KnQ== X-Gm-Message-State: ACgBeo0Cx3HSs7TbJLZH3yD6YVLkfF4C5SqTdGxaBo7iXjtvJ7xEbORP xbCMZbUYtvNaifnifZq5rIrqDwKS2e7FFA== X-Received: by 2002:a17:90b:1bc4:b0:1fd:b913:ef58 with SMTP id oa4-20020a17090b1bc400b001fdb913ef58mr1275606pjb.220.1662069781924; Thu, 01 Sep 2022 15:03:01 -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.03.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Sep 2022 15:03:01 -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 19/23] nilfs2: Convert nilfs_lookup_dirty_node_buffers() to use filemap_get_folios_tag() Date: Thu, 1 Sep 2022 15:01:34 -0700 Message-Id: <20220901220138.182896-20-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 throughout. This is in preparation for the removal of find_get_pages_range_tag(). Signed-off-by: Vishal Moola (Oracle) --- fs/nilfs2/segment.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index e95c667bdc8f..d386d913e349 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c @@ -737,20 +737,19 @@ static void nilfs_lookup_dirty_node_buffers(struct inode *inode, { struct nilfs_inode_info *ii = NILFS_I(inode); struct inode *btnc_inode = ii->i_assoc_inode; - struct pagevec pvec; + struct folio_batch fbatch; struct buffer_head *bh, *head; unsigned int i; pgoff_t index = 0; if (!btnc_inode) return; + folio_batch_init(&fbatch); - pagevec_init(&pvec); - - while (pagevec_lookup_tag(&pvec, btnc_inode->i_mapping, &index, - PAGECACHE_TAG_DIRTY)) { - for (i = 0; i < pagevec_count(&pvec); i++) { - bh = head = page_buffers(pvec.pages[i]); + while (filemap_get_folios_tag(btnc_inode->i_mapping, &index, + (pgoff_t)-1, PAGECACHE_TAG_DIRTY, &fbatch)) { + for (i = 0; i < folio_batch_count(&fbatch); i++) { + bh = head = folio_buffers(fbatch.folios[i]); do { if (buffer_dirty(bh) && !buffer_async_write(bh)) { @@ -761,7 +760,7 @@ static void nilfs_lookup_dirty_node_buffers(struct inode *inode, bh = bh->b_this_page; } while (bh != head); } - pagevec_release(&pvec); + folio_batch_release(&fbatch); cond_resched(); } } -- 2.36.1