From 773d3517ddfca4c03881ac0164a4ea9eaf7a1fe7 Mon Sep 17 00:00:00 2001 From: Chris Crone Date: Thu, 18 Jun 2026 07:41:27 -0400 Subject: [PATCH] erofs: align default mkfs block size across platforms Force a 4K block size on all platforms rather than only on darwin. An explicit caller-supplied -b is still respected. Signed-off-by: Chris Crone --- internal/erofsutils/mount.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/internal/erofsutils/mount.go b/internal/erofsutils/mount.go index 2125fd678..cc9a4a25f 100644 --- a/internal/erofsutils/mount.go +++ b/internal/erofsutils/mount.go @@ -123,10 +123,6 @@ func GenerateTarIndexAndAppendTar(ctx context.Context, r io.Reader, layerPath, u // AddDefaultMkfsOpts adds default options for mkfs.erofs func AddDefaultMkfsOpts(mkfsExtraOpts []string) []string { - if runtime.GOOS != "darwin" { - return mkfsExtraOpts - } - // Check if -b argument is already present for _, opt := range mkfsExtraOpts { if strings.HasPrefix(opt, "-b") { @@ -134,8 +130,7 @@ func AddDefaultMkfsOpts(mkfsExtraOpts []string) []string { } } - // Add -b4096 as the first option to prevent unusable block - // size from being used on macOS. + // Default to a 4K block size so images mount on any page size. return append([]string{"-b4096"}, mkfsExtraOpts...) }