mirror of
git://sourceware.org/git/lvm2.git
synced 2025-02-20 01:59:11 +03:00
DISK_RO is set in the environment of a block-device uevent if and only if the read-only (ro) attribute of the device just changed (the kernel function set_disk_ro() was called). It is not synoymous with the "ro" sysfs attribute; the device could very well be write-protected if DISK_RO is not set. Device mapper-level probing is possible for DISK_RO events, but it makes little sense, because the device propreties haven't changed as far as dm is concerned. But we should import possible previously set device properties to avoid confusing follow-up rules. We should do this for both DISK_RO=1 and DISK_RO=0 events. Signed-off-by: Martin Wilck <mwilck@suse.com> Reviewed-by: Peter Rajnoha <prajnoha@redhat.com>