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

Move locking_type reading inside init_locking().

No functional change.
This commit is contained in:
Dave Wysochanski 2009-02-03 16:23:19 +00:00
parent 4631e58782
commit 76cc7b2754
3 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.45 -
===================================
Move locking_type reading inside init_locking().
Rename get_vgs() to get_vgnames() and clarify related error messages.
Allow clvmd to be built with all cluster managers & select one on cmdline.
Mention --with-clvmd=corosync in ./configure.

View File

@ -208,11 +208,16 @@ static void _update_vg_lock_count(uint32_t flags)
/*
* Select a locking type
* type: locking type; if < 0, then read config tree value
*/
int init_locking(int type, struct cmd_context *cmd)
{
init_lockingfailed(0);
if (type < 0)
type = find_config_tree_int(cmd, "global/locking_type", 1);
switch (type) {
case 0:
init_no_locking(&_locking, cmd);

View File

@ -995,8 +995,7 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv)
if (arg_count(cmd, nolocking_ARG))
locking_type = 0;
else
locking_type = find_config_tree_int(cmd,
"global/locking_type", 1);
locking_type = -1;
if (!init_locking(locking_type, cmd)) {
log_error("Locking type %d initialisation failed.",