]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
blkid: allow up to 64k erofs block sizes
authorEric Sandeen <sandeen@redhat.com>
Fri, 24 Jan 2025 14:37:12 +0000 (08:37 -0600)
committerKarel Zak <kzak@redhat.com>
Thu, 30 Jan 2025 09:48:21 +0000 (10:48 +0100)
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 <xiang@kernel.org>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/superblocks/erofs.c

index 05822460be6152334f6f4c12b0e5bd6af1597c38..57fd80220daa2a1ab780347e7fb2daf66a455f15 100644 (file)
@@ -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))