Message ID | 20230104211448.4804-20-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 B320CC53210 for <linux-mm@archiver.kernel.org>; Wed, 4 Jan 2023 21:15:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B91088E0016; Wed, 4 Jan 2023 16:15:27 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B41D48E0001; Wed, 4 Jan 2023 16:15:27 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 944368E0016; Wed, 4 Jan 2023 16:15:27 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 8789B8E0001 for <linux-mm@kvack.org>; Wed, 4 Jan 2023 16:15:27 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 65A2F1403E1 for <linux-mm@kvack.org>; Wed, 4 Jan 2023 21:15:26 +0000 (UTC) X-FDA: 80318372652.16.7B006E0 Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by imf01.hostedemail.com (Postfix) with ESMTP id 9BCA040002 for <linux-mm@kvack.org>; Wed, 4 Jan 2023 21:15:24 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=JiIf52J1; spf=pass (imf01.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.216.45 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=1672866924; a=rsa-sha256; cv=none; b=5S7J8MQE6JPjvS4Q7TDXME1zY7ICyLMHxE/FH7064pd1ExVG3uSsotrhaH+FRlhJHdLSZE hrmRPyJxmSS88CFRttP4R80EbeRgKwtqIORcvh4xL4vCDa+lO4AY+eLifPOrrjXqadf2lv ykQef5j8dKITFmar760LtDkr6OzxQb0= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=JiIf52J1; spf=pass (imf01.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.216.45 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=1672866924; 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=wLGgwLr/csaNeBIMYfbH9zx9j3AdiWGm09ROWOa5iAY=; b=VtZhaPaM+JM0e8JY6T/E1VLturkEEKqE5nYXGZrMxf1J20987YPUxow3dlhUncKeJWdSFz dOS1xkau8m41nqwA7xbdEK7UaTVJizL5CSGrRkrom4BvJoZ8Qnu4hsse7CSszRdgF83PlB tsNsvd3/klKxE5t9Tw7EtO0MsFuvQQU= Received: by mail-pj1-f45.google.com with SMTP id o2so32019505pjh.4 for <linux-mm@kvack.org>; Wed, 04 Jan 2023 13:15:24 -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=wLGgwLr/csaNeBIMYfbH9zx9j3AdiWGm09ROWOa5iAY=; b=JiIf52J13fF3RZdd/gu8czce51QuNDKyRmp/RhQBZpiZeU3XEs1WalfwDAIkQP3i1h 7oaEZjWzR8v45uiToP37QSjLBQ6hFoKkzsu//TvxJBpZZTHSu/Ti+0DB14c/uViJpKft LemnBJAU1yNQKcrmO0+Bqi75NqwYHFoh6HrWlcKcA9N4lX0TdQaGXSiQJygzjTysgH/H Ppdlz/iLT+f5FltAthrg93ciA4z+S+CmoY6IExMFrN5abl65NskD8ykG3req494jeVOI SIJLZug6nx7VJLjV0ukQMkHOfmOMT4MrYPY4bGDi0laktjz8hyQhgyGhNDvAUwE+FMju 93bg== 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=wLGgwLr/csaNeBIMYfbH9zx9j3AdiWGm09ROWOa5iAY=; b=WiCXyhp0FyEfWcTDA26+zNu1A85ACLrya8HWCGiH1+9QCiOprPiOMC8LH94B+5ROUC EtTo+oF/n3SvmPQPmdYnc4uAPJJu5o3DCdwdj2gSnpoTR8dk/+Zze4XXbPr97vhSeG9l OwPX4BaP1Qr0DqL+t1aMlTXPY3NujYv7QC7AR1rIT7eE5hukU+gyIoi5bhrTuKfXNDq+ Vwsodr1rWCqHu4ViGrjNMPaFXppTbYa/TWGS5NnK6Z6/EPv/CPgkwQamoqfaRA0kePVL x+/5Sd0OSMXn8M8cRpnc3299paFp/G1BPIJ8ivN67hjm2Xs6AbHUZk4EM3GlxF1WFzS8 tJog== X-Gm-Message-State: AFqh2koNcPyn4K5Co+j4IsUn6HwCszfEp/NuoCgKSqIj8flIfXC3cDxz oIVXUyKQXSY+6xCD81WBbr0= X-Google-Smtp-Source: AMrXdXs7s+m/7nsrgJ9l/mJQIpEV7Y/DeAKat3L22TbeUL9zUgX6QTynjS3828Iu+F7/uHuvxs7fOw== X-Received: by 2002:a17:90b:794:b0:219:64ca:49a0 with SMTP id l20-20020a17090b079400b0021964ca49a0mr53526904pjz.22.1672866923492; Wed, 04 Jan 2023 13:15:23 -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.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Jan 2023 13:15:23 -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 19/23] nilfs2: Convert nilfs_lookup_dirty_node_buffers() to use filemap_get_folios_tag() Date: Wed, 4 Jan 2023 13:14:44 -0800 Message-Id: <20230104211448.4804-20-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-Rspam-User: X-Rspamd-Queue-Id: 9BCA040002 X-Rspamd-Server: rspam01 X-Stat-Signature: zfno8pgw8ecdqsfkbdtfywxq8fnoyyc6 X-HE-Tag: 1672866924-999594 X-HE-Meta: U2FsdGVkX18Xx7U2XxZcjFhc1JIDXMcL0NStnu6mM6KXHGt7s1y37htjkyPelI3QyVvdROuQ9Z+mAvo6OxcuRtxv1vVwcrL9e4A6o3Y7h41+dG+0BlD+z4qVZzxznFBvTGNaG9QTbjSW3dFkLhFgRwS2sxRZxlyzMz+kL6DyR6s1zQn75tm+iU27dWTlJz5iYgFkHiDP8Kad9ZW+pk6YLk6BpsgCMS2Nhh65LYjG1r3RL0NQ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ux-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/segment.c b/fs/nilfs2/segment.c index 8866af742a49..da56a9221277 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(); } }