From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: "Luis R. Rodriguez" <mcgrof@kernel.org>,
Dave Chinner <david@fromorbit.com>,
Christoph Hellwig <hch@infradead.org>,
linux-xfs <linux-xfs@vger.kernel.org>
Subject: Re: [RFC] mkfs config file bikeshed now!
Date: Mon, 26 Feb 2018 15:56:49 -0800 [thread overview]
Message-ID: <20180226235649.GG19312@magnolia> (raw)
In-Reply-To: <71515062-0ca8-3dbd-88d0-26c9d10b2c9d@sandeen.net>
On Mon, Feb 26, 2018 at 05:42:15PM -0600, Eric Sandeen wrote:
>
>
> On 2/26/18 4:42 PM, Darrick J. Wong wrote:
> > On Thu, Feb 22, 2018 at 05:59:09PM -0800, Darrick J. Wong wrote:
> >
> >>> Clearly. Its still a nice sensible feature to address any defaults,
> >>> and now that I see chinner/mkfs-refactor is merged I'll go work
> >>> off of that and post patches again soon.
> >
> > I'll help you start the config file format bikeshedding:
> >
> > So here at $employer we have to support a bunch of different base system
> > and kernel configurations. Some of our customers run heterogeneous
> > environments where they have to be able to go back and forth between
> > recent and old systems (stock OL6.9 <-> OL7 + UEK4) whereas others only
> > care about formatting to whatever runs on the deployed system. Right
> > now we ship xfsprogs 4.5 with very conservative defaults, but this has
> > become a hassle to keep patching mkfs, to remember which option sets
> > correspond with which config, and to communicate that whole mess to
> > customers. Shipping multiple xfsprogs packages seems gross.
> >
> > What we'd prefer to do is ship a single up to date xfsprogs package
> > along with a mkfs config file containing distro-supported filesystem
> > profiles. As a side note, if there's no config file then we'd use
> > whatever defaults are coded into xfs_mkfs.c.
>
> I think that is an extremely important note, and the only sane behavior. :)
>
> > For example, say we had a /etc/xfs.conf file shipping with xfsprogs:
>
> /etc/mkfs.xfs.conf please, this configures mkfs and nothing else, right?
Ok. I mean, I might let that be $sysconfdir/mkfs.xfs.conf or something,
but I agree about the filename component of the path.
> >
> > [defaults]
> > metadata.crc = false
> > naming.ftype = false
> >
> > [rhel7]
> > metadata.crc = true
>
> Oh, one more thing. Let's not arbitrarily decide that the commandline
> uses 1/0 but the configfile uses true/false. I'd really like as much
> 1:1 consistency here as possible.
Oops. I of course meant 0 / 1 here, since the goal is to use the
existing mkfs parsing system here.
> > [uek3]
> > naming.ftype = true
> >
> > [uek4]
> > metadata.crc = true
> > naming.ftype = true
> > metdata.finobt = true
> >
> > [experimental]
> > metadata.rmapbt = true
> > metadata.reflink = true
> > inode.sparse = true
> > data.agcount = 32
> >
> > The "defaults" section enables the distro vendor to patch in whatever
> > default config they want to support. In the example above the distro is
> > not yet ready to support ftype or v5 filesystems everywhere because they
> > want maximum compatibility, even though xfsprogs (by this point in the
> > future) enables them by default.
>
> Do the subsequent sections each independently specify the behavior or do they
> build on the defaults? I'd prefer the former (do not build on [defaults]),
> I think.
Not sure either. It would be useful to let the non-defaults profile
inherit off of the defaults profile, but otoh to an administrator it's a
lot clearer what they're getting with a profile if we force the config
file writer to specify the entire configuration.
Hmmm, I am drifting towards "do not build on defaults".
> > # mkfs.xfs /dev/sda <-- formats a boring v4 filesystem
>
> IIRC Dave had a patch that emitted what was being used for defaults if
> not the code - also IIRC I removed it but we should put that back
> in with any config file parsing, I think.
>
> "Using defaults from config file [defaults]" or somesuch.
Yes. How about:
"Using profile 'rhel7' from /etc/mkfs.xfs.conf."
> I had also asked whether upstream would ship a config file at all. I'd suggest
> that we should not, because we wouldn't do anything other than restate
> code defaults, and I'm not interested in keeping that consistent.
I don't see much of a point since we'd be shipping
# mkfs.xfs --config-file-defaults > /etc/mkfs.xfs.conf
> (OTOH a mkfs.xfs --config-file-defaults to spit out a code-defaults
> configfile for editing might be neato) ;)
--generate-config-file?
--D
> -Eric
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2018-02-26 23:57 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 [this message]
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
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=20180226235649.GG19312@magnolia \
--to=darrick.wong@oracle.com \
--cc=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=linux-xfs@vger.kernel.org \
--cc=mcgrof@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;
as well as URLs for NNTP newsgroup(s).