]> 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)
commit0bf971739fa1337d6501f55a45b48b3a347de280
treef4aa82707c133c0dd5101eb2086ea57efae0e16f
parente573eef712af104c8e3a73c4ac344075d01c443d
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: 3c76096f49ee ("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