On Tue, Mar 18, 2025 at 12:00:52PM -0700, slava@xxxxxxxxxxx wrote: > Hi Fan, > > + CC David Howells <dhowells@xxxxxxxxxx> > + CC ceph-devel@xxxxxxxxxxxxxxx > > On Tue, 2025-03-18 at 11:30 -0700, Fan Ni wrote: > > Hi Viacheslav, > > > > This is Fan Ni. Recently I started to work on some mm work. One thing > > that I am working on is to reduce the use of &folio->page. When I > > check > > the fs/ceph code, I find some code that may be good candidate for the > > work to be done. > > > > I see you sent some patches to add ceph_submit_write(), since the > > change > > I am planning to do is closely related to it, so I reach out to you > > to > > see if you have some input for me. > > > > Based on my reading of the code, it seems ceph_wbc->pages[i] will > > always be the head page of the folio involved. I am thinking maybe we > > can > > keep folios instead of pages here, do you see any reason we should > > not > > use folios here and must be pages? > > > > I believe we need to switch from pages to folios in CephFS code. But it > is painful modification. We need to be really careful in this. > > As far as I know, David Howells is making significant modification > namely in this direction. I think you need to synchronize the > implementation activity with him. I'd love to be involved but, > currently, I am focused on fixing other issues in CephFS code. :) > > Thanks, > Slava. > Thanks Slava, Let me add more context here. I have a patch as below, which only handle case 1 as mentioned in the commit log. The question I am asking here is related to the handling of case 2 as the page passed to ceph_fscrypt_pagecache_page is from ceph_wbc->pages[i]. After checking the code, I think it can be folio instead of page. My goal is to remove page_snap_context() and use folio_snap_context(). Fan