Linux XFS filesystem development
 help / color / mirror / Atom feed
From: Lukas Herbolt <lukas@herbolt.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: aalbersh@kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfsprogs: mkfs.xfs replace assert on 0 size file with error and usage
Date: Wed, 27 May 2026 20:20:38 +0200	[thread overview]
Message-ID: <75488dc094fc2d88b6ad79b66d72ce9d@herbolt.com> (raw)
In-Reply-To: <ahbnHnGL0U4Sj7aF@infradead.org>

On 2026-05-27 14:44, Christoph Hellwig wrote:
> On Mon, May 25, 2026 at 11:05:44AM +0200, Lukas Herbolt wrote:
>> Running mkfs.xfs on zero size file ends up with assert() and coredump.
>> It would be better the print error message and usage.
> 
> Looks good:
> 
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> 
> It would be nice to add a generic xfstests case to try mkfs on
> zero size files, and maybe also weird things like character devices
> and sockets to test the error handling in case you're looking for
> another little project in this area.

Hmm, I thought about the test. Thanks for the suggestion for the "weird"
files. I will look into it.
-- 
-lhe

      reply	other threads:[~2026-05-27 18:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-25  9:05 [PATCH] xfsprogs: mkfs.xfs replace assert on 0 size file with error and usage Lukas Herbolt
2026-05-27 12:44 ` Christoph Hellwig
2026-05-27 18:20   ` Lukas Herbolt [this message]

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=75488dc094fc2d88b6ad79b66d72ce9d@herbolt.com \
    --to=lukas@herbolt.com \
    --cc=aalbersh@kernel.org \
    --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