Message ID | 20230104211448.4804-13-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 47089C54EBF for <linux-mm@archiver.kernel.org>; Wed, 4 Jan 2023 21:15:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 688998E000F; Wed, 4 Jan 2023 16:15:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 611A08E0001; Wed, 4 Jan 2023 16:15:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 463B78E000F; Wed, 4 Jan 2023 16:15:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 37CB98E0001 for <linux-mm@kvack.org>; Wed, 4 Jan 2023 16:15:16 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 19675120406 for <linux-mm@kvack.org>; Wed, 4 Jan 2023 21:15:16 +0000 (UTC) X-FDA: 80318372232.17.EB13013 Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by imf29.hostedemail.com (Postfix) with ESMTP id 6C37712000A for <linux-mm@kvack.org>; Wed, 4 Jan 2023 21:15:14 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=nqEuKaTI; spf=pass (imf29.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.216.53 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=1672866914; 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=5JTMc/Rft/vIyJlvWKFcn8nkQrf+O33NuNawnN6rRgI=; b=R46fMIPNtffko2hMzBCAonHXZpmJLHFKfRz5/VfrJxLApPCDMoi67lQYlrbppxhm7Gm0kU BODMvj5WC8/xXV1GJeRyL+/3E3Hc9QFgEl7ivNy8EmNwoAUHIEfxPgnrkdKx3tm0KSAHG/ Rp5yi+gaWciPj1wge2dOQia2OqHHRWM= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=nqEuKaTI; spf=pass (imf29.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.216.53 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=1672866914; a=rsa-sha256; cv=none; b=mviljtWpKHBlSk0rfuHr/Oj7HSNSUjz86EXXQB6Rio7En7Vit6ozQMrxUi3fpEBveNfyyT 09KXT+QltOjJ34ADlRCpIYzEeqxH0BMLgb+At1Sh7uzRH1SrY+bYQmsU976pwKbOiPOzxo UZxeXlaoFh91V+1J85v2RgAxnJXCtCE= Received: by mail-pj1-f53.google.com with SMTP id v23so37529916pju.3 for <linux-mm@kvack.org>; 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=LaAfMuUuNOumJjnsNqc9QD4XztXmy4VM+++Paq0uMrGRTmnET64VIsjJB2p0qrOeTc glKi9wuiBTftUFVPu+f0WYp+7rYXXFXurfTQurnLzMMqSfwLcTpmMSHi527Eu4DRHunH u3lg3yDSEzqfrP5yRx2tNyorr1VS+dQMFKQVQw72W1Iav5wLpTzM44rxIGIOrelF+t7W wugGPvzpTLxyXVZAtXUhIUcoV1wWQ/6N9IstU36S+n1W1GyrhfIWBKhUjH2uDo1QBFWv pLC/nxUeejoo9UM5VcU69VObE2kuQcN9Yi+bO5YcoRqt3HgwDii9EuvDMYzuR4IO0xfw f/0w== X-Gm-Message-State: AFqh2kpD3SqmTgwHuwJC5zAz9f9s5LksFPoiBhxHmMrtrEliccWAH5KV HdZg/nOD2VOJ0yY2TsF9irc= X-Google-Smtp-Source: AMrXdXs4LlgTrixclkrOcCZrpN6SR5Ezctmf4LJMRiV2PQ69qXIMCxzU7F8St0tY9EKMLcnxhYsTtw== 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)" <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>, Chao Yu <chao@kernel.org> 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-Stat-Signature: m8u8ftxhezkh5kkpxeocpdmb31forhcq X-Rspam-User: X-Rspamd-Queue-Id: 6C37712000A X-Rspamd-Server: rspam06 X-HE-Tag: 1672866914-683709 X-HE-Meta: U2FsdGVkX1+O+yoqwQ5oyyKXOJ0lu8uTKQc/aeRnADp0bvAiHKsTR7tMXFMfmpqg0kz93osiVIMU36gFYnU5APbCMm+2e85Tgdo1x4pVlKuHtjKz0ukfZwhJUDbSjHiXgQm2VLyvxHZ2oLy0MRGoex/L916hQ3Jm88XF7o4UyU/+03hMrvxiX7BVYuI6B6ZJidK6eiXZai3pi1jZO27UwIZJUpzK/QR0thA3Iv7jbNYVb9Lb3ygp1XbQj3R1MWMsXS887S9eKor9z/tL0sKZeRMysN5oTK4sZ7wFgpMUpeclzIDsqozSWjZKvlJucS3R3QITuLb3csoLAfqktLqEpEFDF9a2mI+ci5X3CqVdpNoPLhPu1drDPV/C9JU6JGMDIw5b5x4YVHjtMk4YU0+vB03X3EebJV0jg5qkfAP5637eIXn1+uPhjy8T2PCXzxLsN+AecZ9XLXvAwOjAddJzdFGKMVOJvunanoEcRg46RhZqfScpZg1jSFBqE532oKNAct9aZNP5sDE6GhJywWrYAcPfsbxYe2RYSgCR/W3uh8pECrs0vDRs2RYmgrkwT/3SwlPetQcD1EVW1zV3o6PFqKS4lm/RkJTqRBIuQUQuafvUOPwae2Ea8FTx7t6p6x12H00sQ+8JVwh5ZTllfPVUN88wilz9HEb69e/8VakEZdaFEKrEyD69o/UM/x/E/Zvha8mtvOUbySUOTZlRjNo+memSPNDfG4L99FQUtF6PQxzxZmaJAQsHfFz6dCPoyc5SfFo3MYM25+aiL5OzbJ0s6dUB+RSiLrimj8SksT0WzIbxTgups/KfP/N6iH5nd56zO0XH3a9PnNqopFnsP8H2BBCpiaMFJeol3aumjLhnAHbLq/LTAgjs7kERRR+DUXYrusCnql0KXTrMyiUBKrk2pdsB6EvaNKQTlLZXUYGHmJWwnpjbWuQ95QE6e4BrY/Rp8dRUv5bDAU8MEfcGMp6 NuHmI5vy /iK3uCKab2m/rNaR+Rnd1O8Gb51YIHZp0jRStUkcQynKW1LjdF9H1FhCCaGoxmGLUBK7aOpTKAQf37H9dUPeQBFkXHv2YmUKSTZIDtfvH+GVubeg/eUYbtGja5pIgC5EKNSJmqNJ91721zCc9I4rPpxZgmc4zcLlFzhvaKmwTmxtvksrlLeqA7yIS460In2SCx7mwfEV3whmhqhASmFf1jtUuCVJa8vCQFYP8quLvkIOoQnB+O5H3LUqbPral1WwqXZ7KtwIk8lmJQO1d3YXPhKHqbg== 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/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(); } }