From: Dave Chinner <david@fromorbit.com>
To: Jan Tulak <jtulak@redhat.com>
Cc: "Darrick J. Wong" <darrick.wong@oracle.com>,
Eric Sandeen <sandeen@sandeen.net>,
linux-xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH 6/6 v2] mkfs: extend opt_params with a value field
Date: Fri, 18 Aug 2017 08:59:52 +1000 [thread overview]
Message-ID: <20170817225952.GV21024@dastard> (raw)
In-Reply-To: <CACj3i73CN_0YE8gEV6+qxq5hcGEu1aXiL8fCO=VLv7qvhqoNpg@mail.gmail.com>
On Thu, Aug 17, 2017 at 04:56:18PM +0200, Jan Tulak wrote:
> On Thu, Aug 17, 2017 at 1:03 PM, Dave Chinner <david@fromorbit.com> wrote:
> > Hi folks,
> >
> > I'm going to put my 2c worth in here in the form of a patch. The
> > tl;dr of it all is that I think we need to reset and reflect on what
> > I was originally trying to acheive with the table based option
> > parsing: factoring and simplifying mkfs into an easy to understand,
> > maintainable code base....
> >
> > And, while I remember, there's a handful of input validation bugs I
> > found in the code whiel I was doing this (like missing conflict
> > checks).
> >
> > Anyway, have a look, based on the current for-next branch.
> >
> >> >> [1] # mkfs.xfs -dfile,name=fsfile,size=1g,sectsize=4k -lfile,name=logfile,size=512m,sectsize=512
> >> >
> >> > I see -d sectsize is in the --help screen but not the manpage. Can we
> >> > fix that?
> >>
> >> I made it, but Dave would rather see the -d sectsize option removed.
> >> Which I'm not sure about...
> >> See "[PATCH] xfsprogs: add sectsize/sectlog to the man page"
> >
> > Slash and burn - there is so much useless, redundant crap in the CLI
> > we've been holding onto for 15 years that we should just get rid of
> > it. That's what I was intending to do originally with this rework
> > and I still see no reason why we should be keeping stuff that just
> > causes user confusion and implemention complexity.
>
> I went through it and I admit that his shot seems to go in a much
> better way than my patches; I focused on the opts structure too much I
> guess. :-)
That's not your fault - if anyone is to blame it's me for not
providing you with better guidance in the first place.
> So, thanks for this restart. I'm going to compare it with
> my changes and check which parts of my set makes sense in this
> direction as well and which do not...
Having slept on it, I suspect that I'll generate an "input
parameters" structure to replace the hacked up "cli geometry",
similar to what Luis first wanted to add. If it works out the way I
think it will, we'll end up with a set of key,value inputs in that
structure that we can trivially generate using a config file rather
than the CLI....
> And this is maybe a bit premature idea now, but should we add some way
> how to tell the user "this option is deprecated, use XXX"? I think
> that it is a good idea if we are removing parts of the CLI, which
> might break some user scripts or workflow. It would be pretty easy to
> do - with something like your *_opts_parser() functions, just a case,
> print the error and return EINVAL.
Depends on how we decide to do the removal. If we go with
deprecation and later removal, then I think this is a good idea.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2017-08-17 23:00 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-11 12:30 [PATCH 0/6 v2] mkfs: save user input into opts table Jan Tulak
2017-08-11 12:30 ` [PATCH 1/6] mkfs: Save raw user input field to the opts struct Jan Tulak
2017-08-14 22:56 ` Darrick J. Wong
2017-08-15 9:47 ` Jan Tulak
2017-08-11 12:30 ` [PATCH 2/6] mkfs: rename defaultval to flagval in opts Jan Tulak
2017-08-14 22:56 ` Darrick J. Wong
2017-08-11 12:30 ` [PATCH 3/6] mkfs: remove intermediate getstr followed by getnum Jan Tulak
2017-08-14 22:58 ` Darrick J. Wong
2017-08-11 12:30 ` [PATCH 4/6] mkfs: merge tables for opts parsing into one table Jan Tulak
2017-08-14 23:06 ` Darrick J. Wong
2017-08-15 10:05 ` Jan Tulak
2017-08-11 12:30 ` [PATCH 5/6] mkfs: move getnum within the file Jan Tulak
2017-08-14 23:07 ` Darrick J. Wong
2017-08-15 10:14 ` Jan Tulak
2017-08-15 21:09 ` Eric Sandeen
2017-08-16 9:25 ` Jan Tulak
2017-08-11 12:30 ` [PATCH 6/6] mkfs: extend opt_params with a value field Jan Tulak
2017-08-14 23:15 ` Darrick J. Wong
2017-08-15 10:42 ` Jan Tulak
2017-08-15 15:08 ` [PATCH 1/6 v2] mkfs: Save raw user input field to the opts struct Jan Tulak
2017-08-15 15:08 ` [PATCH 3/6 v2] mkfs: remove intermediate getstr followed by getnum Jan Tulak
2017-08-15 23:20 ` Eric Sandeen
2017-08-17 11:36 ` Dave Chinner
2017-08-15 15:08 ` [PATCH 4/6 v2] mkfs: merge tables for opts parsing into one table Jan Tulak
2017-08-15 15:08 ` [PATCH 5/6 v2] mkfs: move getnum within the file Jan Tulak
2017-08-15 15:08 ` [PATCH 6/6 v2] mkfs: extend opt_params with a value field Jan Tulak
2017-08-16 21:13 ` Eric Sandeen
2017-08-16 21:38 ` Darrick J. Wong
2017-08-17 10:08 ` Jan Tulak
2017-08-17 11:03 ` Dave Chinner
2017-08-17 14:56 ` Jan Tulak
2017-08-17 22:59 ` Dave Chinner [this message]
2017-08-17 15:26 ` Eric Sandeen
2017-08-15 23:07 ` [PATCH 1/6 v2] mkfs: Save raw user input field to the opts struct Eric Sandeen
2017-08-16 9:11 ` Jan Tulak
2017-08-16 14:42 ` Eric Sandeen
2017-08-16 15:38 ` Jan Tulak
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=20170817225952.GV21024@dastard \
--to=david@fromorbit.com \
--cc=darrick.wong@oracle.com \
--cc=jtulak@redhat.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@sandeen.net \
/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