public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Andrey Albershteyn <aalbersh@redhat.com>,
	xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] mkfs: fix blkid probe API violations causing weird output
Date: Tue, 15 Apr 2025 21:50:44 -0700	[thread overview]
Message-ID: <20250416045044.GA25700@frogsfrogsfrogs> (raw)
In-Reply-To: <Z_8zojbPUQ69-hH7@infradead.org>

On Tue, Apr 15, 2025 at 09:35:46PM -0700, Christoph Hellwig wrote:
> On Tue, Apr 15, 2025 at 06:28:37PM -0700, Darrick J. Wong wrote:
> > +	/* libblkid 2.38.1 lies and can return -EIO */
> 
> Can you expand this comment be less terse using the wording in the
> commit message?  Otherwise looks good:

Ok.

> Reviewed-by: Christoph Hellwig <hch@lst.de>
> 
> Did you also report the bug to util-linux so that it gets fixed there?

I'm not even sure how to categorize it -- the API docs all say things
like this:

 * Returns: 0 on success, 1 if nothing is detected or -1 on case of error.
 */
int blkid_do_fullprobe(blkid_probe pr)

But then you look at the probe functions that it calls:

static int probe_xfs(blkid_probe pr, const struct blkid_idmag *mag)
{
	struct xfs_super_block *xs;

	xs = blkid_probe_get_sb(pr, mag, struct xfs_super_block);
	if (!xs)
		return errno ? -errno : 1;

or:

static int probe_apfs(blkid_probe pr, const struct blkid_idmag *mag)
{
	struct apfs_super_block *sb;

	sb = blkid_probe_get_sb(pr, mag, struct apfs_super_block);
	if (!sb)
		return errno ? -errno : BLKID_PROBE_NONE;

So I guess it's just ... super broken?

--D

  reply	other threads:[~2025-04-16  4:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-16  1:28 [PATCH] mkfs: fix blkid probe API violations causing weird output Darrick J. Wong
2025-04-16  4:35 ` Christoph Hellwig
2025-04-16  4:50   ` Darrick J. Wong [this message]
2025-04-16  5:12     ` Christoph Hellwig

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=20250416045044.GA25700@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=aalbersh@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-xfs@vger.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