From: Dave Chinner <david@fromorbit.com>
To: Jan Tulak <jtulak@redhat.com>
Cc: Theodore Ts'o <tytso@mit.edu>,
"Darrick J. Wong" <darrick.wong@oracle.com>,
"Luis R. Rodriguez" <mcgrof@kernel.org>,
Eric Sandeen <sandeen@sandeen.net>,
Christoph Hellwig <hch@infradead.org>, Jan Kara <jack@suse.cz>,
NeilBrown <neilb@suse.com>, Jeff Mahoney <jeffm@suse.com>,
linux-xfs <linux-xfs@vger.kernel.org>
Subject: Re: [RFC] mkfs config file bikeshed now!
Date: Wed, 28 Feb 2018 09:14:08 +1100 [thread overview]
Message-ID: <20180227221408.GJ30854@dastard> (raw)
In-Reply-To: <CACj3i72YvAhVfqT-oVkFdrEfBjKOXqtbedMQS2uydBuX_WXhjQ@mail.gmail.com>
On Tue, Feb 27, 2018 at 02:43:44PM +0100, Jan Tulak wrote:
> On Tue, Feb 27, 2018 at 4:45 AM, Theodore Ts'o <tytso@mit.edu> wrote:
> > One other thing I'll mention is that it was really important to me
> > that it was very easy to look up values from the config file. So for
> > me it was a lot more than just the parser. So I can fetch a read a
> > config parameter from the config file like this:
> >
> > profile_get_boolean(ctx->profile, "options", "no_optimize_extents",
> > 0, 0, &c);
That's not the way we've set up mkfs to deal with config file
defaults.
i.e. the config file creates a "default values" structure that gets
used when no CLI parameter was specified. IOWs, all we need the
config file to do is to be parsed into a pre-defined structure and
the rest of mkfs will already DTRT.
i.e. We don't need (or want) mkfs to be directly pulling random
values from config files depending on the current option context.
> > That's because I use this for a lot more than just file system tuning
> > parametres, but also for changing how e2fsck / mke2fs behaves. So
> > trying to parse all of the config file at startup time and having to
> > stash that in some global context structure is just lot of extra work
> > that isn't necessary with the profile library compared with other
> > libraries which are focused exclusively on the parsing aspect of
> > things (which is actually pretty trivial).
> >
> > Maybe this doesn't matter for XFS, but other file system utilities may
> > find this issue to be something worthy of consideration when trying to
> > pick a config file library.
>
> Neat. But yeah, I don't think the nesting would be useful for xfs.
> Especially as I prefer the /etc/mkfs.xfs.d/ idea. It might make sense
> to use something like this, instead of foo.bar style prefixing,
> though.
>
> /etc/mkfs.xfs.d/default:
>
> [metadata]
> crc = 0
>
> [naming]
> ftype = 0
Yup, I like the simplicity of this approach. One config per file,
with simple config groups that mirror the CLI grouping and options.
Simple for admins, simple for developers, simple to implement and
test.
We really don't need any more complexity than this, so lets not make
it any more complex than it needs to be - that mistake has already
been made in recent times with mkfs.xfs modifications, and I don't
want to dig us out of that hole again...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2018-02-27 22:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-26 22:42 [RFC] mkfs config file bikeshed now! Darrick J. Wong
2018-02-26 23:42 ` Eric Sandeen
2018-02-26 23:56 ` Darrick J. Wong
2018-02-27 0:01 ` Eric Sandeen
2018-02-27 0:24 ` Eric Sandeen
2018-02-26 23:43 ` Eric Sandeen
2018-02-27 0:01 ` Luis R. Rodriguez
2018-02-27 0:10 ` Eric Sandeen
2018-02-27 0:15 ` Luis R. Rodriguez
2018-02-27 0:25 ` Darrick J. Wong
2018-02-27 3:17 ` Theodore Ts'o
2018-02-27 3:45 ` Theodore Ts'o
2018-02-27 13:43 ` Jan Tulak
2018-02-27 22:14 ` Dave Chinner [this message]
2018-02-27 18:11 ` Luis R. Rodriguez
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=20180227221408.GJ30854@dastard \
--to=david@fromorbit.com \
--cc=darrick.wong@oracle.com \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=jeffm@suse.com \
--cc=jtulak@redhat.com \
--cc=linux-xfs@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=neilb@suse.com \
--cc=sandeen@sandeen.net \
--cc=tytso@mit.edu \
/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).