Re: [PATCH 6/6 v2] mkfs: extend opt_params with a value field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 17, 2017 at 1:03 PM, Dave Chinner <david@xxxxxxxxxxxxx> 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. :-) 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...

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.

Cheers,
Jan
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux