Message ID | 20230104211448.4804-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 339DFC46467 for <linux-mm@archiver.kernel.org>; Wed, 4 Jan 2023 21:15:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 26A648E000E; Wed, 4 Jan 2023 16:15:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1F3838E0001; Wed, 4 Jan 2023 16:15:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0B9978E000E; Wed, 4 Jan 2023 16:15:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id F0EFE8E0001 for <linux-mm@kvack.org>; Wed, 4 Jan 2023 16:15:30 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id B6FD6C0AF7 for <linux-mm@kvack.org>; Wed, 4 Jan 2023 21:15:30 +0000 (UTC) X-FDA: 80318372820.11.A886F9C Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by imf08.hostedemail.com (Postfix) with ESMTP id 0AABD16000A for <linux-mm@kvack.org>; Wed, 4 Jan 2023 21:15:28 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=UBQCqBmy; spf=pass (imf08.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.214.169 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1672866929; 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=T3e61Fb9Dqh0rLEzgpxaQ/B901JahzW9QwTImcYRDNk=; b=n30lP1XY85IEbWXoWSsGnAtn2oiUcDZVyPOyfU24ZwoROB4tuanrqlLECJ3QXKdrDAGtKO /hxJjb/CbdODkgFhm8nRiGN6W1mR7L8vXDsGUdtKCnMWO7yvnE2UG6UbNjxkjasYnS1wLd /XE48pmx0aUlAUqsz58QXFcK/1j8CqA= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=UBQCqBmy; spf=pass (imf08.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.214.169 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1672866929; a=rsa-sha256; cv=none; b=Rsx2oIkRcY+z34sDQprjl4+dqLgvFAlmZSu3pfpNbKATNYX0ox2Y8igwkMem5F+kCtLF51 myK7rsD9ug34gLQ0V+eYny2lGNYsEpCmR5pnL0k9rPinwNuFhPfIq7frQObl3WP5KClnIE K+4x9xeY8EJzU1M/XaDzV6lHPlWjtw8= Received: by mail-pl1-f169.google.com with SMTP id d3so37196247plr.10 for <linux-mm@kvack.org>; Wed, 04 Jan 2023 13:15:28 -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=T3e61Fb9Dqh0rLEzgpxaQ/B901JahzW9QwTImcYRDNk=; b=UBQCqBmywL4fUPJmhQf3YO25m2vTpABZ7JRHVBIp9YSGM9aBhK1+4doRUWlbWnsNJ9 Ri79O/oHwGRqdLDoOxs8sNow2cNgbFMi6rZM99Z8qkiDtf5RaRCZ4Kiu+XAw3ND4YT+u uDMmwZa8+WDxJFatrXomU6Jxo2q5TCu5LR8/+XU4bnk9/TKJjWw5uFp/Zql3YXSztlcv tPDl0TN6IFTK0eTV0pDEOzPAZKdfzyEuk26yFkDyIUgZjfBa24lNPQ9yT8SpkbUHty0V Dwqcs2O9toxSYT9cJLwgyCSs/UOYEjGnysOmE6RW+/9UzSlDVIaa12qs1vX0TjSJY9qH c1xg== 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=T3e61Fb9Dqh0rLEzgpxaQ/B901JahzW9QwTImcYRDNk=; b=sL/Zk7wvRZnoXuykUnmu+e5DiaYZFnojNPR2ykIF5FI0+R09S1vcaGsqXKvKl/5mT5 Oi6KIu78xcpfkCofBuqCNMeW+inNvRWlxSF5PlQ27YiioMPw4GPAFRWyvV9mEwb9/LIZ OQWV8qPrH8sES6/rsPkpNQeXBpmKiWNiPIGqd9jcqlXlwOCtqRwvjp+1lijQIACuii+v I6SH/NOXZaWCJREudRh8DDtm7V7OWxTqtHXeOWEORW9RFKKqZji6wQvjpbtFvb1ocDaS Ux0EgG76I3NF2/mRRTfQkKHy1PHMYS/hsGHlq7o8FVR3aGDRf1soM2yvzhXsojgBdAOf qlpg== X-Gm-Message-State: AFqh2krOXO8U1ULq8LAFOpXno5Pv1FlapLVNuX3KdQ96SeNheD7KbEkK Mkt6P4Z9udld6CltJJjZPCw= X-Google-Smtp-Source: AMrXdXt6Y0kwAGb+h+EXze57cC4InRsKukIyGk3OA1Pq+5Y3FkKS+kdTcpuCqYx01FIOGAuf7ZNWuA== X-Received: by 2002:a17:90b:92:b0:225:eda7:13e with SMTP id bb18-20020a17090b009200b00225eda7013emr35758753pjb.40.1672866927791; Wed, 04 Jan 2023 13:15:27 -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.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Jan 2023 13:15:27 -0800 (PST) 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 v5 22/23] nilfs2: Convert nilfs_clear_dirty_pages() to use filemap_get_folios_tag() Date: Wed, 4 Jan 2023 13:14:47 -0800 Message-Id: <20230104211448.4804-23-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-Rspamd-Queue-Id: 0AABD16000A X-Stat-Signature: nji465e8jxjatfzr7szi9ig59t8z4qg7 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1672866928-494033 X-HE-Meta: U2FsdGVkX19M55hXPXzmNQ66WOJGIjLkBjOHHEjKul/P1fjkHhifOLV2mqIes4JTE+/mmTK/EGnjkwD6iKm2IOYj3XNaoeIvsNvQa6mWGqWp93Vwoq87V9JSBqv/LtkSLxyt9dTuDbAT5F0tVxuwAV36CpsDJYplIYIV8mPr+K0GJUGgDKnBijSc0ilAQDBjUCCrP/T+5/yI5BlxgoaiWH6vIn2RM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 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(); } }