From: "Luis R. Rodriguez" <mcgrof@kernel.org>
To: "Darrick J. Wong" <darrick.wong@oracle.com>, Tso Ted <tytso@mit.edu>
Cc: "Luis R. Rodriguez" <mcgrof@kernel.org>,
Eric Sandeen <sandeen@sandeen.net>,
Dave Chinner <david@fromorbit.com>,
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: Tue, 27 Feb 2018 00:01:22 +0000 [thread overview]
Message-ID: <20180227000122.GR14069@wotan.suse.de> (raw)
In-Reply-To: <20180226224224.GE19312@magnolia>
On Mon, Feb 26, 2018 at 02:42:24PM -0800, Darrick J. Wong wrote:
> Note that a libconfig file (Dave suggested libconfig ages ago) might
> look more like this:
No, Dave *only hinted* towards libconfig ;)
I ran into grotesque issues with libconfig, and quickly moved to evaluate
libini_config (used for SSSD) as an alternative. IMHO it had the best
and up to date implementation, had great community traction, and I saw
support for it on a slew of old older distros.
I also evaluated Ted Tso's e2fprogs profile parser (based on MIT kerberos), and
it turns out that its 14.86% the size of libini_config.so.5.2.0, which is an
incredible bonus. It also supports to work with a slew of different OSes (which
we probably don't care for), but the gains in size are perhaps worth
considering. That and the fact that it will likely build on probably even
more ancient distros. The e2fsprogs profile parser also lacks uint64_t support
but adding support is very trivial. Another thing with e2fprogs's profile
parser is we'd have to come to an agreement with Ted and the e2fsprogs
community on sharing the library code. He seems to be open to that if we go
this route. To help I already did a lot of the work of extracting what we'd
need and also threw in a demo program:
https://gitlab.com/mcgrof/libekprofile
Similar review / demo is available with the other libraries:
https://gitlab.com/mcgrof/libconfig-int64-issues
https://gitlab.com/mcgrof/libini_config-demo
For boring details on further evaluation with other filesystems and what they
do and nitty gritty details of the above evaluation you can read my paper [0].
I even had evaluated NFS's configuration parser... at this point I was surprised
everyone keeps re-inventing the wheel...
One reason to consider sharing also is to help other filesystems as they
likely will run into similar requirements. Why does everyone keep re-inventing
this simple wheel on filesystem configuration parsers? Yes I suspect btrfs may
want something similar.
So in terms of bikeshedding -- its probably important also to at least zero down on
a library we want to work with. The rest I suspect will actually be pretty
trivial bikeshedding.
FWIW both libini_config and the e2fsprogs profile parser could cope with
namespaces on the configuration file as well. The syntax just varies
slightly. IIRC with e2fsprogs profile parsers we could end up with something
like:
[defaults]
foo=0
bar=0
[stuff]
some_release = {
foo=1
bar=2
}
new_release = {
foo=2
}
Meanwhile I think with libini_config it was something like:
[defaults]
foo=0
bar=0
[stuff/some_release]
foo=1
bar=2
[stuff/new_release]
foo=2
[0] https://gitlab.com/mcgrof/filesystem-configuration-paper/blob/master/paper.pdf
Luis
next prev parent reply other threads:[~2018-02-27 0:01 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 [this message]
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
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=20180227000122.GR14069@wotan.suse.de \
--to=mcgrof@kernel.org \
--cc=darrick.wong@oracle.com \
--cc=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=jeffm@suse.com \
--cc=linux-xfs@vger.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).