diff options
author | Gao Xiang <hsiangkao@linux.alibaba.com> | 2022-10-14 09:49:15 +0300 |
---|---|---|
committer | Gao Xiang <hsiangkao@linux.alibaba.com> | 2022-10-17 01:55:49 +0300 |
commit | e7933278b442f97809b1ea84264586302bd08a03 (patch) | |
tree | f2d7c3be79585921e0a90f1006d4629fb3eef316 /fs | |
parent | 63bbb85658ea43dd35dbfde6d4150b47c407fc87 (diff) | |
download | linux-e7933278b442f97809b1ea84264586302bd08a03.tar.xz |
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')
-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; |