Linux Device Mapper development
 help / color / mirror / Atom feed
From: Martin Wilck <martin.wilck@suse.com>
To: "bmarzins@redhat.com" <bmarzins@redhat.com>
Cc: "dm-devel@redhat.com" <dm-devel@redhat.com>
Subject: Re: [dm-devel] [PATCH 0/9] Add protocol specific config subsection
Date: Wed, 13 Apr 2022 11:03:00 +0000	[thread overview]
Message-ID: <e514db74f56c6ebb71dc18094afbccefd893cb99.camel@suse.com> (raw)
In-Reply-To: <20220412220125.GH24684@octiron.msp.redhat.com>

On Tue, 2022-04-12 at 17:01 -0500, Benjamin Marzinski wrote:
> On Tue, Apr 12, 2022 at 08:47:38PM +0000, Martin Wilck wrote:
> > 
> > To clarify once more: this is what I meant, built-in configs would
> > be
> > overridden, user configs wouldn't be. This is different from
> > "defaults", as "defaults" don't override hardware-specific built-
> > ins.
> 
> But what do you call a device config that is the result of merging
> (via
> merge_hwe()) a built-in and a non-built-in config.  Do we really want
> to
> track that some of the values of this merged config need to check the
> protocol section, and some don't? We could remove merging identical
> configs, but that simply makes it harder for users to figure out how
> their device will be configured from the configuration output.

Yes, I figured this might be tricky. My vague idea was to track the
origin with sort of a bit field inside the hwe's. Never mind now.

> I understand your idea. I'd just rather that it worked on all the
> device
> configs, instead of only the built-in ones. I think overriding only
> the
> built-in configs is needlessly complicated, both from a coding and
> from
> an explaining point of view.

I think that users are able to distinguish between built-in defaults
and settings they made explicitly. Being able to differentiate between
these in the "origin" log messages would also have a certain value.

But I said to you not to over-complicate matters, so I suppose I
shouldn't do that, either. If you think just using "overrides" is
sufficient, I'm fine with that.

> > > The biggest reason is that some of the builtin device configs do
> > > things
> > > like set no_path_retry to "queue". 
> > 
> > You don't need to use "overrides" for that:
> > 
> > devices {
> >         device {
> >                 vendor .*
> >                 product .*
> >                 no_path_retry 75
> >         }
> > }
> > You can follow up with more device entries that define exceptions
> > for
> > the general rule above. Am I missing something?
> > 
> > AFAICT the only thing you can do with "overrides" but not with the
> > trick above is override actual hardware-specific user configs, and
> > I
> > have a hard time figuring out why someone would work out detailed
> > device-specific configs just to override them again with a big
> > hammer.
> 
> Fair enough. I added the overrides section before you made paths have
> a
> vector of device configs. Back then, there was no way to have a
> device
> config that would work like your above example.  My original idea was
> to
> be able to have a special device section like this:
> 

Right. Didn't think about that.

> device {
>         all_devs yes
>         no_path_retry 75
> }
> 
> that would get merged with all the device sections. The overrides
> section was the compromise after my original idea was NAKed. We
> probably
> could deprecate the overrides section now that we have a vector of
> device configs. But then we shouldn't go putting the protocol stuff
> there. 

Well I guess as we have had the section for decades, we might as well
just leave it in. Sorry for distracting you with my rant.

Still to be determined whether "protocol" should simply go into
"overrides", or into a separate section (with the precedence semantics
you consider appropriate). I fine with either, so I guess it'll be
"overrides".

Regards
Martin

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel


      reply	other threads:[~2022-04-13 11:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12  1:59 [dm-devel] [PATCH 0/9] Add protocol specific config subsection Benjamin Marzinski
2022-04-12  1:59 ` [dm-devel] [PATCH 1/9] libmultipath: steal the src string pointer in merge_str() Benjamin Marzinski
2022-04-12 10:38   ` Martin Wilck
2022-04-12  1:59 ` [dm-devel] [PATCH 2/9] libmultipath: make protocol_name global Benjamin Marzinski
2022-04-12 10:40   ` Martin Wilck
2022-04-12  1:59 ` [dm-devel] [PATCH 3/9] libmultipath: add a protocol subsection to multipath.conf Benjamin Marzinski
2022-04-12  1:59 ` [dm-devel] [PATCH 4/9] libmultipath: Set the scsi timeout parameters by path Benjamin Marzinski
2022-04-12  1:59 ` [dm-devel] [PATCH 5/9] libmultipath: check the hwentry pctable for path variables Benjamin Marzinski
2022-04-12  1:59 ` [dm-devel] [PATCH 6/9] libmultipath: make snprint_pctable indent a variable amount Benjamin Marzinski
2022-04-12  1:59 ` [dm-devel] [PATCH 7/9] libmultipath: add procotol subsection to overrides Benjamin Marzinski
2022-04-12  1:59 ` [dm-devel] [PATCH 8/9] libmultipath: fix eh_deadline documentation Benjamin Marzinski
2022-04-12  1:59 ` [dm-devel] [PATCH 9/9] libmultipath: Add documentation for the protocol subsection Benjamin Marzinski
2022-04-12 10:31 ` [dm-devel] [PATCH 0/9] Add protocol specific config subsection Martin Wilck
2022-04-12 13:18   ` Martin Wilck
2022-04-12 18:47   ` Benjamin Marzinski
2022-04-12 20:47     ` Martin Wilck
2022-04-12 22:01       ` Benjamin Marzinski
2022-04-13 11:03         ` Martin Wilck [this message]

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=e514db74f56c6ebb71dc18094afbccefd893cb99.camel@suse.com \
    --to=martin.wilck@suse.com \
    --cc=bmarzins@redhat.com \
    --cc=dm-devel@redhat.com \
    /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