On Tue, Dec 7, 2021 at 4:05 PM Verma, Vishal L <[email protected]> wrote:
>
> On Tue, 2021-12-07 at 14:51 -0800, Dan Williams wrote:
> > On Mon, Dec 6, 2021 at 2:28 PM Vishal Verma <[email protected]> 
> > wrote:
> > >
> > > From: QI Fuli <[email protected]>
> > >
> > > Add ndctl_configs to ndctl_ctx for supporting ndctl global configuration
> > > files. All files with .conf suffix under {sysconfdir}/ndctl can be
> >
> > I expect this should be named a ".d" directory to match expectations
> > of when a directory supports multiple config-file snippets. Either
> > "{sysconfdir}/ndctl/ndctl.d", "{sysconfdir}/ndctl/conf.d",
> > ""{sysconfdir}/ndctl.d"  would be ok with me. "{sysconfdir}/ndctl" is
> > still needed for the security keys.
>
> ".d" sounds good - I prefer "{sysconfdir}/ndctl.d" or even something
> like "{sysconfdir}/ndctl.conf.d" to make it explicit that this is for
> config files.

Sure, that works too. I note that modprobe.d is full of ".conf" files,
but I see no harm in including ".conf" in the directory name. Since
yum.repos.d is full of ".repo" files as a counter example in the
naming scheme.

[..]
> >
> > I expect this to happen by default in ndctl_new().
> >
> > In fact, ndctl_new() might want to grow a config path argument to
> > override the default.
>
> Happening by default in ndctl_new sounds good.
> However since ndctl_new() is an exported API, we can't just add a new
> argument to it, can we?

Oh, yeah, it would need to be a new ndctl_new(). No worries we can
cross that bridge later.

> Do we expect callers to want custom paths,
> outside of what a distro may set via NDCTL_CONF_DIR during build?

I was thinking it would be like mdadm where you can override the
location of the configuration file(s) on the command line. We can
always add that later, no need for feature creep right now.

Reply via email to