Re: [PATCH erofs-utils v2 1/2] erofs-utils: fix swapped hi/lo in 48-bit primary blocks read

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

On 2026/4/3 21:05, Zhan Xusheng wrote:
> erofs_read_superblock() combines the 48-bit primary device block count as:
>      (primarydevice_blocks << 32) | blocks_hi
> 
> This places blocks_lo in the upper 32 bits and blocks_hi in the lower
> 16 bits, which is reversed.  The correct combination is:
>        primarydevice_blocks | ((u64)blocks_hi << 32)
> 
> This is the same bug that was fixed in the Linux kernel by commit
> 0b96d9bed324 ("erofs: fix block count report when 48-bit layout is
> on").  Apply the equivalent fix to erofs-utils.
> 
> Fixes: f5b492b27e53 ("erofs-utils: add 48-bit block addressing support")
> Signed-off-by: Zhan Xusheng <[email protected]>
I wonder if it's the AI hallucination.  Anyway, I fixed the
commit message as below and applied:

erofs-utils: lib: fix block count report when 48-bit layout is on

Source kernel commit: 0b96d9bed324a1c1b7d02bfb9596351ef178428d

Fixes: eeceb2289513 ("erofs-utils: implement 48-bit block addressing for unencoded inodes")
Signed-off-by: Zhan Xusheng <[email protected]>
Signed-off-by: Gao Xiang <[email protected]>
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.