From: Kairui Song <ryncsn@gmail.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@redhat.com>,
Hugh Dickins <hughd@google.com>, Chris Li <chrisl@kernel.org>,
Yosry Ahmed <yosryahmed@google.com>,
"Huang, Ying" <ying.huang@linux.alibaba.com>,
Nhat Pham <nphamcs@gmail.com>,
Johannes Weiner <hannes@cmpxchg.org>,
linux-kernel@vger.kernel.org, Miklos Szeredi <miklos@szeredi.hu>,
Joanne Koong <joannelkoong@gmail.com>,
Josef Bacik <josef@toxicpanda.com>,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 1/6] fuse: drop usage of folio_index
Date: Tue, 29 Apr 2025 16:54:11 +0800 [thread overview]
Message-ID: <CAMgjq7BT38kCb_c=OLmt3EOSi-wFgGG7KLuSJLkm1Er9HF4wfg@mail.gmail.com> (raw)
In-Reply-To: <aA7N1SHoR-tY4PJW@casper.infradead.org>
On Mon, Apr 28, 2025 at 8:38 AM Matthew Wilcox <willy@infradead.org> wrote:
>
> On Mon, Apr 28, 2025 at 02:59:03AM +0800, Kairui Song wrote:
> > folio_index is only needed for mixed usage of page cache and swap
> > cache, for pure page cache usage, the caller can just use
> > folio->index instead.
> >
> > It can't be a swap cache folio here. Swap mapping may only call into fs
> > through `swap_rw` and that is not supported for fuse. So just drop it
> > and use folio->index instead.
> >
> > uigned-off-by: Kairui Song <kasong@tencent.com>
> > Cc: Miklos Szeredi <miklos@szeredi.hu>
> > Cc: Joanne Koong <joannelkoong@gmail.com>
> > Cc: Josef Bacik <josef@toxicpanda.com>
> > Cc: linux-fsdevel@vger.kernel.org
> > Signed-off-by: Kairui Song <kasong@tencent.com>
>
> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Thanks for the review.
>
> > @@ -2349,7 +2349,7 @@ static bool fuse_writepage_need_send(struct fuse_conn *fc, struct folio *folio,
> > return true;
> >
> > /* Discontinuity */
> > - if (data->orig_folios[ap->num_folios - 1]->index + 1 != folio_index(folio))
> > + if (data->orig_folios[ap->num_folios - 1]->index + 1 != folio->index)
> > return true;
>
> This looks like a pre-existing bug.
>
> - if (data->orig_folios[ap->num_folios - 1]->index + 1 != folio_index(folio))
> + prev_folio = data->orig_folios[ap->num_folios - 1];
> + if (prev_folio->index + folio_nr_pages(prev_folio) != folio->index)
> return true;
>
It seems FUSE does not work with high order folios yet, a lot of
allocation and operation here are assuming folio size == PAGE_SIZE. I
think I'll just leave it here.
next prev parent reply other threads:[~2025-04-29 8:54 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-27 18:59 [PATCH 0/6] mm, swap: clean up swap cache mapping helper Kairui Song
2025-04-27 18:59 ` [PATCH 1/6] fuse: drop usage of folio_index Kairui Song
2025-04-28 0:37 ` Matthew Wilcox
2025-04-29 8:54 ` Kairui Song [this message]
2025-04-27 18:59 ` [PATCH 2/6] btrfs: " Kairui Song
2025-04-28 0:38 ` Matthew Wilcox
2025-04-28 0:54 ` Qu Wenruo
2025-04-28 2:14 ` Kairui Song
2025-04-27 18:59 ` [PATCH 3/6] f2fs: " Kairui Song
2025-04-28 0:41 ` Matthew Wilcox
2025-04-28 2:15 ` Kairui Song
2025-06-09 20:56 ` [f2fs-dev] " patchwork-bot+f2fs
2025-04-27 18:59 ` [PATCH 4/6] filemap: do not use folio_contains for swap cache folios Kairui Song
2025-04-28 0:44 ` Matthew Wilcox
2025-04-28 2:58 ` Kairui Song
2025-04-28 18:54 ` Kairui Song
2025-04-27 18:59 ` [PATCH 5/6] mm: move folio_index to mm/swap.h and remove no longer needed helper Kairui Song
2025-04-27 21:37 ` kernel test robot
2025-04-27 22:19 ` kernel test robot
2025-04-27 23:58 ` Matthew Wilcox
2025-04-28 3:14 ` Kairui Song
2025-04-27 18:59 ` [PATCH 6/6] mm, swap: remove no longer used swap mapping helper Kairui Song
2025-04-28 0:31 ` Matthew Wilcox
2025-04-27 19:02 ` [PATCH 0/6] mm, swap: clean up swap cache " Kairui Song
2025-04-28 0:34 ` Matthew Wilcox
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='CAMgjq7BT38kCb_c=OLmt3EOSi-wFgGG7KLuSJLkm1Er9HF4wfg@mail.gmail.com' \
--to=ryncsn@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=chrisl@kernel.org \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=joannelkoong@gmail.com \
--cc=josef@toxicpanda.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=miklos@szeredi.hu \
--cc=nphamcs@gmail.com \
--cc=willy@infradead.org \
--cc=ying.huang@linux.alibaba.com \
--cc=yosryahmed@google.com \
/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