From cd951d5e56b2bbb23183c0c8a5338580fb43343c Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Wed, 19 Feb 2025 14:50:05 -0500 Subject: [PATCH] backport blkid: allow up to 64k erofs block sizes This is a backport of [1], which should help us use EROFS in live media on ppc64le [2]. [1] https://github.com/karelzak/util-linux/commit/ff0ac0f27dc3de7d250b2a69f6452bfeec104f8c [2] https://github.com/coreos/fedora-coreos-tracker/issues/1877 --- ...id-allow-up-to-64k-erofs-block-sizes.patch | 33 +++++++++++++++++++ util-linux.spec | 3 ++ 2 files changed, 36 insertions(+) create mode 100644 0001-blkid-allow-up-to-64k-erofs-block-sizes.patch diff --git a/0001-blkid-allow-up-to-64k-erofs-block-sizes.patch b/0001-blkid-allow-up-to-64k-erofs-block-sizes.patch new file mode 100644 index 0000000..825c7d0 --- /dev/null +++ b/0001-blkid-allow-up-to-64k-erofs-block-sizes.patch @@ -0,0 +1,33 @@ +From ff0ac0f27dc3de7d250b2a69f6452bfeec104f8c Mon Sep 17 00:00:00 2001 +From: Eric Sandeen +Date: Fri, 24 Jan 2025 08:37:12 -0600 +Subject: [PATCH] blkid: allow up to 64k erofs block sizes + +Today, mkfs.erofs defaults to page size for block size, but blkid +does not recognize this. Increase the limit to 64k. + +Reviewed-by: Gao Xiang +Signed-off-by: Eric Sandeen +Signed-off-by: Karel Zak +--- + libblkid/src/superblocks/erofs.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libblkid/src/superblocks/erofs.c b/libblkid/src/superblocks/erofs.c +index 05822460b..57fd80220 100644 +--- a/libblkid/src/superblocks/erofs.c ++++ b/libblkid/src/superblocks/erofs.c +@@ -73,8 +73,8 @@ static int probe_erofs(blkid_probe pr, const struct blkid_idmag *mag) + if (!sb) + return errno ? -errno : BLKID_PROBE_NONE; + +- /* EROFS is restricted to 4KiB block size */ +- if (sb->blkszbits > 31 || (1U << sb->blkszbits) > 4096) ++ /* block size must be between 512 and 64k */ ++ if (sb->blkszbits < 9 || sb->blkszbits > 16) + return BLKID_PROBE_NONE; + + if (!erofs_verify_checksum(pr, mag, sb)) +-- +2.48.1 + diff --git a/util-linux.spec b/util-linux.spec index 1b968ec..f5198a1 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -111,6 +111,9 @@ Patch0: login-lastlog-create.patch # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch +# Backport better support for erofs on ppc64le +Patch2: 0001-blkid-allow-up-to-64k-erofs-block-sizes.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among