util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: util-linux@vger.kernel.org
Cc: xiang@kernel.org, Karel Zak <kzak@redhat.com>
Subject: [PATCH] blkid: allow up to 64k erofs block sizes
Date: Thu, 23 Jan 2025 13:17:10 -0600	[thread overview]
Message-ID: <71d43b45-9d53-48a1-8751-7080e50937e9@redhat.com> (raw)

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))


             reply	other threads:[~2025-01-23 19:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-23 19:17 Eric Sandeen [this message]
2025-01-23 23:22 ` [PATCH] blkid: allow up to 64k erofs block sizes 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=71d43b45-9d53-48a1-8751-7080e50937e9@redhat.com \
    --to=sandeen@redhat.com \
    --cc=kzak@redhat.com \
    --cc=util-linux@vger.kernel.org \
    --cc=xiang@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).