* [PATCH] erofs: fix ztailpacking for subpage compressed blocks
@ 2023-12-14 16:13 Gao Xiang
2023-12-15 15:01 ` Chao Yu
2023-12-18 3:03 ` Yue Hu
0 siblings, 2 replies; 3+ messages in thread
From: Gao Xiang @ 2023-12-14 16:13 UTC (permalink / raw)
To: linux-erofs, Chao Yu; +Cc: LKML, Gao Xiang
`pageofs_in` should be the compressed data offset of the page rather
than of the block.
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
---
fs/erofs/zdata.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
index a2c3e87d2f81..8264936b8612 100644
--- a/fs/erofs/zdata.c
+++ b/fs/erofs/zdata.c
@@ -812,7 +812,6 @@ static int z_erofs_register_pcluster(struct z_erofs_decompress_frontend *fe)
if (ztailpacking) {
pcl->obj.index = 0; /* which indicates ztailpacking */
- pcl->pageofs_in = erofs_blkoff(fe->inode->i_sb, map->m_pa);
} else {
pcl->obj.index = erofs_blknr(sb, map->m_pa);
@@ -889,6 +888,7 @@ static int z_erofs_pcluster_begin(struct z_erofs_decompress_frontend *fe)
}
get_page(map->buf.page);
WRITE_ONCE(fe->pcl->compressed_bvecs[0].page, map->buf.page);
+ fe->pcl->pageofs_in = map->m_pa & ~PAGE_MASK;
fe->mode = Z_EROFS_PCLUSTER_FOLLOWED_NOINPLACE;
}
/* file-backed inplace I/O pages are traversed in reverse order */
--
2.39.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] erofs: fix ztailpacking for subpage compressed blocks
2023-12-14 16:13 [PATCH] erofs: fix ztailpacking for subpage compressed blocks Gao Xiang
@ 2023-12-15 15:01 ` Chao Yu
2023-12-18 3:03 ` Yue Hu
1 sibling, 0 replies; 3+ messages in thread
From: Chao Yu @ 2023-12-15 15:01 UTC (permalink / raw)
To: Gao Xiang, linux-erofs; +Cc: LKML
On 2023/12/15 0:13, Gao Xiang wrote:
> `pageofs_in` should be the compressed data offset of the page rather
> than of the block.
>
> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Acked-by: Chao Yu <chao@kernel.org>
Thanks,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] erofs: fix ztailpacking for subpage compressed blocks
2023-12-14 16:13 [PATCH] erofs: fix ztailpacking for subpage compressed blocks Gao Xiang
2023-12-15 15:01 ` Chao Yu
@ 2023-12-18 3:03 ` Yue Hu
1 sibling, 0 replies; 3+ messages in thread
From: Yue Hu @ 2023-12-18 3:03 UTC (permalink / raw)
To: Gao Xiang; +Cc: linux-erofs, Chao Yu, LKML, huyue2
On Fri, 15 Dec 2023 00:13:37 +0800
Gao Xiang <hsiangkao@linux.alibaba.com> wrote:
> `pageofs_in` should be the compressed data offset of the page rather
> than of the block.
>
> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Reviewed-by: Yue Hu <huyue2@coolpad.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-12-18 3:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-14 16:13 [PATCH] erofs: fix ztailpacking for subpage compressed blocks Gao Xiang
2023-12-15 15:01 ` Chao Yu
2023-12-18 3:03 ` Yue Hu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox