mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
Activation lock has a primary purpose to serialize locking of individual LV in case there is no other protecting mechanism for parallel execution. However in the case an activated LV is composed from several other LVs, noone should be able to manipulate with those LVs as well. This patch add a very 'naive' global VG activation locking in this case. In the future we may introduce smarter function detecting minimal closed graph components if this will appear as bottleneck Patch checks if the VG Write lock is held - in this case we do not need any more locking - command has exclusive access to VG. In case we have clustered VG and we are activating an LV which does not need other LVs - we also do not need any more locks. In all other cases take respective lock - for single LV - use lvid, for complex LVs use vgname.