Re: [RFC] mkfs config file bikeshed now!

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

 



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
--
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