]> git.baikalelectronics.ru Git - kernel.git/commit
erofs: shouldn't churn the mapping page for duplicated copies
authorGao Xiang <hsiangkao@linux.alibaba.com>
Wed, 12 Oct 2022 04:50:56 +0000 (12:50 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Sun, 16 Oct 2022 22:55:49 +0000 (06:55 +0800)
commit1e5cae85141b6f7944616388dafcdcbbf3ebae78
treef4aa82707c133c0dd5101eb2086ea57efae0e16f
parent837d771704977b4ea534c074525fd8ef87a82344
erofs: shouldn't churn the mapping page for duplicated copies

If other duplicated copies exist in one decompression shot, should
leave the old page as is rather than replace it with the new duplicated
one.  Otherwise, the following cold path to deal with duplicated copies
will use the invalid bvec.  It impacts compressed data deduplication.

Also, shift the onlinepage EIO bit to avoid touching the signed bit.

Fixes: 1acfe91f8051 ("erofs: introduce multi-reference pclusters (fully-referenced)")
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20221012045056.13421-1-hsiangkao@linux.alibaba.com
fs/erofs/zdata.c
fs/erofs/zdata.h