Re: [PATCH v5 5/5] fuse: remove tmp folio for writebacks and internal rb tree

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

 



On Mon, Nov 18, 2024 at 11:59 PM Jingbo Xu <jefflexu@xxxxxxxxxxxxxxxxx> wrote:
>
> On 11/16/24 6:44 AM, Joanne Koong wrote:
>
> > @@ -1838,7 +1748,7 @@ static void fuse_writepage_finish_stat(struct inode *inode, struct folio *folio)
> >       struct backing_dev_info *bdi = inode_to_bdi(inode);
> >
> >       dec_wb_stat(&bdi->wb, WB_WRITEBACK);
> > -     node_stat_sub_folio(folio, NR_WRITEBACK_TEMP);
> > +     node_stat_sub_folio(folio, NR_WRITEBACK);
>
> Now fuse_writepage_finish_stat() has only one caller and we could make
> it embedded into its only caller.

I'll make this change in v6.

>
>
> >  static void fuse_writepage_args_page_fill(struct fuse_writepage_args *wpa, struct folio *folio,
> > -                                       struct folio *tmp_folio, uint32_t folio_index)
> > +                                       uint32_t folio_index)
> >  {
> >       struct inode *inode = folio->mapping->host;
> >       struct fuse_args_pages *ap = &wpa->ia.ap;
> >
> > -     folio_copy(tmp_folio, folio);
> > -
> > -     ap->folios[folio_index] = tmp_folio;
> > +     ap->folios[folio_index] = folio;
> >       ap->descs[folio_index].offset = 0;
> >       ap->descs[folio_index].length = PAGE_SIZE;
> >
> >       inc_wb_stat(&inode_to_bdi(inode)->wb, WB_WRITEBACK);
> > -     node_stat_add_folio(tmp_folio, NR_WRITEBACK_TEMP);
> > +     node_stat_add_folio(folio, NR_WRITEBACK);
>
> This inc NR_WRITEBACK counter along with the corresponding dec
> NR_WRITEBACK counter in fuse_writepage_finish_stat() seems unnecessary,
> as folio_start_writeback() will increase the NR_WRITEBACK counter, while
> folio_end_writeback() will decrease the NR_WRITEBACK counter.
>

Nice find, I'll make this change in v6.


Thanks,
Joanne
>
> --
> Thanks,
> Jingbo





[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