mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
Add the 's' activation mode
Just as 'e' means activation with an exclusive lock, add an 's' to mean activation with a shared lock. This allows the existing but implicit behavior of '-ay' of clvm LVs to be specified explicitly. For local VGs, asy simply means ay, just like aey means ay. For local VGs, ay == aey == asy For clvm VGs, ay == asy, aey == aey, asy == asy
This commit is contained in:
parent
1f318dbcee
commit
d5adec1056
@ -953,7 +953,9 @@ exclusive:
|
|||||||
if (!activate_lv_excl(cmd, lv))
|
if (!activate_lv_excl(cmd, lv))
|
||||||
return_0;
|
return_0;
|
||||||
break;
|
break;
|
||||||
default: /* CHANGE_AY */
|
case CHANGE_ASY:
|
||||||
|
case CHANGE_AY:
|
||||||
|
default:
|
||||||
if (needs_exclusive || _lv_is_exclusive(lv))
|
if (needs_exclusive || _lv_is_exclusive(lv))
|
||||||
goto exclusive;
|
goto exclusive;
|
||||||
log_verbose("Activating logical volume \"%s\".", lv->name);
|
log_verbose("Activating logical volume \"%s\".", lv->name);
|
||||||
|
@ -828,7 +828,8 @@ typedef enum activation_change {
|
|||||||
CHANGE_AEY = 2, /* activate exclusively */
|
CHANGE_AEY = 2, /* activate exclusively */
|
||||||
CHANGE_ALY = 3, /* activate locally */
|
CHANGE_ALY = 3, /* activate locally */
|
||||||
CHANGE_ALN = 4, /* deactivate locally */
|
CHANGE_ALN = 4, /* deactivate locally */
|
||||||
CHANGE_AAY = 5 /* automatic activation */
|
CHANGE_AAY = 5, /* automatic activation */
|
||||||
|
CHANGE_ASY = 6 /* activate shared */
|
||||||
} activation_change_t;
|
} activation_change_t;
|
||||||
|
|
||||||
/* Returns true, when change activates device */
|
/* Returns true, when change activates device */
|
||||||
|
@ -286,6 +286,12 @@ int activation_arg(struct cmd_context *cmd __attribute__((unused)), struct arg_v
|
|||||||
av->ui_value = CHANGE_AEY;
|
av->ui_value = CHANGE_AEY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (!strcmp(av->value, "s") || !strcmp(av->value, "sy") ||
|
||||||
|
!strcmp(av->value, "ys")) {
|
||||||
|
av->i_value = CHANGE_ASY;
|
||||||
|
av->ui_value = CHANGE_ASY;
|
||||||
|
}
|
||||||
|
|
||||||
else if (!strcmp(av->value, "y")) {
|
else if (!strcmp(av->value, "y")) {
|
||||||
av->i_value = CHANGE_AY;
|
av->i_value = CHANGE_AY;
|
||||||
av->ui_value = CHANGE_AY;
|
av->ui_value = CHANGE_AY;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user