Re: [PATCH 1/6] fuse: drop usage of folio_index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 28, 2025 at 8:38 AM Matthew Wilcox <willy@xxxxxxxxxxxxx> 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@xxxxxxxxxxx>
> > Cc: Miklos Szeredi <miklos@xxxxxxxxxx>
> > Cc: Joanne Koong <joannelkoong@xxxxxxxxx>
> > Cc: Josef Bacik <josef@xxxxxxxxxxxxxx>
> > Cc: linux-fsdevel@xxxxxxxxxxxxxxx
> > Signed-off-by: Kairui Song <kasong@xxxxxxxxxxx>
>
> Reviewed-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>

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.





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux