Skip to content

Commit

Permalink
blkid: allow up to 64k erofs block sizes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Sandeen authored and karelzak committed Jan 30, 2025
1 parent f30159e commit ff0ac0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libblkid/src/superblocks/erofs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit ff0ac0f

Please sign in to comment.