From 04dabc156220e1f6d53847adfbd4378844d9f616 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Sat, 14 Oct 2006 16:37:54 +0000 Subject: [PATCH] Fall back to internal locking if external locking lib is missing or fails. --- WHATS_NEW | 1 + lib/locking/locking.c | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 8600d6aba..bbd774f0c 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.12 - =================================== + Fall back to internal locking if external locking lib is missing or fails. Retain activation state after changing LV minor number with --force. Propagate clustered flag in vgsplit and require resizeable flag. diff --git a/lib/locking/locking.c b/lib/locking/locking.c index 25065d4d0..11982d58a 100644 --- a/lib/locking/locking.c +++ b/lib/locking/locking.c @@ -144,18 +144,18 @@ int init_locking(int type, struct cmd_context *cmd) case 2: if (!cmd->is_static) { log_very_verbose("External locking selected."); - if (!init_external_locking(&_locking, cmd)) - break; - return 1; + if (init_external_locking(&_locking, cmd)) + return 1; } if (!find_config_tree_int(cmd, "locking/fallback_to_clustered_locking", DEFAULT_FALLBACK_TO_CLUSTERED_LOCKING)) break; - log_very_verbose("Falling back to clustered locking."); - /* Fall through */ #endif #ifdef CLUSTER_LOCKING_INTERNAL + log_very_verbose("Falling back to internal clustered locking."); + /* Fall through */ + case 3: log_very_verbose("Cluster locking selected."); if (!init_cluster_locking(&_locking, cmd))