* [PATCH] erofs: fix up inplace decompression success rate
@ 2022-10-14 6:49 Gao Xiang
2022-10-15 2:51 ` Chao Yu
0 siblings, 1 reply; 2+ messages in thread
From: Gao Xiang @ 2022-10-14 6:49 UTC (permalink / raw)
To: linux-erofs, Chao Yu; +Cc: LKML, Gao Xiang
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")
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
---
fs/erofs/zdata.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
index cce56dde135c..2417d7b73622 100644
--- a/fs/erofs/zdata.c
+++ b/fs/erofs/zdata.c
@@ -812,15 +812,14 @@ static int z_erofs_do_read_page(struct z_erofs_decompress_frontend *fe,
++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;
--
2.24.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] erofs: fix up inplace decompression success rate
2022-10-14 6:49 [PATCH] erofs: fix up inplace decompression success rate Gao Xiang
@ 2022-10-15 2:51 ` Chao Yu
0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2022-10-15 2:51 UTC (permalink / raw)
To: Gao Xiang, linux-erofs; +Cc: LKML
On 2022/10/14 14:49, Gao Xiang wrote:
> 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")
> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-15 2:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-14 6:49 [PATCH] erofs: fix up inplace decompression success rate Gao Xiang
2022-10-15 2:51 ` Chao Yu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®