Message ID | 20230104211448.4804-21-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 18105C46467 for <linux-mm@archiver.kernel.org>; Wed, 4 Jan 2023 21:15:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5EB978E0015; Wed, 4 Jan 2023 16:15:27 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 59CB38E0001; 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 4648C8E0015; Wed, 4 Jan 2023 16:15:27 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 37F448E0001 for <linux-mm@kvack.org>; Wed, 4 Jan 2023 16:15:27 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 1707540D3B for <linux-mm@kvack.org>; Wed, 4 Jan 2023 21:15:27 +0000 (UTC) X-FDA: 80318372694.11.60DA3D3 Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by imf03.hostedemail.com (Postfix) with ESMTP id 738AD20002 for <linux-mm@kvack.org>; Wed, 4 Jan 2023 21:15:25 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=l0t6NL5S; spf=pass (imf03.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=1672866925; 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=BlC7rcv7uN/Ok17R0azuMVwGkvRCqLRr8I16XJ1l0Zg=; b=V9ZDDNWltXqM5kW4vkwKpbndnjp9WbLUt56CxV6lbudEwjMm9hJByvTP13qIpu4vjXZ1nV EHMdHfcjGv9WJpTLz/1HXz4AupyqQq0BIC1y+J6rVHbsjVqXITYIUCXrJACbV4cgb3YQC6 sTCVVq1HRM/mXTn5oTKeGF+tJBEsf2Q= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=l0t6NL5S; spf=pass (imf03.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=1672866925; a=rsa-sha256; cv=none; b=RYnu5+iByRTXqNVNjqCXet2uIlpMx2bqHras/l9jZrbD2cURFRkd5fQmPSawq/rJSnvgLA AVfEHQsFKtd69uMGBzpZ5GZOmGKwXYwRaKJCyqpTDW8i/xb0MeCiqCG8RJ7fuV/mdE/lFG qObGAUORJqKaPoPX+/IZtEEV7DUoSf8= Received: by mail-pl1-f169.google.com with SMTP id d15so37216306pls.6 for <linux-mm@kvack.org>; Wed, 04 Jan 2023 13:15:25 -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=BlC7rcv7uN/Ok17R0azuMVwGkvRCqLRr8I16XJ1l0Zg=; b=l0t6NL5SCvyD8kdyfFc7nOlzhreLq5VCcEZoAPCjS9SYlOOIdyy01o8enEBrI/r1kI ge7wlbNG0U5OHLin8Sv0DJ9D+P9p9F9nvhdVsVzqSo2MjhW1QMKBlTmQftWK0E3Sq3mX s5i3P5LahXYCAZDxiD7TON2xAC7xlyma9HMVO7+C60fEOzvSJBRZE+ygGDT49ocIptx1 ZqodBy1UQufx3eUsdyctWHg9lneTCyK6t6QfTsYnGyQ1gnGKfPEGcEh9fBK7H9Fo86Cv 0aWOKjYHhKUcF745lohZ9dh0iABWPhdJYkbVa6/m4X3OwsSxOaXcOBpLjiswo+OAnLFc jYVA== 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=BlC7rcv7uN/Ok17R0azuMVwGkvRCqLRr8I16XJ1l0Zg=; b=V8UwNyCfVGW4k38THZynNoNz1Kc1eH3IcwnwCMsqQxjIHadstA+gxPUTZSd4H61jj+ GIRhngyfERFN6TeuYJYS4dofCQ4YBPIMdbr6SHpL8an/wLOwe5PRxZkEECgi15+bXai0 CgTLhzDeP92DR2rm6Psw/6vkctNT3BPbKAD/8QiYS0bEYLrG9P9JqfsDgyGYZgF2SoQU fCIpFlSKQiRF7tyEbvxF3XYFwv/pchz0PQ+X9Ihs1bzkz1Aao3egNQj3Cnw7aBJnaiUg Rad3TRW5rw6VKnLXUgwzcPoBvcLYLfUljyNYclxD8Ai/CYUMqttymUb/O0XHZCL4TdSh qurw== X-Gm-Message-State: AFqh2kqQ9sjeErUs7NgeQEnuEDGAa82MYLvIpIeXbqnRcCNpl81d7NKX kls4etmssi9SeClYqXLeOmU= X-Google-Smtp-Source: AMrXdXtmjSnTHrGQEHw6VbNzkxfY/pt2X9Tas5/n9E/HJyc3xHf0BuAuSYZ6Gu+13LxzPXvTYPQi8g== X-Received: by 2002:a17:90a:7341:b0:225:f7b3:aebf with SMTP id j1-20020a17090a734100b00225f7b3aebfmr34765688pjs.30.1672866924907; Wed, 04 Jan 2023 13:15:24 -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.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Jan 2023 13:15:24 -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 20/23] nilfs2: Convert nilfs_btree_lookup_dirty_buffers() to use filemap_get_folios_tag() Date: Wed, 4 Jan 2023 13:14:45 -0800 Message-Id: <20230104211448.4804-21-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-Server: rspam04 X-Rspamd-Queue-Id: 738AD20002 X-Stat-Signature: 75xcfd887ce518zwwyor14mfrmcei9xr X-HE-Tag: 1672866925-307502 X-HE-Meta: U2FsdGVkX18fGWxKK9Y49UhIpDx8EwjrzUhLaqtPMcjViHt4sY2hOWmErV3LuwNDHQwJB3MirUp0OwJGzOu+B2Wnk6ahBNLL+SNJU6dFApGshjCk+oTgN5m2ntC13EWQEJeDnMei+iiPoHhltmVRsQ/U80WLvRnKjatyIgb+YXalTf/UrpYtgP8h+9LvgMYl+dgeYRdclgZSGhvK6JHi4Fjr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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/btree.c b/fs/nilfs2/btree.c index b9d15c3df3cc..da6a19eede9a 100644 --- a/fs/nilfs2/btree.c +++ b/fs/nilfs2/btree.c @@ -2141,7 +2141,7 @@ static void nilfs_btree_lookup_dirty_buffers(struct nilfs_bmap *btree, struct inode *btnc_inode = NILFS_BMAP_I(btree)->i_assoc_inode; struct address_space *btcache = btnc_inode->i_mapping; struct list_head lists[NILFS_BTREE_LEVEL_MAX]; - struct pagevec pvec; + struct folio_batch fbatch; struct buffer_head *bh, *head; pgoff_t index = 0; int level, i; @@ -2151,19 +2151,19 @@ static void nilfs_btree_lookup_dirty_buffers(struct nilfs_bmap *btree, level++) INIT_LIST_HEAD(&lists[level]); - pagevec_init(&pvec); + folio_batch_init(&fbatch); - while (pagevec_lookup_tag(&pvec, btcache, &index, - PAGECACHE_TAG_DIRTY)) { - for (i = 0; i < pagevec_count(&pvec); i++) { - bh = head = page_buffers(pvec.pages[i]); + while (filemap_get_folios_tag(btcache, &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)) nilfs_btree_add_dirty_buffer(btree, lists, bh); } while ((bh = bh->b_this_page) != head); } - pagevec_release(&pvec); + folio_batch_release(&fbatch); cond_resched(); }