1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

locking: activate_lv_excl return correct error code

Correct return code of activate_lv_excl().

Function is not supposed to return activation state of
activated volume, but return code of the operation.
Since i.e. when activation filter is allowing to activate
volume on current system, it is still success even though
no volume is activated.
This commit is contained in:
Zdenek Kabelac 2013-11-01 10:26:43 +01:00
parent de7531d384
commit 1bde9f68ce
2 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.104 -
===================================
Return proper error state for remote exclusive activation.
Fix missing lvmetad scan for PVs found on MD partitions.
Respect DM_UDEV_DISABLE_OTHER_RULES_FLAG in lvmetad udev rules.
Fix clvmd message verification to not reject REMOTE flag. (2.02.100)

View File

@ -559,10 +559,10 @@ int activate_lv_excl(struct cmd_context *cmd, struct logical_volume *lv)
return 1;
/* FIXME Deal with error return codes. */
if (activate_lv_excl_remote(cmd, lv))
stack;
if (!activate_lv_excl_remote(cmd, lv))
return_0;
return lv_is_active_exclusive(lv);
return 1;
}
/* Lock a list of LVs */