[linux-lvm] Discussion: performance issue on event activation mode
Martin Wilck
martin.wilck at suse.com
Mon Oct 18 06:24:49 UTC 2021
On Thu, 2021-09-30 at 10:55 -0500, David Teigland wrote:
> On Wed, Sep 29, 2021 at 11:39:52PM +0200, Peter Rajnoha wrote:
>
> >
> > - For event-based activation, we need to be sure that we use
> > "RUN"
> > rule, not any of "IMPORT{program}" or "PROGRAM" rule. The
> > difference
> > is that the "RUN" rules are applied after all the other udev
> > rules are
> > already applied for current uevent, including creation of
> > symlinks. And
> > currently, we have IMPORT{program}="pvscan..." in our rule,
> > unfortunately...
>
> That's pretty subtle, I'm wary about propagating such specific and
> delicate behavior, seems fragile.
I'd like to second Peter here, "RUN" is in general less fragile than
"IMPORT{PROGRAM}". You should use IMPORT{PROGRAM}" if and only if
- the invoked program can work with incomplete udev state of a device
(the progrem should not try to access the device via
libudev, it should rather get properties either from sysfs or the
uevent's environment variables)
- you need the result or the output of the program in order to proceed
with rules processing.
Regards,
Martin
More information about the linux-lvm
mailing list