]> sourceware.org Git - lvm2.git/commit
activation: synchronize before removing devices
authorZdenek Kabelac <zkabelac@redhat.com>
Wed, 6 Feb 2019 11:37:47 +0000 (12:37 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Wed, 20 Mar 2019 13:39:09 +0000 (14:39 +0100)
commit4411fe2ba855b9c42b5d1393fc08faf01b1d2636
tree68c3ae7b60f1eea0905f4b0bb9c97e6894ce682b
parent677aa84be3b41e94514aa5c1560e987e7763b294
activation: synchronize before removing devices

Udev is running udev-rule action upon 'resume'.

However lvm2 in special case is doing replacement of
'soon-to-be-removed' device with 'error' target for resuming
and then follows actual removal - the sequence is usually quick,
so when udev start action - it can result in 'strange' error
message in kernel log like:

Process '/usr/sbin/dmsetup info -j 253 -m 17 -c --nameprefixes --noheadings --rows -o name,uuid,suspended' failed with exit code 1.

To avoid this - we need to ensure there is synchronization wait for udev
between 'resume'  and 'remove' part of this process.

However existing code put strict requirement to avoid synchronizing with
udev inside critical section - but this originally came from requirement
to not do anything special while there could be devices in
suspend-state. Now we are able to see differnce between critical section
with or without suspended devices.  For udev synchronization only
suspended devices are prohibited to be there - so slightly relax
condition and allow calling and using 'fs_sync()' even inside critical
section - but there must not be any suspended device.
WHATS_NEW
lib/activate/dev_manager.c
lib/activate/fs.c
This page took 0.033099 seconds and 5 git commands to generate.