🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.dist
4 messages
4 total messages Started by Ping Li Wed, 04 Nov 2026 08:20
Bug#1152993: erofs-utils: please build with MAX_BLOCK_SIZE=65536 (64 KiB-block images on aarch64)
#3201
Author: Ping Li
Date: Wed, 04 Nov 2026 08:20
81 lines
5647 bytes
Package: erofs-utils
Version: 1.9.4-1
Severity: wishlist
Tags: patch

Hi Xiang,

erofs-utils hard-codes its maximum supported block size at build time:
configure sets EROFS_MAX_BLOCK_SIZE either from the MAX_BLOCK_SIZE
environment variable, or by probing sysconf(_SC_PAGESIZE) on the
*build* host (falling back to 4096 when cross-compiling, and to a
16 KiB minimum on aarch64 since 1.9).

EROFS images created on aarch64 systems running 64 KiB-page kernels
use blkszbits=16. Since the arm64 buildds run 4 KiB-page kernels,
the shipped binaries reject such images:

  $ fsck.erofs /dev/disk/by-label/app
  <E> erofs: blksize 65536 isn't supported on this platform
  <E> erofs: failed to read superblock

All consumers are affected: fsck.erofs, dump.erofs, erofsfuse and
mount.erofs. Note that on trixie (1.8.6) the cap is 4096, so even
16 KiB-block images are rejected there.

I verified this on an arm64 device running a 64 KiB-page kernel:
fsck.erofs 1.8.6 from trixie rejects both 16 KiB and 64 KiB images,
while a build with EROFS_MAX_BLOCK_SIZE=65536 checks both fine.

No source change is needed: the attached debdiff exports
MAX_BLOCK_SIZE=65536 in debian/rules, which is the documented
autoconf argument variable for exactly this purpose. The larger
limit only grows a few on-stack buffers (64 KiB instead of 4/16 KiB
in erofs_read_superblock() and friends), which is fine with the
default 8 MiB thread stack - upstream already ships 16 KiB buffers
on aarch64.

Reproducer:

  mkfs.erofs -b 65536 img.erofs srcdir/
  fsck.erofs img.erofs

I rebuilt the package with the attached debdiff and verified that
the resulting fsck.erofs checks both 16 KiB and 64 KiB blocksize
images successfully.

Thanks,
Ping Li

diff -Nru erofs-utils-1.9.4/debian/changelog erofs-utils-1.9.4/debian/changelog
--- erofs-utils-1.9.4/debian/changelog	2026-08-19 20:00:00.000000000 +0800
+++ erofs-utils-1.9.4/debian/changelog	2026-11-04 15:57:18.070014646 +0800
@@ -1,3 +1,11 @@
+erofs-utils (1.9.4-1.1) UNRELEASED; urgency=medium
+
+  * Build with MAX_BLOCK_SIZE=65536 so that fsck.erofs & co. accept
+    EROFS images with 64 KiB blocks (as created on aarch64 systems
+    running 64 KiB-page kernels).
+
+ -- Ping Li <leeonion.muyu@gmail.com>  Wed, 04 Nov 2026 15:57:12 +0800
+
 erofs-utils (1.9.4-1) unstable; urgency=medium

   * New upstream release 1.9.4.
diff -Nru erofs-utils-1.9.4/debian/rules erofs-utils-1.9.4/debian/rules
--- erofs-utils-1.9.4/debian/rules	2026-08-19 20:00:00.000000000 +0800
+++ erofs-utils-1.9.4/debian/rules	2026-11-04 15:19:41.829224626 +0800
@@ -4,6 +4,13 @@

 export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

+# erofs-utils hard-codes its maximum supported block size at build time;
+# configure otherwise probes the build host's page size, which caps arm64
+# builds at 16 KiB (or 4 KiB on 4 KiB-page buildds).  EROFS images with
+# 64 KiB blocks (aarch64 64 KiB-page kernels) then fail with:
+#   <E> erofs: blksize 65536 isn't supported on this platform
+export MAX_BLOCK_SIZE = 65536
+
 ifneq ($(DEB_TARGET_ARCH_OS),linux)
 SKIP_FUSE2FS=yes
 SKIP_SELINUX=yes
Bug#1152993: erofs-utils: please build with MAX_BLOCK_SIZE=65536 (64 KiB-block images on aarch64)
#4676
Author: Ping Li
Date: Mon, 16 Nov 2026 05:50
8 lines
2838 bytes
Hi Xiang,

Gentle ping on this bug. It would be good to know if there is
anything else you would like changed in the debdiff, or if you
have concerns about raising MAX_BLOCK_SIZE.

Thanks,
Ping Li
Bug#1152993: erofs-utils: please build with MAX_BLOCK_SIZE=65536 (64 KiB-block images on aarch64)
#4879
Author: Gao Xiang
Date: Tue, 17 Nov 2026 20:00
21 lines
2290 bytes
Hi Ping,

On Mon, Nov 16, 2026 at 01:43:11PM +0800, Ping Li wrote:
> Hi Xiang,
> 
> Gentle ping on this bug. It would be good to know if there is
> anything else you would like changed in the debdiff, or if you
> have concerns about raising MAX_BLOCK_SIZE.

I think it looks good, but currently I'm lacking of a slot to
update this.

The worst case is that I will merge this together with the next
erofs-utils version.

Thanks,
Gao Xiang

> 
> Thanks,
> Ping Li
Bug#1152993: erofs-utils: please build with MAX_BLOCK_SIZE=65536 (64 KiB-block images on aarch64)
#4908
Author: Ping Li
Date: Wed, 18 Nov 2026 03:00
7 lines
2785 bytes
Hi Xiang,

Thanks for taking a look. No rush at all - happy for this to go
in with the next erofs-utils version.

Thanks,
Ping Li
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads