From: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
To: "idryomov@gmail.com" <idryomov@gmail.com>,
"willy@infradead.org" <willy@infradead.org>
Cc: "ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
David Howells <dhowells@redhat.com>
Subject: Re: [PATCH v2 5/7] ceph: Convert ceph_readdir_cache_control to store a folio
Date: Fri, 14 Feb 2025 19:10:26 +0000 [thread overview]
Message-ID: <da997962ce076d3962948d5404f51074a6829bf8.camel@ibm.com> (raw)
In-Reply-To: <20250214155710.2790505-6-willy@infradead.org>
On Fri, 2025-02-14 at 15:57 +0000, Matthew Wilcox (Oracle) wrote:
> Pass a folio around instead of a page. This removes an access to
> page->index and a few hidden calls to compound_head().
>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> ---
> fs/ceph/dir.c | 13 +++++++------
> fs/ceph/inode.c | 26 ++++++++++++++------------
> fs/ceph/super.h | 2 +-
> 3 files changed, 22 insertions(+), 19 deletions(-)
>
> diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
> index 62e99e65250d..66f00604c86b 100644
> --- a/fs/ceph/dir.c
> +++ b/fs/ceph/dir.c
> @@ -141,17 +141,18 @@ __dcache_find_get_entry(struct dentry *parent, u64 idx,
> if (ptr_pos >= i_size_read(dir))
> return NULL;
>
> - if (!cache_ctl->page || ptr_pgoff != cache_ctl->page->index) {
> + if (!cache_ctl->folio || ptr_pgoff != cache_ctl->folio->index) {
> ceph_readdir_cache_release(cache_ctl);
> - cache_ctl->page = find_lock_page(&dir->i_data, ptr_pgoff);
> - if (!cache_ctl->page) {
> + cache_ctl->folio = filemap_lock_folio(&dir->i_data, ptr_pgoff);
> + if (IS_ERR(cache_ctl->folio)) {
> + cache_ctl->folio = NULL;
> doutc(cl, " page %lu not found\n", ptr_pgoff);
Maybe, we need to change debug output here too?
doutc(cl, " folio %lu not found\n", ptr_pgoff);
Thanks,
Slava.
next prev parent reply other threads:[~2025-02-14 19:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-14 15:57 [PATCH v2 0/7] Remove accesses to page->index from ceph Matthew Wilcox (Oracle)
2025-02-14 15:57 ` [PATCH v2 1/7] ceph: Do not look at the index of an encrypted page Matthew Wilcox (Oracle)
2025-02-14 15:57 ` [PATCH v2 2/7] ceph: Remove ceph_writepage() Matthew Wilcox (Oracle)
2025-02-14 15:57 ` [PATCH v2 3/7] ceph: Use a folio in ceph_page_mkwrite() Matthew Wilcox (Oracle)
2025-02-14 19:05 ` Viacheslav Dubeyko
2025-02-14 15:57 ` [PATCH v2 4/7] ceph: Convert ceph_find_incompatible() to take a folio Matthew Wilcox (Oracle)
2025-02-14 15:57 ` [PATCH v2 5/7] ceph: Convert ceph_readdir_cache_control to store " Matthew Wilcox (Oracle)
2025-02-14 19:10 ` Viacheslav Dubeyko [this message]
2025-02-14 19:34 ` Matthew Wilcox
2025-02-14 19:38 ` Viacheslav Dubeyko
2025-02-14 15:57 ` [PATCH v2 6/7] ceph: Convert writepage_nounlock() to write_folio_nounlock() Matthew Wilcox (Oracle)
2025-02-14 15:57 ` [PATCH v2 7/7] ceph: Use a folio in ceph_writepages_start() Matthew Wilcox (Oracle)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=da997962ce076d3962948d5404f51074a6829bf8.camel@ibm.com \
--to=slava.dubeyko@ibm.com \
--cc=ceph-devel@vger.kernel.org \
--cc=dhowells@redhat.com \
--cc=idryomov@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).