Re: [PATCH 9/9] mkfs.xfs: add mkfs.xfs.conf parse support

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

 



On 3/3/17 5:13 PM, Luis R. Rodriguez wrote:
> You may want to stick to specific set of configuration options when
> creating filesystems with mkfs.xfs -- sometimes due to pure technical
> reasons, but some other times to ensure systems remain compatible as
> new features are introduced with older kernels, or if you always want
> to take advantage of some new feature which would otherwise typically
> be disruptive.
> 
> Although mkfs.xfs already uses sensible defaults this adds a configuration
> option for parsing defaults settings for mkfs.xfs parsed prior to processing
> input arguments.

So, a few other points on this, while you look at libconfig?

Thanks for the man pages & updates, but I think they can use a bit
of editing and wordsmithing for clarity; we can work on that if/when
the technical details get sorted.

> User input passed to mkfs.xfs overrides defaults founds through the
> new optional configuration file, by default:
> 
> 	/etc/mkfs.xfs.conf
> 
> To use /etc/ be sure to configure xfsprogs with:
> 
>  ./configure --sysconfdir=/etc/

This should just DTRT by default (today it'd go to /usr/etc by default)

(For what it's worth, xfs_quota just hard-codes "/etc" -

#define PROJID          "/etc/projid"
#define PROJECT_PATHS   "/etc/projects")

> The build system also allows distributions to override the default
> mkfs.xfs.conf defaults with a custom:
> 
> 	etc/mkfs.xfs.conf.custom.in

I'm not a fan of this "drop untracked special files into $XFSPROGS/etc/
and it'll get renamed and then installed."  If you want a custom
config file in etc for the distro, just use the packaging tools to put
it there, IMHO.  Filtering it through the source tree && make install just
adds complexity.

> The default etc/mkfs.xfs.conf.in provides commented out examples.
> You can also override the configuration file used either with the
> MKFS_XFS_CONFIG environment variable or by using the new -c command
> line argument to mkfs.xfs. Only when -c is used will the configuration
> file be required to be present.
> 
> To verify what configuration file is used on a system use the typical:
> 
>   mkfs.xfs -N

I'd prefer to drop the env var handling.  Nothing else in xfsprogs uses
that for production cases; I don't really see a reason for it, and it
only complicates things.   Require -c path if specified, use /etc/ path
if present, otherwise ignore.

Also, printing the config file path at mkfs time will probably break some
scripts that aren't expecting an extra line ...

thanks,
-Eric
 
> Signed-off-by: Luis R. Rodriguez <mcgrof@xxxxxxxxxx>
--
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