From: Martin Wilck <mwilck@suse.com>
To: Peter Rajnoha <prajnoha@redhat.com>,
Zdenek Kabelac <zkabelac@redhat.com>,
Benjamin Marzinski <bmarzins@redhat.com>,
David Teigland <teigland@redhat.com>
Cc: linux-lvm@lists.linux.dev, dm-devel@lists.linux.dev,
Hannes Reinecke <hare@suse.de>
Subject: Re: [RFC PATCH 5/7] dm udev rules: don't export and save DM_SUSPENDED
Date: Tue, 05 Mar 2024 10:28:58 +0100 [thread overview]
Message-ID: <1391ea0d528c0ab224b7f0b1f5c18e13c67af5c1.camel@suse.com> (raw)
In-Reply-To: <5b9fb513-3510-4bae-b0f3-f7d558d4ed58@redhat.com>
On Tue, 2024-03-05 at 10:10 +0100, Peter Rajnoha wrote:
> On 3/5/24 09:47, Martin Wilck wrote:
> > On Tue, 2024-03-05 at 09:19 +0100, Peter Rajnoha wrote:
> > > Within DM and DM-subsystem rules, it's OK to use DM_SUSPENDED, if
> > > needed.
> >
> > I gather that you agree that 11-dm-mpath.rules represents a "DM
> > subsystem" rule set?
> >
>
> Sure, of course.
>
> > >
> > > We should just hide it from all the "other" rules so they don't
> > > need
> > > to
> > > bother. For them (right now), it's either "usable" or "unusable"
> > > device
> > > for whatever reason behind and we (DM+DM-subystem) should
> > > reimport
> > > whatever is needed for the state/set of variables that others may
> > > use,
> > > to stay sane. Of course, we can do this only for the state that
> > > we
> > > own.
> > >
> > > As we discussed before, this can be extended to making a
> > > difference
> > > among "usable", "temporarily unusable" (so reimport the
> > > state/variables
> > > needed) and "completely unusable" state for others.
> >
> > Yeah, but that's future work, and I doubt that it makes sense to
> > invest
> > much effort into it. I definitely wouldn't want to tie this to the
> > current patch set.
> >
>
> I agree.
>
> > As mentioned previously, it might make sense to introduce a flag
> > that
> > expresses something like "you can access this device, but you don't
> > need to" (DISK_RO={0,1} case, for example). But then, we already
> > have
> > DM_ACTIVATION to express the opposite ("you must have a look at
> > this
> > device, its properties have changed"). I wonder if you consider
> > DM_ACTIVATION a dm-internal property?
>
> Well, we added DM_ACTIVATION as a helper primarily for DM and DM-
> subsys
> rules to have a way to identify when the actual (re)activation
> happens,
> or the "add" trigger on coldplug.
>
> I think it was 69-dm-lvm.rules (or 69-dm-lvm-metad.rules at that
> time)
> where we needed to run pvscan only right after the DM dev is
> activated
> and hence avoiding running costly pvscan uselessly where it doesn't
> matter.
>
> If there's anyone else out there with similar use case, I think that
> checking DM_ACTIVATION might be useful. But it's true it is not
> advertised and shouted out somehow publicly yet.
>
> Usually, all the other rules are interested in rescanning all the
> other
> "foreign" state and attributes that is out of DM's hands, which means
> they know exactly when to do the scan or not or any other actions, it
> depends on what attributes are they watching for.
>
> DM_ACTIVATION is very useful to know when stacking devices on top of
> DM
> though, so a time when to activate the layer above. So yes, this
> variable might be useful for other to look for too.
Thanks. I agree, but it's future work and it would mostly be a thing
for authors of stacked subsystems to look into.
I think are on the same page except perhaps for the DISK_RO part of the
set. I will give that some more thought, and submit a non-RFC patch
set.
Regards
Martin
next prev parent reply other threads:[~2024-03-05 9:29 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-01 22:40 [RFC PATCH 0/7] device mapper udev rules rework Martin Wilck
2024-03-01 22:40 ` [RFC PATCH 1/7] 13-dm-disk.rules: import ID_FS_TYPE Martin Wilck
2024-03-04 10:37 ` Peter Rajnoha
2024-03-04 15:17 ` Martin Wilck
2024-03-04 15:44 ` Peter Rajnoha
2024-03-01 22:40 ` [RFC PATCH 2/7] 10-dm.rules: don't deactivate devices for DISK_RO=1 Martin Wilck
2024-03-04 10:48 ` Peter Rajnoha
2024-03-04 11:19 ` Peter Rajnoha
2024-03-04 11:27 ` Peter Rajnoha
2024-03-04 15:21 ` Martin Wilck
2024-03-04 16:09 ` Martin Wilck
2024-03-05 8:09 ` Peter Rajnoha
2024-03-01 22:40 ` [RFC PATCH 3/7] 10-dm-rules: don't restore DM_UDEV_DISABLE_OTHER_RULES_FLAG from db Martin Wilck
2024-03-04 10:49 ` Peter Rajnoha
2024-03-01 22:40 ` [RFC PATCH 4/7] 11-dm-lvm.rules: " Martin Wilck
2024-03-04 10:51 ` Peter Rajnoha
2024-03-01 22:40 ` [RFC PATCH 5/7] dm udev rules: don't export and save DM_SUSPENDED Martin Wilck
2024-03-04 11:00 ` Peter Rajnoha
2024-03-04 16:21 ` Martin Wilck
2024-03-05 8:19 ` Peter Rajnoha
2024-03-05 8:47 ` Martin Wilck
2024-03-05 9:10 ` Peter Rajnoha
2024-03-05 9:28 ` Martin Wilck [this message]
2024-03-01 22:40 ` [RFC PATCH 6/7] dm udev rules: don't export and save DM_NOSCAN Martin Wilck
2024-03-04 11:03 ` Peter Rajnoha
2024-03-01 22:40 ` [RFC PATCH 7/7] 10-dm.rules: bump DM_UDEV_RULES_VSN to 3 Martin Wilck
2024-03-04 11:09 ` Peter Rajnoha
2024-03-04 16:46 ` Martin Wilck
2024-03-05 8:26 ` Peter Rajnoha
2024-03-05 9:04 ` Martin Wilck
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=1391ea0d528c0ab224b7f0b1f5c18e13c67af5c1.camel@suse.com \
--to=mwilck@suse.com \
--cc=bmarzins@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=hare@suse.de \
--cc=linux-lvm@lists.linux.dev \
--cc=prajnoha@redhat.com \
--cc=teigland@redhat.com \
--cc=zkabelac@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).