Linux XFS filesystem development
 help / color / mirror / Atom feed
From: Lukas Herbolt <lukas@herbolt.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: sandeen@sandeen.net, aalbersh@kernel.org, dgc@kernel.org,
	linux-xfs@vger.kernel.org
Subject: Re: [RFC PATCH v2 0/5] Add option to use default config file.
Date: Fri, 29 May 2026 20:01:55 +0200	[thread overview]
Message-ID: <58a188ce948dc7b02da9175ba97e8297@herbolt.com> (raw)
In-Reply-To: <20260528051040.GH6078@frogsfrogsfrogs>

On 2026-05-28 07:10, Darrick J. Wong wrote:
> On Mon, May 25, 2026 at 09:57:47AM +0200, Lukas Herbolt wrote:
>> Hi,
>> Sending a v2 version trying to implement the changes suggested by
>> Carlos, Darrick, Eric and Dave. The default.conf is not installed
>> automatically but there is simple example file.
>> 
>> The order is now build-time < default-file < command line settings.
>> Some values like uuid,sunit,swidth sector size and block size are not
>> allowed to be set in the default config file and if set user is warned
>> about it and the value is reset to build-time default.
>> 
>> I moved setting of some values in cli_params and setting of 
>> mkfs_default_params
>> into new bld_dft struct as If I get it correctly we were basically 
>> setting
>> some of the default values on two places. It also  resulted in cleanup 
>> of
>> unused parameters from some validate_* functions.
> 
> This looks mostly good, but I have a couple of suggestions to improve
> the ergonomics for distributors:
> 
> 1. Make it so that mkfs.xfs itself can spit out a configuration file
> based on the "bld_dft" object.  Then we can always generate the
> "default.conf" file with something as simple as:
> 
> $ mkfs.xfs --write-defaults /root/my.conf
> $ cat /root/my.conf
> [metadata]
> rmapbt=1
> ...
> 
> Obviously this requires some careful thought about what exactly the
> printing function will actually emit -- my guess is that the only 
> things
> worth printing are filesystem features and the default fsxattr values
> that get written into the rootdir, since the device geometry will
> change.

Make sense, but I would then remove the example file, also this comes to 
the
fact while some (HW geometry) stuff are ignored in the default file. I 
would
not allow user to set sector size sunit/swidth from the default file. 
The question
is should we just exit with some info and calling usage() or set it to 
default
and warn about it?

> 
> 2. Make xfs_db/xfs_info emit a similar configuration file based on an
> existing filesystem.  Anyone needing to create many feature-for-feature
> replicas of an existing filesystem will now have a much easier time 
> than
> encoding options into a shell script.
> 
> # xfs_info -c 'writecfg' /my/rad/fs > /root/rad.conf
> # mkfs.xfs -c options=/root/rad.conf /dev/sda
> # mkfs.xfs -c options=/root/rad.conf /dev/sdb
> ...
> 
> (maybe add an xfs_admin option to call xfs_{db,info} too?)
> 
> What do you think?
> 

I guess xfs_{db,info} option which would be used in xfs_admin makes 
sense.
But again here comes a question should we emit exact copy or leave HW
geometry aside?



-- 
-lhe

  reply	other threads:[~2026-05-29 18:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-25  7:57 [RFC PATCH v2 0/5] Add option to use default config file Lukas Herbolt
2026-05-25  7:57 ` [RFC PATCH v2 1/5] xfsprogs: mkfs.xfs Add buildtime default cli_params as global variable Lukas Herbolt
2026-05-28  4:50   ` Darrick J. Wong
2026-05-29 18:02     ` Lukas Herbolt
2026-05-25  7:57 ` [RFC PATCH v2 2/5] xfsprogs: mkfs.xfs add default configuration file Lukas Herbolt
2026-05-28  4:56   ` Darrick J. Wong
2026-05-29 18:06     ` Lukas Herbolt
2026-05-25  7:57 ` [RFC PATCH v2 3/5] xfsprogs: mkfs.xfs add auto|autodetect value for -d/l/r concurrency Lukas Herbolt
2026-05-28  4:57   ` Darrick J. Wong
2026-05-29 18:07     ` Lukas Herbolt
2026-05-25  7:57 ` [RFC PATCH v2 4/5] xfs_admin: add -d option to manage default mkfs config file Lukas Herbolt
2026-05-28  5:00   ` Darrick J. Wong
2026-05-25  7:57 ` [RFC PATCH v2 5/5] xfsprogs: mkfs.xfs clean up unused dft option in various validators Lukas Herbolt
2026-05-28  5:01   ` Darrick J. Wong
2026-05-28  5:10 ` [RFC PATCH v2 0/5] Add option to use default config file Darrick J. Wong
2026-05-29 18:01   ` Lukas Herbolt [this message]
2026-06-02  4:55     ` Darrick J. Wong

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=58a188ce948dc7b02da9175ba97e8297@herbolt.com \
    --to=lukas@herbolt.com \
    --cc=aalbersh@kernel.org \
    --cc=dgc@kernel.org \
    --cc=djwong@kernel.org \
    --cc=linux-xfs@vger.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