From 84061f46f80ffc04669f0b6d0176fafb6d612696 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 12 Nov 2026 17:58:40 -0500 Subject: [PATCH] tests/auto-prune: Cap the ext4 orphan file on the 1k-block /boot image Since e2fsprogs 1.47.4 (commit 6f03c698ef53), mke2fs sizes the orphan file for this ~700M 1k-block image at 681984 bytes. The kernel accepts at most 512k at that block size, so the loop mount fails with "Structure needs cleaning" (EUCLEAN) and the test never gets to ostree. Ask for a 512k orphan file. mke2fs from before the orphan_file feature (e.g. 1.46.5 on CentOS Stream 9) rejects the option, so fall back to the plain invocation there. Assisted-by: https://github.com/cgwalters/cgwalters#llms --- tests/kolainst/destructive/auto-prune.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/kolainst/destructive/auto-prune.sh b/tests/kolainst/destructive/auto-prune.sh index 418dd844da..caeba218bb 100755 --- a/tests/kolainst/destructive/auto-prune.sh +++ b/tests/kolainst/destructive/auto-prune.sh @@ -55,8 +55,12 @@ if test $((${total_blocks} * ${block_size})) -lt ${required_bootdata_size}; then # Make a new loopback-mounted /boot that's large enough bootimg=/var/tmp/boot.img truncate -s ${required_bootdata_size} ${bootimg} - # Be sure to mirror existing block size - mkfs.ext4 -b ${block_size} ${bootimg} + # Be sure to mirror existing block size. Since e2fsprogs 1.47.4 the + # default orphan file can exceed what the kernel accepts with 1k blocks + # (512k), and the mount fails with EUCLEAN; cap it. Older mke2fs without + # the orphan_file feature rejects the option, so fall back to the plain call. + mkfs.ext4 -b ${block_size} -E orphan_file_size=512K ${bootimg} \ + || mkfs.ext4 -b ${block_size} ${bootimg} mount -o loop ${bootimg} /var/mnt # Copy existing boot data cp -a /boot/* /var/mnt