util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] blkid: allow up to 64k erofs block sizes
@ 2025-01-23 19:17 Eric Sandeen
  2025-01-23 23:22 ` Gao Xiang
  2025-01-24 14:37 ` [PATCH V2] " Eric Sandeen
  0 siblings, 2 replies; 5+ messages in thread
From: Eric Sandeen @ 2025-01-23 19:17 UTC (permalink / raw)
  To: util-linux; +Cc: xiang, Karel Zak

Today, mkfs.erofs defaults to page size for block size, but blkid
does not recognize this. Increase the limit to 64k.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

(There might be strange arches out there > 64k but I don't know if
erofs really works with blocks that big, so for now let's just
limit it to 64k?)

diff --git a/libblkid/src/superblocks/erofs.c b/libblkid/src/superblocks/erofs.c
index 05822460b..89620db47 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 > 31 || (1U << sb->blkszbits) > 65536)
 		return BLKID_PROBE_NONE;
 
 	if (!erofs_verify_checksum(pr, mag, sb))


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-01-30  9:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-23 19:17 [PATCH] blkid: allow up to 64k erofs block sizes Eric Sandeen
2025-01-23 23:22 ` Gao Xiang
2025-01-24 14:37 ` [PATCH V2] " Eric Sandeen
2025-01-25 15:19   ` Gao Xiang
2025-01-30  9:49     ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).