diff options
author | Gao Xiang <hsiangkao@linux.alibaba.com> | 2022-09-23 04:49:15 +0300 |
---|---|---|
committer | Gao Xiang <hsiangkao@linux.alibaba.com> | 2022-09-26 18:55:43 +0300 |
commit | 5c2a64252c5dc4cfe78e5b2a531c118894e3d155 (patch) | |
tree | 356748bce348364c288493b9eeb9de8994b1a95e /fs/erofs/decompressor_lzma.c | |
parent | b15b2e307c3a1970d92da77a3ef57ee53d119d8e (diff) | |
download | linux-5c2a64252c5dc4cfe78e5b2a531c118894e3d155.tar.xz |
erofs: introduce partial-referenced pclusters
Due to deduplication for compressed data, pclusters can be partially
referenced with their prefixes.
Together with the user-space implementation, it enables EROFS
variable-length global compressed data deduplication with rolling
hash.
Link: https://lore.kernel.org/r/20220923014915.4362-1-hsiangkao@linux.alibaba.com
Reviewed-by: Yue Hu <huyue2@coolpad.com>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Diffstat (limited to 'fs/erofs/decompressor_lzma.c')
-rw-r--r-- | fs/erofs/decompressor_lzma.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/erofs/decompressor_lzma.c b/fs/erofs/decompressor_lzma.c index 5e59b3f523eb..091fd5adf818 100644 --- a/fs/erofs/decompressor_lzma.c +++ b/fs/erofs/decompressor_lzma.c @@ -217,6 +217,9 @@ again: strm->buf.out_size = min_t(u32, outlen, PAGE_SIZE - pageofs); outlen -= strm->buf.out_size; + if (!rq->out[no] && rq->fillgaps) /* deduped */ + rq->out[no] = erofs_allocpage(pagepool, + GFP_KERNEL | __GFP_NOFAIL); if (rq->out[no]) strm->buf.out = kmap(rq->out[no]) + pageofs; pageofs = 0; |