From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Dave Chinner <david@fromorbit.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/2] mkfs: use cvtnum from libfrog
Date: Wed, 14 Aug 2019 08:18:44 -0700 [thread overview]
Message-ID: <20190814151844.GR7138@magnolia> (raw)
In-Reply-To: <20190813212936.GF6129@dread.disaster.area>
On Wed, Aug 14, 2019 at 07:29:36AM +1000, Dave Chinner wrote:
> On Tue, Aug 13, 2019 at 07:24:14AM -0700, Darrick J. Wong wrote:
> > On Tue, Aug 13, 2019 at 03:14:19PM +1000, Dave Chinner wrote:
> > > From: Dave Chinner <dchinner@redhat.com>
> > > - }
> > > - if (*sp == 's') {
> > > - if (!sectsize) {
> > > - fprintf(stderr,
> > > -_("Sectorsize must be specified prior to using 's' suffix.\n"));
> >
> > Hmm, so this message is replaced with "Not a valid value or illegal suffix"?
>
> Actually, the error message is this:
>
> # mkfs.xfs -f -b size=1b /dev/vdc
> Invalid value 1b for -b size option. Not a valid value or illegal suffix
>
> It does actually tell you what the value is, what option is wrong,
> and the message shold be fairly clear that specifying the block size
> in using a "blocks" suffix is illegal.
>
> > That's not anywhere near as helpful as the old message... maybe we
> > should have this set errno or something so that callers can distinguish
> > between "you sent garbled input" vs. "you need to set up
> > blocksize /sectsize"... ?
>
> Actually, the error will only occur when you use -s size= or -b
> size= options, as if they are not specified we use the default
> values in mkfs and cvtnum is always called with a valid
> blocksize/sectorsize pair. i.e. This error only triggers when validating
> the base sector size/block size options because that occurs before
> we set the global varibles mkfs will use for cvtnum....
>
> It's a chicken-egg thing, and I figured the error message prefix
> would be sufficient to point out the problem with the value suffic
> used for these kinda unusual corner cases.
Heh, ok, carry on then. :)
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> Cheers,
>
> Dave.
> --
> Dave Chinner
> david@fromorbit.com
next prev parent reply other threads:[~2019-08-14 15:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-13 5:14 [PATCH 0/2] xfsprogs: "Fix" --disable-static option Dave Chinner
2019-08-13 5:14 ` [PATCH 1/2] mkfs: use cvtnum from libfrog Dave Chinner
2019-08-13 14:24 ` Darrick J. Wong
2019-08-13 21:29 ` Dave Chinner
2019-08-14 15:18 ` Darrick J. Wong [this message]
2019-08-13 5:14 ` [PATCH 2/2] xfsprogs: Fix --disable-static option build Dave Chinner
2019-08-13 14:28 ` Darrick J. Wong
2019-08-13 21:33 ` Dave Chinner
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=20190814151844.GR7138@magnolia \
--to=darrick.wong@oracle.com \
--cc=david@fromorbit.com \
--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;
as well as URLs for NNTP newsgroup(s).