Re: [PATCH] erofs-utils: mkfs: also handle last compacted 2B pack in z_erofs_drop_inline_pcluster

Gao Xiang <[email protected]>
Newsgroups org.ozlabs.lists.linux-erofs
Message-ID <[email protected]>
Hi Zhiguo,

On 2026/4/29 15:59, Zhiguo Niu wrote:
> With ztailpacking enabled, the current process assumes that a compacted_4b_end
> always exists in the compacted pack. However, in some specific files, the
> compacted pack may not have a compacted_4b_end. This leads to an incorrect
> modification of the last compacted_2B entry, resulting in incorrect modification
> of its clusterofs. In subsequent fsck operations, incorrect parameters will
> affect the decompression of the penultimate pcluster.
> 
> This patch determines whether the last entry of the current compacted pack
> belongs to compacted 2B or 4B and then updates the correct bits accordingly.
> 
> Fixes: a7c1f0575ef8 ("erofs-utils: lib: refine tailpcluster compression approach")
> Signed-off-by: Zhiguo Niu <[email protected]>

Sorry for late response.

I do think the issue is valid, but either the previous
solution or the proposed one is ugly.

I wonder if there exists a better way to fixup the last lcluster
type into plain instead: I've thought about for a while but without
any valid suggestion.

Thanks,
Gao Xiang
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.