Message ID | 20221017202451.4951-23-vishal.moola@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5764EC433FE for <linux-mm@archiver.kernel.org>; Mon, 17 Oct 2022 20:25:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2ECD46B009D; Mon, 17 Oct 2022 16:25:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 27C276B009E; Mon, 17 Oct 2022 16:25:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 163E26B009F; Mon, 17 Oct 2022 16:25:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 02F716B009D for <linux-mm@kvack.org>; Mon, 17 Oct 2022 16:25:18 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id D0E5D1A0F25 for <linux-mm@kvack.org>; Mon, 17 Oct 2022 20:25:17 +0000 (UTC) X-FDA: 80031571074.11.1D3F083 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by imf02.hostedemail.com (Postfix) with ESMTP id 8C86A80035 for <linux-mm@kvack.org>; Mon, 17 Oct 2022 20:25:17 +0000 (UTC) Received: by mail-pl1-f180.google.com with SMTP id h2so4466104plb.2 for <linux-mm@kvack.org>; Mon, 17 Oct 2022 13:25:17 -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=vEJiD15A68fC6SKwYs5XNRqfHJAp+vmoTIHZ0Wq7X1E=; b=HuFrfcPO7PV53ayIMggGbnfzpHoeRQFhEFVQOHPc6PzciA7uBE16kgNsOTzTc1N9dJ 2hSJwfj31GhqB57Dr9/JR3txjsKxYKd0DISzk5VV/d3E3Vvva9/OdBLRndwoGjHrDXuK 3qY8DRPEAXcVMt/sdZ/bgfMCfvzda7cDqa8pI+Md0v4rCay9b1P1aDFJ+wuv/xkwhjDh 0KtsJUtybAp1KLL3S4A3UmyZmXQ8CTdDX6Bkp+k+AXUIgWAtr3eIZaG4Vz97JDWv8G7t DfxB/Jkfg4jPAEaUIknmd3fhww6CnCHqRF/goZ5vhsIyCSXiY5Ug+9SlNiOQCIqmtJWg 3FVg== 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=vEJiD15A68fC6SKwYs5XNRqfHJAp+vmoTIHZ0Wq7X1E=; b=Sdmisml3Ej9LSuFil7fTyl/9U6T8MsLYiapSzGeEBfFH6TnembP/AkbcwadTMirmQF lXpmXlDvjUM7tK/0EllJGzhfSDpFYyMqyvTg/J/oL93o2sBDTc6YzXW+b5L/uGaSuWuS +XXxpqFGljcl/697zSi+mWseN4UAwfi3ViSbfq3vpxFy2lZszO5Fcsq0sQdJ/uYD9tMi UX9Txp9bh7Id2zPFT3qipl6ttpMLR9IQluEh5WbeZTJRDUniLpdYzISIJI6LLg2LxaS8 U1/+fUByY+e24mqnHNAHLiKWxWC91AoOc34FDqLDVRXY8Wp9dtretHS9UTv52OuRPUjq V5rQ== X-Gm-Message-State: ACrzQf1Zk04zKbobn0+YI+5CBe1HFBPREPAape8yMVYz1uhS6qn0Prv3 OZxlxjr/t20VmGPBoP6sUVtsuBQOE0OhVA== X-Google-Smtp-Source: AMsMyM7NCPquviHbr1ViT+Zn2xCx1V3w/gqj9EI3FyaFAgvANG2ME7aA/s6o30lzSxwKI6TzBYUiPA== X-Received: by 2002:a17:90a:e7d0:b0:20c:169f:7503 with SMTP id kb16-20020a17090ae7d000b0020c169f7503mr34763255pjb.175.1666038316564; Mon, 17 Oct 2022 13:25:16 -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.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 13:25:16 -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>, Ryusuke Konishi <konishi.ryusuke@gmail.com> Subject: [PATCH v3 22/23] nilfs2: Convert nilfs_clear_dirty_pages() to use filemap_get_folios_tag() Date: Mon, 17 Oct 2022 13:24:50 -0700 Message-Id: <20221017202451.4951-23-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 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666038317; a=rsa-sha256; cv=none; b=Sm7k481bhQabTJBZr74j0H2GSvksjbQJziDJCRIMD0RfyN1lAdO5hmTOXjgGUnMPhMol9L uZjM/ZwXB70vH2LvzO0QL6DJ34sT2dPW7FNP19gzEiUafyahXZ6Mxg/EcEemURU161TV5T lsidFvHZ2Kq55pyniAq3LGLCyi82MnQ= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=HuFrfcPO; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf02.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.214.180 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666038317; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=vEJiD15A68fC6SKwYs5XNRqfHJAp+vmoTIHZ0Wq7X1E=; b=MzeBBNHywNha6YCQHnvI+PLNsf4i1lJPUKd5OHNylhv/HbmFZAo9pgdgGhssVeEJNvfmkK 1VuBld+znhaHkrawR3pXuFpSNvqfiayORrzJ9hZDb74T8+DhYw5GV0KJS7WUR2+SgtmHGm u6cd/XqiH1cGvTlRuS2v/QA5bwZGjlY= X-Stat-Signature: z4xncn1f9smt4sit91r3mrwhegk4559z X-Rspamd-Queue-Id: 8C86A80035 X-Rspam-User: Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=HuFrfcPO; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf02.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.214.180 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com X-Rspamd-Server: rspam11 X-HE-Tag: 1666038317-364797 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
Convert to filemap_get_folios_tag()
|
expand
|
diff --git a/fs/nilfs2/page.c b/fs/nilfs2/page.c index d921542a9593..41ccd43cd979 100644 --- a/fs/nilfs2/page.c +++ b/fs/nilfs2/page.c @@ -358,22 +358,22 @@ void nilfs_copy_back_pages(struct address_space *dmap, */ void nilfs_clear_dirty_pages(struct address_space *mapping, bool silent) { - struct pagevec pvec; + struct folio_batch fbatch; unsigned int i; pgoff_t index = 0; - pagevec_init(&pvec); + folio_batch_init(&fbatch); - while (pagevec_lookup_tag(&pvec, mapping, &index, - PAGECACHE_TAG_DIRTY)) { - for (i = 0; i < pagevec_count(&pvec); i++) { - struct page *page = pvec.pages[i]; + while (filemap_get_folios_tag(mapping, &index, (pgoff_t)-1, + PAGECACHE_TAG_DIRTY, &fbatch)) { + for (i = 0; i < folio_batch_count(&fbatch); i++) { + struct folio *folio = fbatch.folios[i]; - lock_page(page); - nilfs_clear_dirty_page(page, silent); - unlock_page(page); + folio_lock(folio); + nilfs_clear_dirty_page(&folio->page, silent); + folio_unlock(folio); } - pagevec_release(&pvec); + folio_batch_release(&fbatch); cond_resched(); } }