From: Joanne Koong <joannelkoong@gmail.com>
To: Josef Bacik <josef@toxicpanda.com>
Cc: linux-fsdevel@vger.kernel.org, amir73il@gmail.com,
miklos@szeredi.hu, kernel-team@fb.com
Subject: Re: [PATCH v3 09/10] fuse: convert fuse_retrieve to use folios
Date: Fri, 27 Sep 2024 15:59:48 -0700 [thread overview]
Message-ID: <CAJnrk1ZCU_eiWc_52sD0FDuWarur+S76JbR50bzuCWnYzunWOQ@mail.gmail.com> (raw)
In-Reply-To: <5b0e4f2c48a04d66dfe70f8228b05ebc53be6a00.1727469663.git.josef@toxicpanda.com>
On Fri, Sep 27, 2024 at 1:45 PM Josef Bacik <josef@toxicpanda.com> wrote:
>
> We're just looking for pages in a mapping, use a folio and the folio
> lookup function directly instead of using the page helper.
>
> Reviewed-by: Joanne Koong <joannelkoong@gmail.com>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> ---
> fs/fuse/dev.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
> index 1f64ae6d7a69..4c58113eb6a1 100644
> --- a/fs/fuse/dev.c
> +++ b/fs/fuse/dev.c
> @@ -1756,15 +1756,15 @@ static int fuse_retrieve(struct fuse_mount *fm, struct inode *inode,
> index = outarg->offset >> PAGE_SHIFT;
>
> while (num && ap->num_pages < num_pages) {
> - struct page *page;
> + struct folio *folio;
> unsigned int this_num;
>
> - page = find_get_page(mapping, index);
> - if (!page)
> + folio = __filemap_get_folio(mapping, index, 0, 0);
I think you can also just use "filemap_get_folio(mapping, index);" here
> + if (IS_ERR(folio))
> break;
>
> this_num = min_t(unsigned, num, PAGE_SIZE - offset);
> - ap->pages[ap->num_pages] = page;
> + ap->pages[ap->num_pages] = &folio->page;
> ap->descs[ap->num_pages].offset = offset;
> ap->descs[ap->num_pages].length = this_num;
> ap->num_pages++;
> --
> 2.43.0
>
next prev parent reply other threads:[~2024-09-27 23:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-27 20:44 [PATCH v3 00/10] fuse: folio conversions Josef Bacik
2024-09-27 20:44 ` [PATCH v3 01/10] fuse: convert readahead to use folios Josef Bacik
2024-09-27 22:22 ` Joanne Koong
2024-09-30 13:33 ` Josef Bacik
2024-09-27 20:44 ` [PATCH v3 02/10] fuse: convert fuse_send_write_pages " Josef Bacik
2024-09-27 22:24 ` Joanne Koong
2024-09-27 20:44 ` [PATCH v3 03/10] fuse: convert fuse_fill_write_pages " Josef Bacik
2024-09-27 22:36 ` Joanne Koong
2024-09-27 20:44 ` [PATCH v3 04/10] fuse: convert fuse_page_mkwrite " Josef Bacik
2024-09-27 22:42 ` Joanne Koong
2024-09-27 20:44 ` [PATCH v3 05/10] fuse: use kiocb_modified in buffered write path Josef Bacik
2024-09-27 20:44 ` [PATCH v3 06/10] fuse: convert fuse_do_readpage to use folios Josef Bacik
2024-09-27 22:51 ` Joanne Koong
2024-09-30 13:39 ` Josef Bacik
2024-09-27 20:44 ` [PATCH v3 07/10] fuse: convert fuse_writepage_need_send to take a folio Josef Bacik
2024-09-27 22:55 ` Joanne Koong
2024-09-27 20:44 ` [PATCH v3 08/10] fuse: use the folio based vmstat helpers Josef Bacik
2024-09-27 20:45 ` [PATCH v3 09/10] fuse: convert fuse_retrieve to use folios Josef Bacik
2024-09-27 22:59 ` Joanne Koong [this message]
2024-09-27 20:45 ` [PATCH v3 10/10] fuse: convert fuse_notify_store " Josef Bacik
2024-09-27 23:08 ` Joanne Koong
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=CAJnrk1ZCU_eiWc_52sD0FDuWarur+S76JbR50bzuCWnYzunWOQ@mail.gmail.com \
--to=joannelkoong@gmail.com \
--cc=amir73il@gmail.com \
--cc=josef@toxicpanda.com \
--cc=kernel-team@fb.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
/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).