Message ID | 20221017202451.4951-16-vishal.moola@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1630830wrs; Mon, 17 Oct 2022 13:33:01 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5mKbD9YQ37jtw/j608ryhrI1L9IAc91cehMXhsE7UcqT8O0Y5I/vfZUb0QpKV+MbSNDcH5 X-Received: by 2002:a50:fe85:0:b0:458:5562:bf1e with SMTP id d5-20020a50fe85000000b004585562bf1emr11672737edt.167.1666038780903; Mon, 17 Oct 2022 13:33:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666038780; cv=none; d=google.com; s=arc-20160816; b=JCop4slXwA4FBkx2S09mEzCTgOqHA5QBAck/wEkNqFREynzr2DB+VJXHaNgJ3nLVTw hP5p3/93Ox6xlRFKKv/ev/Dg+zPz77l9v5AETGbTTF+QNAUlgnipp/cC3v8tpX9bx6ha NC90xEolirEE/JqeMh/7Tx/LMkRVlWUovsSH6jLCEbCVaVGQ/P4gYNXb+7nN2unaV+lP jo6eGCZwR/b2TaUx0KrovP43Vwfkk4WUeHeGMCSZ6tQMe8MkjJ0lTP0XWxcdmVEqlMFT /qkxM632nZxMQ2J/pdvFkIFQLeu6gS9VNOlIUkjjtLFT5ppdZkO6QrcLUVR4exNGO8si G2NQ== 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=EOnFNLr6WPd7tItI5uxkca8Truk0f560xSuLirSKI30=; b=TZYUxT6KSZ5MYPjTLNfdTEEuPsK6Hp34/5N9nrlC4t2AYTpnr+5ONFl+MlBBKkMVBO Wood86gcqAMBPPm5Ge0otlxbspwafz5+y1OOwb/nultOhmb0rOtBsPdgIWjjEy43v6ok Ibj7z3L2J3HYe6XohyVrqIjLAG0ndNnA1nqlfUT949UBlPp4RZELgn8n6F4dPf5HRZzL BhE5A+GKKfGauMlpmNhhw4yuOgYJnsAgwULsqlduf1PfVFsOwFEFMC6I5q5uUWZXUzMS YynC88e+Gd59J95IL5M9wXF8X7p8zU3rA4mepN09kDWGlvRQUGetm5YWP4n2Aa6mJhHB vqng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Ebrl+ffl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dz13-20020a0564021d4d00b00458db439f07si11429128edb.14.2022.10.17.13.32.34; Mon, 17 Oct 2022 13:33:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=Ebrl+ffl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S231129AbiJQU3P (ORCPT <rfc822;kernel.ruili@gmail.com> + 99 others); Mon, 17 Oct 2022 16:29:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230347AbiJQU07 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 17 Oct 2022 16:26:59 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75D717E835; Mon, 17 Oct 2022 13:25:45 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id d10so12137650pfh.6; Mon, 17 Oct 2022 13:25:45 -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 :message-id:reply-to; bh=EOnFNLr6WPd7tItI5uxkca8Truk0f560xSuLirSKI30=; b=Ebrl+fflonMxXmYbjzZ0W5FnuUgF1ENZ6beNYeaCYzgPsSFFFY2nuwfTKiz2FudAe/ 7ZKdf6z/O/+HYjYCpK8ChxO2CQY7gBGoDhDIU1UeMcG99x96VPKcLvY7daaxIL6HByus /5yfixBKbG6rVzNv4/ZTcQkFvGUMjjvk2/T8YJVcM+iPU6/Q8umaLAUYJtaxOxiT1yX5 slob1M+6u8lOpnGyvViPT+9/xv790R5/qWr3BkN0/2P0geRVbBZeT1bsX1UOhX0vCD6O vBYMGTV1jDQT8d5fBXvzef0tlyd90rL/RgBQhVdelCPIZRq4EycvfekOVwfGoK8elKWC hXqg== 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=EOnFNLr6WPd7tItI5uxkca8Truk0f560xSuLirSKI30=; b=C95pPs0mChxlojNmZTrZniHF92JyqVVZbWeaemLqxqPOla+NcT/+nMTa1QbYJHR6/y 8Uyf8Zx22A6ffr4tIYk0kXQ5G2B+rURiZ/SGsLQj9+sGRa+3KS3mSrTxMFuATQPrA9R9 Uoh6KxDTubbGt5SWupNBTWHx9962a2TKpaE+n0lNe8SpxKxhRLzkf9/Va1Ixhe1dfBsD 3y7lmm0s9TqiYiGwDSlI/JODHqxRMJkCpFfStg+HMlWcN9EWYLzPh3YmqIw+4aLAL80H 7OQTkG2I+B/tw0SDufCUxUamqsHk/TjDaQb7abEz5JQPtJhIT8y1JAzHOtRyPjBTqkt4 thfg== X-Gm-Message-State: ACrzQf1z4Phb+0KEdgojl6tC1kfcfEhddTxXRDDZ7wsFWD8SxD+9uM3Z cf1O3XcYI3huNQDLAOWW/V/ry5tac29HXA== X-Received: by 2002:a63:5b5c:0:b0:440:8531:d3f6 with SMTP id l28-20020a635b5c000000b004408531d3f6mr12503042pgm.114.1666038308965; Mon, 17 Oct 2022 13:25:08 -0700 (PDT) Received: from vmfolio.. (c-76-102-73-225.hsd1.ca.comcast.net. [76.102.73.225]) by smtp.googlemail.com with ESMTPSA id pj12-20020a17090b4f4c00b00200b12f2bf5sm145037pjb.1.2022.10.17.13.25.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 13:25:08 -0700 (PDT) From: "Vishal Moola (Oracle)" <vishal.moola@gmail.com> 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)" <vishal.moola@gmail.com> Subject: [PATCH v3 15/23] f2fs: Convert last_fsync_dnode() to use filemap_get_folios_tag() Date: Mon, 17 Oct 2022 13:24:43 -0700 Message-Id: <20221017202451.4951-16-vishal.moola@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20221017202451.4951-1-vishal.moola@gmail.com> References: <20221017202451.4951-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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746968280477774579?= X-GMAIL-MSGID: =?utf-8?q?1746968280477774579?= |
Series |
Convert to filemap_get_folios_tag()
|
|
Commit Message
Vishal Moola
Oct. 17, 2022, 8:24 p.m. UTC
Convert to use a folio_batch instead of pagevec. This is in preparation for
the removal of find_get_pages_range_tag().
Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
---
fs/f2fs/node.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 38f32b4d61dc..3e1764960a96 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1515,23 +1515,24 @@ static void flush_inline_data(struct f2fs_sb_info *sbi, nid_t ino) static struct page *last_fsync_dnode(struct f2fs_sb_info *sbi, nid_t ino) { pgoff_t index; - struct pagevec pvec; + struct folio_batch fbatch; struct page *last_page = NULL; - int nr_pages; + int nr_folios; - pagevec_init(&pvec); + folio_batch_init(&fbatch); index = 0; - 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 (unlikely(f2fs_cp_error(sbi))) { f2fs_put_page(last_page, 0); - pagevec_release(&pvec); + folio_batch_release(&fbatch); return ERR_PTR(-EIO); } @@ -1562,7 +1563,7 @@ static struct page *last_fsync_dnode(struct f2fs_sb_info *sbi, nid_t ino) last_page = page; unlock_page(page); } - pagevec_release(&pvec); + folio_batch_release(&fbatch); cond_resched(); } return last_page;