summaryrefslogtreecommitdiff
path: root/fs/erofs/zdata.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/erofs/zdata.c')
-rw-r--r--fs/erofs/zdata.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
index f52c54058f31..6295f3312f6f 100644
--- a/fs/erofs/zdata.c
+++ b/fs/erofs/zdata.c
@@ -27,6 +27,17 @@ static struct z_erofs_pcluster_slab pcluster_pool[] __read_mostly = {
_PCLP(Z_EROFS_PCLUSTER_MAX_PAGES)
};
+/* (obsoleted) page type for online pages */
+enum z_erofs_page_type {
+ /* including Z_EROFS_VLE_PAGE_TAIL_EXCLUSIVE */
+ Z_EROFS_PAGE_TYPE_EXCLUSIVE,
+
+ Z_EROFS_VLE_PAGE_TYPE_TAIL_SHARED,
+
+ Z_EROFS_VLE_PAGE_TYPE_HEAD,
+ Z_EROFS_VLE_PAGE_TYPE_MAX
+};
+
struct z_erofs_bvec_iter {
struct page *bvpage;
struct z_erofs_bvset *bvset;
@@ -248,7 +259,7 @@ enum z_erofs_collectmode {
* a weak form of COLLECT_PRIMARY_FOLLOWED, the difference is that it
* could be dispatched into bypass queue later due to uptodated managed
* pages. All related online pages cannot be reused for inplace I/O (or
- * pagevec) since it can be directly decoded without I/O submission.
+ * bvpage) since it can be directly decoded without I/O submission.
*/
COLLECT_PRIMARY_FOLLOWED_NOINPLACE,
/*
@@ -273,7 +284,6 @@ struct z_erofs_decompress_frontend {
struct inode *const inode;
struct erofs_map_blocks map;
struct z_erofs_bvec_iter biter;
- struct z_erofs_pagevec_ctor vector;
struct page *candidate_bvpage;
struct z_erofs_pcluster *pcl, *tailpcl;
@@ -636,7 +646,7 @@ static int z_erofs_collector_begin(struct z_erofs_decompress_frontend *fe)
return ret;
}
z_erofs_bvec_iter_begin(&fe->biter, &fe->pcl->bvset,
- Z_EROFS_NR_INLINE_PAGEVECS, fe->pcl->vcnt);
+ Z_EROFS_INLINE_BVECS, fe->pcl->vcnt);
/* since file-backed online pages are traversed in reverse order */
fe->icpage_ptr = fe->pcl->compressed_pages +
z_erofs_pclusterpages(fe->pcl);
@@ -776,7 +786,7 @@ hitted:
* Ensure the current partial page 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
- * for inplace I/O or pagevec (should be processed in strict order.)
+ * for inplace I/O or bvpage (should be processed in a strict order.)
*/
tight &= (fe->mode >= COLLECT_PRIMARY_HOOKED &&
fe->mode != COLLECT_PRIMARY_FOLLOWED_NOINPLACE);
@@ -871,8 +881,7 @@ static int z_erofs_parse_out_bvecs(struct z_erofs_pcluster *pcl,
struct page *old_bvpage;
int i, err = 0;
- z_erofs_bvec_iter_begin(&biter, &pcl->bvset,
- Z_EROFS_NR_INLINE_PAGEVECS, 0);
+ z_erofs_bvec_iter_begin(&biter, &pcl->bvset, Z_EROFS_INLINE_BVECS, 0);
for (i = 0; i < pcl->vcnt; ++i) {
struct z_erofs_bvec bvec;
unsigned int pagenr;