1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 01:55:10 +03:00
lvm2/udev
Peter Rajnoha 2ac217d408 udev: fire pvscan --cache properly on CHANGE event for MD devices
Commit 756bcabbfe restricted the
situations at which the LVM autoactivation fires - only on ADD
event for devices other than DM. However, this caused a problem
for MD devices...

MD devices are activated in a very similar way as DM devices:
the MD dev is created on first appeareance of MD array member
(ADD event) and stays *inactive* until the array is complete.
Just then the MD dev turns to active state and this is reported
to userspace by CHANGE event.

Unfortunately, we can't differentiate between the CHANGE event
coming from udev trigger/WATCH rule and CHANGE event coming from
the transition to active state - MD would need to add similar logic
we already use to detect this in DM world. For now, we just have
to enable pvscan --cache on *all* CHANGE events for MD so the
autoactivation of the LVM volumes on top of MD works.

A downside of this is that a spurious CHANGE event for MD dev
can cause the LVM volumes on top of it to be automatically activated.
However, one should not open/change the device underneath until
the device above in the stack is removed! So this situation should
only happen if one opens the MD dev for read-write by mistake
(and hence firing the CHANGE event because of the WATCH udev rule),
or if calling udev trigger manually for the MD dev.

(No WHATS_NEW here as this fixes the commit mentioned
above and which has not been released yet.)
2013-05-03 13:55:53 +02:00
..
10-dm.rules.in udev: add a few comments about variables used to recognize events 2013-05-03 11:01:57 +02:00
11-dm-lvm.rules.in udev: udev rules cleanup 2012-06-27 12:11:56 +02:00
12-dm-permissions.rules add copyright lines 2009-10-26 22:42:07 +00:00
13-dm-disk.rules.in Call built-in blkid conditionaly (udev version >= 176), call standard blkid 2012-02-20 19:38:40 +00:00
69-dm-lvm-metad.rules.in udev: fire pvscan --cache properly on CHANGE event for MD devices 2013-05-03 13:55:53 +02:00
95-dm-notify.rules.in udev: udev rules cleanup 2012-06-27 12:11:56 +02:00
Makefile.in udev: udev rules cleanup 2012-06-27 12:11:56 +02:00