<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/fs/erofs/decompressor.c, branch v6.18.22</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.22</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.22'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-07-24T11:43:31+00:00</updated>
<entry>
<title>erofs: implement metadata compression</title>
<updated>2025-07-24T11:43:31+00:00</updated>
<author>
<name>Bo Liu (OpenAnolis)</name>
<email>liubo03@inspur.com</email>
</author>
<published>2025-07-22T00:32:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=414091322c6363c9283aeb177101e4d7a3819ccd'/>
<id>urn:sha1:414091322c6363c9283aeb177101e4d7a3819ccd</id>
<content type='text'>
Thanks to the meta buffer infrastructure, metadata-compressed inodes are
just read from the metabox inode instead of the blockdevice (or backing
file) inode.

The same is true for shared extended attributes.

When metadata compression is enabled, inode numbers are divided from
on-disk NIDs because of non-LTS 32-bit application compatibility.

Co-developed-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Signed-off-by: Bo Liu (OpenAnolis) &lt;liubo03@inspur.com&gt;
Acked-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20250722003229.2121752-1-hsiangkao@linux.alibaba.com
</content>
</entry>
<entry>
<title>erofs: address D-cache aliasing</title>
<updated>2025-07-10T09:08:27+00:00</updated>
<author>
<name>Gao Xiang</name>
<email>hsiangkao@linux.alibaba.com</email>
</author>
<published>2025-07-09T03:46:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=27917e8194f91dffd8b4825350c63cb68e98ce58'/>
<id>urn:sha1:27917e8194f91dffd8b4825350c63cb68e98ce58</id>
<content type='text'>
Flush the D-cache before unlocking folios for compressed inodes, as
they are dirtied during decompression.

Avoid calling flush_dcache_folio() on every CPU write, since it's more
like playing whack-a-mole without real benefit.

It has no impact on x86 and arm64/risc-v: on x86, flush_dcache_folio()
is a no-op, and on arm64/risc-v, PG_dcache_clean (PG_arch_1) is clear
for new page cache folios.  However, certain ARM boards are affected,
as reported.

Fixes: 3883a79abd02 ("staging: erofs: introduce VLE decompression support")
Closes: https://lore.kernel.org/r/c1e51e16-6cc6-49d0-a63e-4e9ff6c4dd53@pengutronix.de
Closes: https://lore.kernel.org/r/38d43fae-1182-4155-9c5b-ffc7382d9917@siemens.com
Tested-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Tested-by: Stefan Kerkmann &lt;s.kerkmann@pengutronix.de&gt;
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20250709034614.2780117-2-hsiangkao@linux.alibaba.com
</content>
</entry>
<entry>
<title>erofs: support unaligned encoded data</title>
<updated>2025-03-17T06:02:15+00:00</updated>
<author>
<name>Gao Xiang</name>
<email>hsiangkao@linux.alibaba.com</email>
</author>
<published>2025-03-10T09:54:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7361d1e3763baaf7b9349c576137851458ad38d1'/>
<id>urn:sha1:7361d1e3763baaf7b9349c576137851458ad38d1</id>
<content type='text'>
We're almost there.  It's straight-forward to adapt the current
decompression subsystem to support unaligned encoded (compressed) data.

Note that unaligned data is not encouraged because of worse I/O and
caching efficiency unless the corresponding compressor doesn't support
fixed-sized output compression natively like Zstd.

Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Acked-by: Chao Yu &lt;chao@kernel.org&gt;
Link: https://lore.kernel.org/r/20250310095459.2620647-10-hsiangkao@linux.alibaba.com
</content>
</entry>
<entry>
<title>erofs: move {in,out}pages into struct z_erofs_decompress_req</title>
<updated>2025-03-16T17:22:50+00:00</updated>
<author>
<name>Gao Xiang</name>
<email>hsiangkao@linux.alibaba.com</email>
</author>
<published>2025-03-05T12:40:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0243cc257ffa6d8cb210a3070b687fb510f113c7'/>
<id>urn:sha1:0243cc257ffa6d8cb210a3070b687fb510f113c7</id>
<content type='text'>
It seems that all compressors need those two values, so just move
them into the common structure.

`struct z_erofs_lz4_decompress_ctx` can be dropped too.

Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20250305124007.1810731-1-hsiangkao@linux.alibaba.com
</content>
</entry>
<entry>
<title>include/linux/lz4.h: add some missing macros</title>
<updated>2025-01-25T06:47:28+00:00</updated>
<author>
<name>Gao Xiang</name>
<email>hsiangkao@linux.alibaba.com</email>
</author>
<published>2025-01-14T13:04:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f0ef073e213a3a1a494b6f55a76ce1242600a453'/>
<id>urn:sha1:f0ef073e213a3a1a494b6f55a76ce1242600a453</id>
<content type='text'>
Currently, LZ4_DISTANCE_MAX and LZ4_DECOMPRESS_INPLACE_MARGIN are
defined in the erofs subsystem for LZ4 in-place decompression, which is
somewhat unsuitable since they should belong to the LZ4 itself and
may change with future LZ4 codebase updates.

Move them to include/linux/lz4.h to match the upstream LZ4 library [1].
No logic changes.

[1] https://github.com/lz4/lz4/blob/v1.10.0/lib/lz4.h#L670

Link: https://lkml.kernel.org/r/20250114130454.1191150-1-hsiangkao@linux.alibaba.com
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Cc: Yann Collet &lt;yann.collet.73@gmail.com&gt;
Cc: Nick Terrell &lt;terrelln@fb.com&gt;
Cc: Chao Yu &lt;chao@kernel.org&gt;
Cc: Yue Hu &lt;zbestahu@gmail.com&gt;
Cc; Jeffle Xu &lt;jefflexu@linux.alibaba.com&gt;
Cc: Sandeep Dhavale &lt;dhavale@google.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>erofs: fix error handling in z_erofs_init_decompressor</title>
<updated>2024-09-09T16:46:34+00:00</updated>
<author>
<name>Sandeep Dhavale</name>
<email>dhavale@google.com</email>
</author>
<published>2024-09-05T06:00:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3fc3e45fcdeaad4b7660b560fcbc827eb733f58e'/>
<id>urn:sha1:3fc3e45fcdeaad4b7660b560fcbc827eb733f58e</id>
<content type='text'>
If we get a failure at the first decompressor init (i = 0),
the clean up while loop could enter infinite loop due to wrong while
check. Check the value of i now to see if we need any clean up at all.

Fixes: 5a7cce827ee9 ("erofs: refine z_erofs_{init,exit}_subsystem()")
Reported-by: liujinbao1 &lt;liujinbao1@xiaomi.com&gt;
Signed-off-by: Sandeep Dhavale &lt;dhavale@google.com&gt;
Reviewed-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Link: https://lore.kernel.org/r/20240905060027.2388893-1-dhavale@google.com
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
</content>
</entry>
<entry>
<title>erofs: avoid refcounting short-lived pages</title>
<updated>2024-07-11T07:14:26+00:00</updated>
<author>
<name>Gao Xiang</name>
<email>hsiangkao@linux.alibaba.com</email>
</author>
<published>2024-07-11T05:36:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1001042e54ef324c0c665b60a012519be05ae022'/>
<id>urn:sha1:1001042e54ef324c0c665b60a012519be05ae022</id>
<content type='text'>
LZ4 always reuses the decompressed buffer as its LZ77 sliding window
(dynamic dictionary) for optimal performance.  However, in specific
cases, the output buffer may not fully contain valid page cache pages,
resulting in the use of short-lived pages for temporary purposes.

Due to the limited sliding window size, LZ4 shortlived bounce pages can
also be reused in a sliding manner, so each bounce page can be vmapped
multiple times in different relative positions by design.  In order to
avoiding double frees, currently, reuse counts are recorded via page
refcount, but it will no longer be used as-is in the future world of
Memdescs.

Just maintain a lookup table to check if a shortlived page is reused.

Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20240711053659.1364989-1-hsiangkao@linux.alibaba.com
</content>
</entry>
<entry>
<title>erofs: tidy up stream decompressors</title>
<updated>2024-07-09T11:04:41+00:00</updated>
<author>
<name>Gao Xiang</name>
<email>hsiangkao@linux.alibaba.com</email>
</author>
<published>2024-07-09T09:41:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=84a2ceefff99633d8f88c7c1f9bbd2c139b8f805'/>
<id>urn:sha1:84a2ceefff99633d8f88c7c1f9bbd2c139b8f805</id>
<content type='text'>
Just use a generic helper to prepare buffers for all supported
stream decompressors, eliminating similar logic.

Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20240709094106.3018109-3-hsiangkao@linux.alibaba.com
</content>
</entry>
<entry>
<title>erofs: refine z_erofs_{init,exit}_subsystem()</title>
<updated>2024-07-09T11:04:40+00:00</updated>
<author>
<name>Gao Xiang</name>
<email>hsiangkao@linux.alibaba.com</email>
</author>
<published>2024-07-09T09:41:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5a7cce827ee9e2c56fcecf5cda0ad39d9568283d'/>
<id>urn:sha1:5a7cce827ee9e2c56fcecf5cda0ad39d9568283d</id>
<content type='text'>
Introduce z_erofs_{init,exit}_decompressor() to unexport
z_erofs_{deflate,lzma,zstd}_{init,exit}().

Besides, call them in z_erofs_{init,exit}_subsystem()
for simplicity.

Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20240709094106.3018109-2-hsiangkao@linux.alibaba.com
</content>
</entry>
<entry>
<title>erofs: move each decompressor to its own source file</title>
<updated>2024-07-09T11:04:40+00:00</updated>
<author>
<name>Gao Xiang</name>
<email>hsiangkao@linux.alibaba.com</email>
</author>
<published>2024-07-09T09:41:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=392d20ccef22cb471856f41860737e6306bee0b9'/>
<id>urn:sha1:392d20ccef22cb471856f41860737e6306bee0b9</id>
<content type='text'>
Thus *_config() function declarations can be avoided.

Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20240709094106.3018109-1-hsiangkao@linux.alibaba.com
</content>
</entry>
</feed>
