mirror of
git://sourceware.org/git/lvm2.git
synced 2025-04-01 18:50:41 +03:00
activation: guard exclusive activation
Add protectional internall error whenever we spot activation of 'exclusive' only segments in 'non-exclusive' mode. TODO: possibly the activation locking could be enhanced to handle this fully behind the scene - as for now this works purely for lvchange/vgchange activation.
This commit is contained in:
parent
f41935909f
commit
a8bcdef4fd
@ -1,5 +1,6 @@
|
||||
Version 2.02.178 -
|
||||
=====================================
|
||||
Avoid non-exclusive activation of exclusive segment types.
|
||||
Fix trimming sibling PVs when doing a pvmove of raid subLVs.
|
||||
Preserve exclusive activation during thin snaphost merge.
|
||||
Suppress some repeated reads of the same disk data at the device layer.
|
||||
|
@ -2568,6 +2568,16 @@ static int _lv_activate(struct cmd_context *cmd, const char *lvid_s,
|
||||
struct lvinfo info;
|
||||
int r = 0;
|
||||
|
||||
if (!laopts->exclusive &&
|
||||
(lv_is_origin(lv) ||
|
||||
lv_is_pvmove(lv) ||
|
||||
seg_only_exclusive(first_seg(lv)))) {
|
||||
log_error(INTERNAL_ERROR "Trying non-exlusive activation of %s with "
|
||||
"a volume type %s requiring exclusive activation.",
|
||||
display_lvname(lv), lvseg_name(first_seg(lv)));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!activation())
|
||||
return 1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user