erofs: convert z_erofs_onlinepage_.* to folios
PATCH 1/6 erofs: convert z_erofs_onlinepage_.* to folios
Online folios are locked file-backed folios which will eventually keep decoded (e.g. decompressed) data of each inode for end users to utilize. It may belong to a few pclusters and contain other data (e.g. compressed data for inplace I/Os) temporarily in a time-sharing manner to reduce memory footprints for low-ended storage devices with high latencies under heary I/O pressure.
Apart from folio_end_read() usage, it's a straight-forward conversion.
---
Some trivial folio conversions for compressed inodes aiming for v6.9.
fs/erofs/zdata.c | 50 +++++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 28 deletions(-)
fs/erofs/zdata.c +22 -28
@@ -117,46 +117,39 @@ static inline unsigned int z_erofs_pclusterpages(struct z_erofs_pcluster *pcl) }/* -* bit 30: I/O error occurred on this page -* bit 0 - 29: remaining parts to complete this page +* bit 30: I/O error occurred on this folio +* bit 0 - 29: remaining parts to complete this folio */ -#define Z_EROFS_PAGE_EIO (1 << 30) +#define Z_EROFS_FOLIO_EIO (1 << 30) -static inline void z_erofs_onlinepage_init (struct page *page) +static void z_erofs_onlinefolio_init (struct folio *folio) {union {atomic_t o; -unsigned long v; +void *v; } u = { .o =ATOMIC_INIT (1 ) }; -set_page_private (page, u.v); -smp_wmb (); -SetPagePrivate (page); + folio->private = u.v;/* valid only if file-backed folio is locked */ } -static inline void z_erofs_onlinepage_split (struct page *page) +static void z_erofs_onlinefolio_split (struct folio *folio) { -atomic_inc ((atomic_t *)&page->private); +atomic_inc ((atomic_t *)&folio->private); } -static void z_erofs_onlinepage_endio (struct page *page,int err) +static void z_erofs_onlinefolio_end (struct folio *folio,int err) {int orig, v; -DBG_BUGON (!PagePrivate (page)); -do { - orig =atomic_read ((atomic_t *)&page->private); - v = (orig -1 ) | (err ?Z_EROFS_PAGE_EIO :0 ); - }while (atomic_cmpxchg ((atomic_t *)&page->private, orig, v) != orig); + orig =atomic_read ((atomic_t *)&folio->private); + v = (orig -1 ) | (err ?Z_EROFS_FOLIO_EIO :0 ); + }while (atomic_cmpxchg ((atomic_t *)&folio->private, orig, v) != orig); -if (!(v & ~Z_EROFS_PAGE_EIO )) { -set_page_private (page,0 ); -ClearPagePrivate (page); -if (!(v &Z_EROFS_PAGE_EIO )) -SetPageUptodate (page); -unlock_page (page); - } +if (v & ~Z_EROFS_FOLIO_EIO ) +return ; + folio->private =0 ; +folio_end_read (folio, !(v &Z_EROFS_FOLIO_EIO )); }#define Z_EROFS_ONSTACK_PAGES 32
@@ -965,6 +958,7 @@ static int z_erofs_read_fragment(struct super_block *sb, struct page *page,static int z_erofs_do_read_page (struct z_erofs_decompress_frontend *fe,struct page *page,bool ra) { +struct folio *folio =page_folio (page);struct inode *const inode = fe->inode;struct erofs_map_blocks *const map = &fe->map;const loff_t offset =page_offset (page);
@@ -973,7 +967,7 @@ static int z_erofs_do_read_page(struct z_erofs_decompress_frontend *fe,unsigned int cur, end, len, split;int err =0 ; -z_erofs_onlinepage_init (page); +z_erofs_onlinefolio_init (folio); split =0 ; end =PAGE_SIZE ; repeat:
@@ -1035,7 +1029,7 @@ static int z_erofs_do_read_page(struct z_erofs_decompress_frontend *fe,if (err) goto out; -z_erofs_onlinepage_split (page); +z_erofs_onlinefolio_split (folio);if (fe->pcl->pageofs_out != (map->m_la & ~PAGE_MASK )) fe->pcl->multibases = true;if (fe->pcl->length < offset + end - map->m_la) {
@@ -1056,7 +1050,7 @@ static int z_erofs_do_read_page(struct z_erofs_decompress_frontend *fe, goto repeat; out: -z_erofs_onlinepage_endio (page, err); +z_erofs_onlinefolio_end (folio, err);return err; }
@@ -1159,7 +1153,7 @@ static void z_erofs_fill_other_copies(struct z_erofs_decompress_backend *be, cur += len; }kunmap_local (dst); -z_erofs_onlinepage_endio (bvi->bvec.page, err); +z_erofs_onlinefolio_end (page_folio (bvi->bvec.page), err);list_del (p);kfree (bvi); }
@@ -1316,7 +1310,7 @@ static int z_erofs_decompress_pcluster(struct z_erofs_decompress_backend *be,/* recycle all individual short-lived pages */ if (z_erofs_put_shortlivedpage (be->pagepool, page))continue ; -z_erofs_onlinepage_endio (page, err); +z_erofs_onlinefolio_end (page_folio (page), err); }if (be->decompressed_pages != be->onstack_pages)
Signature · 1 line
2.39.3
PATCH 2/6 erofs: convert z_erofs_do_read_page() to folios
It is a straight-forward conversion. Besides, it's renamed as z_erofs_scan_folio().
--- fs/erofs/zdata.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-)
fs/erofs/zdata.c +15 -16
@@ -955,21 +955,20 @@ static int z_erofs_read_fragment(struct super_block *sb, struct page *page,return 0 ; } -static int z_erofs_do_read_page (struct z_erofs_decompress_frontend *fe, -struct page *page,bool ra) +static int z_erofs_scan_folio (struct z_erofs_decompress_frontend *fe, +struct folio *folio,bool ra) { -struct folio *folio =page_folio (page);struct inode *const inode = fe->inode;struct erofs_map_blocks *const map = &fe->map; -const loff_t offset =page_offset (page); -const unsigned int bs =i_blocksize (inode); +const loff_t offset =folio_pos (folio); +const unsigned int bs =i_blocksize (inode), fs =folio_size (folio);bool tight = true, exclusive;unsigned int cur, end, len, split;int err =0 ;z_erofs_onlinefolio_init (folio); split =0 ; - end =PAGE_SIZE ; + end = fs; repeat:if (offset + end -1 < map->m_la || offset + end -1 >= map->m_la + map->m_llen) {
@@ -986,7 +985,7 @@ static int z_erofs_do_read_page(struct z_erofs_decompress_frontend *fe, ++split;if (!(map->m_flags &EROFS_MAP_MAPPED )) { -zero_user_segment (page, cur, end); +folio_zero_segment (folio, cur, end); tight = false; goto next_part; }
@@ -995,8 +994,8 @@ static int z_erofs_do_read_page(struct z_erofs_decompress_frontend *fe,erofs_off_t fpos = offset + cur - map->m_la; len = min_t(unsigned int, map->m_llen - fpos, end - cur); - err =z_erofs_read_fragment (inode->i_sb, page, cur, cur + len, -EROFS_I (inode)->z_fragmentoff + fpos); + err =z_erofs_read_fragment (inode->i_sb, &folio->page, cur, + cur + len,EROFS_I (inode)->z_fragmentoff + fpos);if (err) goto out; tight = false;
@@ -1011,18 +1010,18 @@ static int z_erofs_do_read_page(struct z_erofs_decompress_frontend *fe, }/* -* Ensure the current partial page belongs to this submit chain rather +* Ensure the current partial folio belongs to this submit chain rather * than other concurrent submit chains or the noio(bypass) chain since -* those chains are handled asynchronously thus the page cannot be used +* those chains are handled asynchronously thus the folio cannot be used * for inplace I/O or bvpage (should be processed in a strict order.) */ tight &= (fe->mode >Z_EROFS_PCLUSTER_FOLLOWED_NOINPLACE ); - exclusive = (!cur && ((split <=1 ) || (tight && bs ==PAGE_SIZE ))); + exclusive = (!cur && ((split <=1 ) || (tight && bs == fs)));if (cur) tight &= (fe->mode >=Z_EROFS_PCLUSTER_FOLLOWED ); err =z_erofs_attach_page (fe, &((struct z_erofs_bvec ) { - .page = page, + .page = &folio->page, .offset = offset - map->m_la, .end = end, }), exclusive);
@@ -1789,7 +1788,7 @@ static void z_erofs_pcluster_readmore(struct z_erofs_decompress_frontend *f,if (PageUptodate (page))unlock_page (page);else - (void )z_erofs_do_read_page (f, page, !!rac); +z_erofs_scan_folio (f,page_folio (page), !!rac);put_page (page); }
@@ -1810,7 +1809,7 @@ static int z_erofs_read_folio(struct file *file, struct folio *folio) f.headoffset = (erofs_off_t )folio->index <<PAGE_SHIFT ;z_erofs_pcluster_readmore (&f,NULL , true); - err =z_erofs_do_read_page (&f, &folio->page, false); + err =z_erofs_scan_folio (&f, folio, false);z_erofs_pcluster_readmore (&f,NULL , false);z_erofs_pcluster_end (&f);
@@ -1851,7 +1850,7 @@ static void z_erofs_readahead(struct readahead_control *rac) folio = head; head =folio_get_private (folio); - err =z_erofs_do_read_page (&f, &folio->page, true); + err =z_erofs_scan_folio (&f, folio, true);if (err && err != -EINTR )erofs_err (inode->i_sb,"readahead error at folio %lu @ nid %llu" , folio->index,EROFS_I (inode)->nid);
Signature · 1 line
2.39.3
Re: [PATCH 2/6] erofs: convert z_erofs_do_read_page() to folios
Quoted 4 lines · Gao Xiang
It is a straight-forward conversion. Besides, it's renamed as
z_erofs_scan_folio().Signed-off-by Gao Xiang <[email protected]>
Thanks,
PATCH 3/6 erofs: get rid of `justfound` debugging tag
In reply to Gao Xiangjustfound is introduced to identify cached folios that are just added to compressed bvecs so that more checks can be applied in the I/O submission path.
EROFS is quite now stable compared to the codebase at that stage. justfound becomes a burden for upcoming features. Drop it.
--- fs/erofs/zdata.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-)
fs/erofs/zdata.c +3 -17
@@ -565,17 +565,13 @@ static void z_erofs_bind_cache(struct z_erofs_decompress_frontend *fe)for (i =0 ; i < pclusterpages; ++i) {struct page *page, *newpage; -void *t;/* mark pages just found for debugging */ /* Inaccurate check w/o locking to avoid unneeded lookups */ if (READ_ONCE (pcl->compressed_bvecs[i].page))continue ; page =find_get_page (mc, pcl->obj.index + i); -if (page) { - t = (void *)((unsigned long )page |1 ); - newpage =NULL ; - }else { +if (!page) {/* I/O is needed, no possible to decompress directly */ standalone = false;if (!shouldalloc)
@@ -589,11 +585,10 @@ static void z_erofs_bind_cache(struct z_erofs_decompress_frontend *fe)if (!newpage)continue ;set_page_private (newpage,Z_EROFS_PREALLOCATED_PAGE ); - t = (void *)((unsigned long )newpage |1 ); }spin_lock (&pcl->obj.lockref.lock);if (!pcl->compressed_bvecs[i].page) { - pcl->compressed_bvecs[i].page = t; + pcl->compressed_bvecs[i].page = page ? page : newpage;spin_unlock (&pcl->obj.lockref.lock);continue ; }
@@ -1423,7 +1418,7 @@ static void z_erofs_fill_bio_vec(struct bio_vec *bvec,struct z_erofs_bvec zbv;struct address_space *mapping;struct page *page; -int justfound, bs =i_blocksize (f->inode); +int bs =i_blocksize (f->inode);/* Except for inplace pages, the entire page can be used for I/Os */ bvec->bv_offset =0 ;
@@ -1432,9 +1427,6 @@ static void z_erofs_fill_bio_vec(struct bio_vec *bvec,spin_lock (&pcl->obj.lockref.lock); zbv = pcl->compressed_bvecs[nr]; page = zbv.page; - justfound = (unsigned long )page &1UL ; - page = (struct page *)((unsigned long )page & ~1UL ); - pcl->compressed_bvecs[nr].page = page;spin_unlock (&pcl->obj.lockref.lock);if (!page) goto out_allocpage;
@@ -1465,9 +1457,6 @@ static void z_erofs_fill_bio_vec(struct bio_vec *bvec, }lock_page (page); -/* only true if page reclaim goes wrong, should never happen */ -DBG_BUGON (justfound &&PagePrivate (page)); -/* the cached page is still in managed cache */ if (page->mapping == mc) {/*
@@ -1475,7 +1464,6 @@ static void z_erofs_fill_bio_vec(struct bio_vec *bvec,* `->private` pcluster hint. Let's reconnect them. */ if (!PagePrivate (page)) { -DBG_BUGON (!justfound);/* compressed_bvecs[] already takes a ref */ attach_page_private (page, pcl);put_page (page);
@@ -1494,8 +1482,6 @@ static void z_erofs_fill_bio_vec(struct bio_vec *bvec,* allocate a new page for compressed data. */ DBG_BUGON (page->mapping); -DBG_BUGON (!justfound); - tocache = true;unlock_page (page);put_page (page);
Signature · 1 line
2.39.3
Re: [PATCH 3/6] erofs: get rid of `justfound` debugging tag
Quoted 8 lines · Gao Xiang
justfoundis introduced to identify cached folios that are just added to compressed bvecs so that more checks can be applied in the I/O submission path.EROFS is quite now stable compared to the codebase at that stage.
justfoundbecomes a burden for upcoming features. Drop it.Signed-off-by Gao Xiang <[email protected]>
Thanks,
PATCH 4/6 erofs: convert z_erofs_fill_bio_vec() to folios
In reply to Gao XiangIntroduce a folio member to struct z_erofs_bvec and convert most of z_erofs_fill_bio_vec() to folios, which is still straight-forward.
--- fs/erofs/zdata.c | 71 ++++++++++++++++++++++++------------------------ 1 file changed, 36 insertions(+), 35 deletions(-)
fs/erofs/zdata.c +36 -35
@@ -19,7 +19,10 @@typedef void *z_erofs_next_pcluster_t ;struct z_erofs_bvec { -struct page *page; +union { +struct page *page; +struct folio *folio; + };int offset;unsigned int end; };
@@ -1420,33 +1423,32 @@ static void z_erofs_fill_bio_vec(struct bio_vec *bvec,struct page *page;int bs =i_blocksize (f->inode); -/* Except for inplace pages, the entire page can be used for I/Os */ +/* Except for inplace folios, the entire folio can be used for I/Os */ bvec->bv_offset =0 ; bvec->bv_len =PAGE_SIZE ; repeat:spin_lock (&pcl->obj.lockref.lock); zbv = pcl->compressed_bvecs[nr]; - page = zbv.page;spin_unlock (&pcl->obj.lockref.lock); -if (!page) - goto out_allocpage; +if (!zbv.folio) + goto out_allocfolio; - bvec->bv_page = page; -DBG_BUGON (z_erofs_is_shortlived_page (page)); + bvec->bv_page = &zbv.folio->page; +DBG_BUGON (z_erofs_is_shortlived_page (bvec->bv_page));/* -* Handle preallocated cached pages. We tried to allocate such pages +* Handle preallocated cached folios. We tried to allocate such folios * without triggering direct reclaim. If allocation failed, inplace -* file-backed pages will be used instead. +* file-backed folios will be used instead. */ -if (page->private ==Z_EROFS_PREALLOCATED_PAGE ) { -set_page_private (page,0 ); +if (zbv.folio->private == (void *)Z_EROFS_PREALLOCATED_PAGE ) { + zbv.folio->private =0 ; tocache = true; goto out_tocache; } - mapping =READ_ONCE (page->mapping); + mapping =READ_ONCE (zbv.folio->mapping);/* -* File-backed pages for inplace I/Os are all locked steady, +* File-backed folios for inplace I/Os are all locked steady, * therefore it is impossible for `mapping` to be NULL. */ if (mapping && mapping != mc) {
@@ -1456,22 +1458,21 @@ static void z_erofs_fill_bio_vec(struct bio_vec *bvec,return ; } -lock_page (page); -/* the cached page is still in managed cache */ -if (page->mapping == mc) { +folio_lock (zbv.folio); +if (zbv.folio->mapping == mc) {/* -* The cached page is still available but without a valid -* `->private` pcluster hint. Let's reconnect them. +* The cached folio is still in managed cache but without +* a valid `->private` pcluster hint. Let's reconnect them. */ -if (!PagePrivate (page)) { -/* compressed_bvecs[] already takes a ref */ -attach_page_private (page, pcl); -put_page (page); +if (!folio_test_private (zbv.folio)) { +folio_attach_private (zbv.folio, pcl); +/* compressed_bvecs[] already takes a ref before */ +folio_put (zbv.folio); }/* no need to submit if it is already up-to-date */ -if (PageUptodate (page)) { -unlock_page (page); +if (folio_test_uptodate (zbv.folio)) { +folio_unlock (zbv.folio); bvec->bv_page =NULL ; }return ;
@@ -1481,32 +1482,32 @@ static void z_erofs_fill_bio_vec(struct bio_vec *bvec,* It has been truncated, so it's unsafe to reuse this one. Let's * allocate a new page for compressed data. */ -DBG_BUGON (page->mapping); +DBG_BUGON (zbv.folio->mapping); tocache = true; -unlock_page (page); -put_page (page); -out_allocpage: +folio_unlock (zbv.folio); +folio_put (zbv.folio); +out_allocfolio: page =erofs_allocpage (&f->pagepool, gfp | __GFP_NOFAIL);spin_lock (&pcl->obj.lockref.lock); -if (pcl->compressed_bvecs[nr].page) { +if (pcl->compressed_bvecs[nr].folio) {erofs_pagepool_add (&f->pagepool, page);spin_unlock (&pcl->obj.lockref.lock);cond_resched (); goto repeat; } - pcl->compressed_bvecs[nr].page = page; + pcl->compressed_bvecs[nr].folio = zbv.folio =page_folio (page);spin_unlock (&pcl->obj.lockref.lock); bvec->bv_page = page; out_tocache:if (!tocache || bs !=PAGE_SIZE || -add_to_page_cache_lru (page, mc, pcl->obj.index + nr, gfp)) { -/* turn into a temporary shortlived page (1 ref) */ -set_page_private (page,Z_EROFS_SHORTLIVED_PAGE ); +filemap_add_folio (mc, zbv.folio, pcl->obj.index + nr, gfp)) { +/* turn into a temporary shortlived folio (1 ref) */ + zbv.folio->private = (void *)Z_EROFS_SHORTLIVED_PAGE ;return ; } -attach_page_private (page, pcl); +folio_attach_private (zbv.folio, pcl);/* drop a refcount added by allocpage (then 2 refs in total here) */ -put_page (page); +folio_put (zbv.folio); } static struct z_erofs_decompressqueue *jobqueue_init(struct super_block *sb,
Signature · 1 line
2.39.3
Re: [PATCH 4/6] erofs: convert z_erofs_fill_bio_vec() to folios
Quoted 4 lines · Gao Xiang
Introduce a folio member to
struct z_erofs_bvecand convert most ofz_erofs_fill_bio_vec()to folios, which is still straight-forward.Signed-off-by Gao Xiang <[email protected]>
Thanks,
PATCH 5/6 erofs: convert z_erofs_submissionqueue_endio() to folios
In reply to Gao XiangUse bio_for_each_folio() to iterate over each folio in the bio and there is no large folios for now.
--- fs/erofs/zdata.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
fs/erofs/zdata.c +11 -11
@@ -1566,19 +1566,19 @@ static void z_erofs_submissionqueue_endio(struct bio *bio) {struct z_erofs_decompressqueue *q = bio->bi_private;blk_status_t err = bio->bi_status; -struct bio_vec *bvec; -struct bvec_iter_all iter_all; +struct folio_iter fi; -bio_for_each_segment_all (bvec, bio, iter_all) { -struct page *page = bvec->bv_page; +bio_for_each_folio_all (fi, bio) { +struct folio *folio = fi.folio; -DBG_BUGON (PageUptodate (page)); -DBG_BUGON (z_erofs_page_is_invalidated (page)); -if (erofs_page_is_managed (EROFS_SB (q->sb), page)) { -if (!err) -SetPageUptodate (page); -unlock_page (page); - } +DBG_BUGON (folio_test_uptodate (folio)); +DBG_BUGON (z_erofs_page_is_invalidated (&folio->page)); +if (!erofs_page_is_managed (EROFS_SB (q->sb), &folio->page)) +continue ; + +if (!err) +folio_mark_uptodate (folio); +folio_unlock (folio); }if (err) q->eio = true;
Signature · 1 line
2.39.3
Re: [PATCH 5/6] erofs: convert z_erofs_submissionqueue_endio() to folios
Quoted 4 lines · Gao Xiang
Use
bio_for_each_folio()to iterate over each folio in the bio and there is no large folios for now.Signed-off-by Gao Xiang <[email protected]>
Thanks,
PATCH 6/6 erofs: refine managed cache operations to folios
In reply to Gao XiangConvert erofs_try_to_free_all_cached_pages() andz_erofs_cache_release_folio().
Besides, erofs_page_is_managed() is moved to zdata.c and renamed as erofs_folio_is_managed().
--- fs/erofs/compress.h | 7 ---- fs/erofs/decompressor_deflate.c | 3 -- fs/erofs/decompressor_lzma.c | 3 -- fs/erofs/internal.h | 4 +-- fs/erofs/utils.c | 2 +- fs/erofs/zdata.c | 63 ++++++++++++++++----------------- 6 files changed, 34 insertions(+), 48 deletions(-)
fs/erofs/compress.h +0 -7
@@ -81,13 +81,6 @@ static inline bool z_erofs_put_shortlivedpage(struct page **pagepool,return true; } -#define MNGD_MAPPING (sbi) ((sbi)->managed_cache->i_mapping) -static inline bool erofs_page_is_managed (const struct erofs_sb_info *sbi, -struct page *page) -{ -return page->mapping ==MNGD_MAPPING (sbi); -} -int z_erofs_fixup_insize (struct z_erofs_decompress_req *rq,const char *padbuf,unsigned int padbufsize);extern const struct z_erofs_decompressor erofs_decompressors[];
fs/erofs/decompressor_deflate.c +0 -3
@@ -212,9 +212,6 @@ int z_erofs_deflate_decompress(struct z_erofs_decompress_req *rq,if (rq->out[no] != rq->in[j])continue ; - -DBG_BUGON (erofs_page_is_managed (EROFS_SB (sb), - rq->in[j])); tmppage =erofs_allocpage (pgpl, rq->gfp);if (!tmppage) { err = -ENOMEM ;
fs/erofs/decompressor_lzma.c +0 -3
@@ -258,9 +258,6 @@ int z_erofs_lzma_decompress(struct z_erofs_decompress_req *rq,if (rq->out[no] != rq->in[j])continue ; - -DBG_BUGON (erofs_page_is_managed (EROFS_SB (rq->sb), - rq->in[j])); tmppage =erofs_allocpage (pgpl, rq->gfp);if (!tmppage) { err = -ENOMEM ;
fs/erofs/internal.h +2 -2
@@ -467,8 +467,8 @@ int __init erofs_init_shrinker(void);void erofs_exit_shrinker (void );int __init z_erofs_init_zip_subsystem (void );void z_erofs_exit_zip_subsystem (void ); -int erofs_try_to_free_all_cached_pages (struct erofs_sb_info *sbi, -struct erofs_workgroup *egrp); +int erofs_try_to_free_all_cached_folios (struct erofs_sb_info *sbi, +struct erofs_workgroup *egrp);int z_erofs_map_blocks_iter (struct inode *inode,struct erofs_map_blocks *map,int flags);void *erofs_get_pcpubuf (unsigned int requiredpages);
fs/erofs/utils.c +1 -1
@@ -129,7 +129,7 @@ static bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,* the XArray. Otherwise some cached pages could be still attached to * the orphan old workgroup when the new one is available in the tree. */ -if (erofs_try_to_free_all_cached_pages (sbi, grp)) +if (erofs_try_to_free_all_cached_folios (sbi, grp)) goto out;/*
fs/erofs/zdata.c +31 -32
114 lines not on this page · raw message
Signature · 1 line
2.39.3
Re: [PATCH 6/6] erofs: refine managed cache operations to folios
Quoted 7 lines · Gao Xiang
Convert
erofs_try_to_free_all_cached_pages()andz_erofs_cache_release_folio().Besides,
erofs_page_is_managed()is moved tozdata.cand renamed aserofs_folio_is_managed().Signed-off-by Gao Xiang <[email protected]>
Thanks,
Quoted 10 lines · Gao Xiang
Online folios are locked file-backed folios which will eventually keep decoded (e.g. decompressed) data of each inode for end users to utilize. It may belong to a few pclusters and contain other data (e.g. compressed data for inplace I/Os) temporarily in a time-sharing manner to reduce memory footprints for low-ended storage devices with high latencies under heary I/O pressure.
Apart from
folio_end_read()usage, it's a straight-forward conversion.Signed-off-by Gao Xiang <[email protected]>
Thanks,