On Fri, Jul 15, 2022 at 03:53:23PM +0800, Yue Hu wrote:
> On Thu, 14 Jul 2022 21:20:42 +0800
> Gao Xiang <[email protected]> wrote:
> 
> > Convert compressed_pages[] to bufvec in order to avoid using
> > page->private to keep onlinepage_index (decompressed offset)
> > for inplace I/O pages.
> > 
> > In the future, we only rely on folio->private to keep a countdown
> > to unlock folios and set folio_uptodate.
> > 
> > Signed-off-by: Gao Xiang <[email protected]>
> > ---
> >  fs/erofs/zdata.c | 113 +++++++++++++++++++++++------------------------
> >  fs/erofs/zdata.h |   4 +-
> >  2 files changed, 57 insertions(+), 60 deletions(-)
> > 
> > diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
> > index 757d352bc2c7..f2e3f07baad7 100644
> > --- a/fs/erofs/zdata.c
> > +++ b/fs/erofs/zdata.c
> > @@ -134,7 +134,7 @@ static int z_erofs_create_pcluster_pool(void)
> >  
> >     for (pcs = pcluster_pool;
> >          pcs < pcluster_pool + ARRAY_SIZE(pcluster_pool); ++pcs) {
> > -           size = struct_size(a, compressed_pages, pcs->maxpages);
> > +           size = struct_size(a, compressed_bvecs, pcs->maxpages);
> >  
> >             sprintf(pcs->name, "erofs_pcluster-%u", pcs->maxpages);
> >             pcs->slab = kmem_cache_create(pcs->name, size, 0,
> > @@ -287,16 +287,16 @@ struct z_erofs_decompress_frontend {
> >  
> >     struct page *candidate_bvpage;
> >     struct z_erofs_pcluster *pcl, *tailpcl;
> > -   /* a pointer used to pick up inplace I/O pages */
> > -   struct page **icpage_ptr;
> >     z_erofs_next_pcluster_t owned_head;
> > -
> >     enum z_erofs_collectmode mode;
> >  
> >     bool readahead;
> >     /* used for applying cache strategy on the fly */
> >     bool backmost;
> >     erofs_off_t headoffset;
> > +
> > +   /* a pointer used to pick up inplace I/O pages */
> > +   unsigned int icur;
> 
> not a pointer?

Here `pointer' means a cursor or called sub-index.

Thanks,
Gao Xiang

Reply via email to