1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 11:55:55 +03:00
lvm2/lib/device
Peter Rajnoha c8591b2ac7 dev-io: open device read-only to obtain readahead value
There's no need to have the device open RW while obtaining the readahead value.
The RW open used before caused the CHANGE udev event to be generated if the
WATCH udev rule was set for the underlying device (and that is normally the
case both for non-dm and dm devices by default).

This did not cause any problems before since we were not interested in
*underlying* devices. However, with upcoming changes (autoactivation), we're
watching for events on underlying devices marked as PVs and such a spurious
event could cause the autoactivation code to be triggered. So when trying
to deactivate the volume, we could end up with immediate activation just after
that because of the CHANGE event originated in the WATCH udev rule since the
underlying device was open RW during the deactivation process.

Though maybe a better solution would be to completely filter such spurious
events out of the autoactivation process somehow, it's still useful if there
are as least spurious events generated as possible in the system itself.
2012-06-25 11:55:37 +02:00
..
dev-cache.c Change message severity to log_very_verbose for missing dev info in udev db. 2012-04-11 09:12:02 +00:00
dev-cache.h Better structure layout for device_info 2012-03-12 14:40:41 +00:00
dev-io.c dev-io: open device read-only to obtain readahead value 2012-06-25 11:55:37 +02:00
dev-luks.c Use new dev_open_readonly fn to prevent opening devices for read-write when not necessary. 2011-05-28 09:48:14 +00:00
dev-md.c Fix warning for pvcreate over MD linear. 2011-07-08 15:53:59 +00:00
dev-swap.c Use new dev_open_readonly fn to prevent opening devices for read-write when not necessary. 2011-05-28 09:48:14 +00:00
device.c Add "devices/issue_discards" to lvm.conf. 2011-04-12 21:59:01 +00:00
device.h Add and use dev_open_readonly and variations. 2011-05-24 13:36:57 +00:00