diff options
author | 2022-10-14 14:49:15 +0800 | |
---|---|---|
committer | 2022-10-17 06:55:49 +0800 | |
commit | e7933278b442f97809b1ea84264586302bd08a03 (patch) | |
tree | f2d7c3be79585921e0a90f1006d4629fb3eef316 /fs/erofs/zdata.c | |
parent | erofs: shouldn't churn the mapping page for duplicated copies (diff) | |
download | linux-e7933278b442f97809b1ea84264586302bd08a03.tar.gz linux-e7933278b442f97809b1ea84264586302bd08a03.tar.bz2 linux-e7933278b442f97809b1ea84264586302bd08a03.zip |
erofs: fix up inplace decompression success rate
Partial decompression should be checked after updating length.
It's a new regression when introducing multi-reference pclusters.
Fixes: 2bfab9c0edac ("erofs: record the longest decompressed size in this round")
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20221014064915.8103-1-hsiangkao@linux.alibaba.com
Diffstat (limited to 'fs/erofs/zdata.c')
-rw-r--r-- | fs/erofs/zdata.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index 4553be650968..c7f24fc7efd5 100644 --- a/fs/erofs/zdata.c +++ b/fs/erofs/zdata.c @@ -813,15 +813,14 @@ retry: ++spiltted; if (fe->pcl->pageofs_out != (map->m_la & ~PAGE_MASK)) fe->pcl->multibases = true; - - if ((map->m_flags & EROFS_MAP_FULL_MAPPED) && - !(map->m_flags & EROFS_MAP_PARTIAL_REF) && - fe->pcl->length == map->m_llen) - fe->pcl->partial = false; if (fe->pcl->length < offset + end - map->m_la) { fe->pcl->length = offset + end - map->m_la; fe->pcl->pageofs_out = map->m_la & ~PAGE_MASK; } + if ((map->m_flags & EROFS_MAP_FULL_MAPPED) && + !(map->m_flags & EROFS_MAP_PARTIAL_REF) && + fe->pcl->length == map->m_llen) + fe->pcl->partial = false; next_part: /* shorten the remaining extent to update progress */ map->m_llen = offset + cur - map->m_la; |