Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6a8d3d781112acdd…
Commit: 6a8d3d781112acdddf8fbb671bf9b68837f11c63
Parent: a6b159e99c18905370c6cfed316f3fa1b189c7ae
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Mar 19 00:25:51 2014 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Mar 19 00:47:58 2014 +0100
clvmd: avoid resending local sync commands
Instead of sending repeatedly LOCAL_SYNC commands to clvmds
like 'lvs', rememeber the last sent commmand, and if there was no other
clvmd command, drop this redundant SYNC call message.
The problem has started with commit:
56cab8cc037fc4d31085705987b3a4c04d5e5938
This introduced correct synchronisation of name, when user requests to know
open_count (needs to wait for udev), however it is also executed for
read-only cases like 'lvs' command.
For now implement very simple solution, which is only monitoring
outgoing clvmd command, and when sequence of LOCAL sync names are
recognized, they are skipped automatically.
TODO:
Future solution might move this variable info 'cmd_context' and
use 'needs_sync' flag also i.e. in file locking code.
---
WHATS_NEW | 1 +
lib/locking/cluster_locking.c | 10 +++++++++-
2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index bbc2298..08d5b1d 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.106 -
====================================
+ Skip redundant synchronization calls on local clvmd.
Use correct PATH_MAX for locking dir path.
Do not check for backups when when its creation is disabled.
Don't allow --mergedconfig without --type current in dumpconfig. Fix memleak.
diff --git a/lib/locking/cluster_locking.c b/lib/locking/cluster_locking.c
index 7cbb8f1..86e6c77 100644
--- a/lib/locking/cluster_locking.c
+++ b/lib/locking/cluster_locking.c
@@ -301,6 +301,8 @@ static int _cluster_free_request(lvm_response_t * response, int num)
static int _lock_for_cluster(struct cmd_context *cmd, unsigned char clvmd_cmd,
uint32_t flags, const char *name)
{
+ /* TODO: convert to global usable solution and move static into cmd */
+ static unsigned char last_clvmd_cmd = 0;
int status;
int i;
char *args;
@@ -360,8 +362,13 @@ static int _lock_for_cluster(struct cmd_context *cmd, unsigned char clvmd_cmd,
* SYNC_NAMES and VG_BACKUP use the VG name directly without prefix.
*/
if (clvmd_cmd == CLVMD_CMD_SYNC_NAMES) {
- if (flags & LCK_LOCAL)
+ if (flags & LCK_LOCAL) {
node = NODE_LOCAL;
+ if (clvmd_cmd == last_clvmd_cmd) {
+ log_debug("Skipping redundant local sync command.");
+ return 1;
+ }
+ }
} else if (clvmd_cmd != CLVMD_CMD_VG_BACKUP) {
if (strncmp(name, "P_", 2) &&
(clvmd_cmd == CLVMD_CMD_LOCK_VG ||
@@ -372,6 +379,7 @@ static int _lock_for_cluster(struct cmd_context *cmd, unsigned char clvmd_cmd,
node = NODE_REMOTE;
}
+ last_clvmd_cmd = clvmd_cmd;
status = _cluster_request(clvmd_cmd, node, args, len,
&response, &num_responses);
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a6b159e99c189053…
Commit: a6b159e99c18905370c6cfed316f3fa1b189c7ae
Parent: 08018a5345c98b91ce43eb55f4110485df9eb3aa
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Mar 19 00:22:18 2014 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Mar 19 00:46:28 2014 +0100
file_locking: use PATH_MAX for dir name
Using just 128 chars for locking dir may wail if longer
dir entry is used, swich to default linux max path.
---
WHATS_NEW | 1 +
lib/locking/file_locking.c | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index e2c196a..bbc2298 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.106 -
====================================
+ Use correct PATH_MAX for locking dir path.
Do not check for backups when when its creation is disabled.
Don't allow --mergedconfig without --type current in dumpconfig. Fix memleak.
Make global/lvdisplay_shows_full_device_path lvm.conf setting profilable.
diff --git a/lib/locking/file_locking.c b/lib/locking/file_locking.c
index fb84c5b..734e0b4 100644
--- a/lib/locking/file_locking.c
+++ b/lib/locking/file_locking.c
@@ -37,7 +37,7 @@ struct lock_list {
};
static struct dm_list _lock_list;
-static char _lock_dir[NAME_LEN];
+static char _lock_dir[PATH_MAX];
static int _prioritise_write_locks;
static sig_t _oldhandler;
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=08018a5345c98b91…
Commit: 08018a5345c98b91ce43eb55f4110485df9eb3aa
Parent: 25f5e2da8d6b447d26395e610e55192d2d8a16b4
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Mar 19 00:20:39 2014 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Mar 19 00:45:41 2014 +0100
archiver: drop unneeded backup check
When the backup is disabled, avoid testing backup presence.
This only leads to errors being logged in debug trace and the missing
backup can't be fixed, since it's disabled.
---
WHATS_NEW | 1 +
lib/format_text/archiver.c | 5 +++++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index de96f8a..e2c196a 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.106 -
====================================
+ Do not check for backups when when its creation is disabled.
Don't allow --mergedconfig without --type current in dumpconfig. Fix memleak.
Make global/lvdisplay_shows_full_device_path lvm.conf setting profilable.
Make global/{units|si_unit_consistency|suffix} lvm.conf setting profilable.
diff --git a/lib/format_text/archiver.c b/lib/format_text/archiver.c
index 31d17ef..2667bdb 100644
--- a/lib/format_text/archiver.c
+++ b/lib/format_text/archiver.c
@@ -487,6 +487,11 @@ void check_current_backup(struct volume_group *vg)
struct volume_group *vg_backup;
int old_suppress;
+ if (!vg->cmd->backup_params->enabled || !vg->cmd->backup_params->dir) {
+ log_debug("Skipping check for current backup, since backup is disabled.");
+ return;
+ }
+
if (vg_is_exported(vg))
return;
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=25f5e2da8d6b447d…
Commit: 25f5e2da8d6b447d26395e610e55192d2d8a16b4
Parent: aed36c12f8ceb55d3290519215adecc03d54978e
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Mar 18 11:04:21 2014 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Tue Mar 18 11:11:31 2014 +0100
dumpconfig: fix memleak when using --mergedconfig
Check whether lvm dumpconfig --mergedconfig is used only
with --type current (where we're merging current config and
the config supplied on command line). With other types
the config was merged, but it was thrown away since we're
generating other type of config anyway. This lead to a memleak.
Error out if --mergedconfig is used with anything else than
--type current (or without specifying --type in which case
the --type current is used by default).
---
WHATS_NEW | 1 +
tools/dumpconfig.c | 3 +++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index a20331b..de96f8a 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.106 -
====================================
+ Don't allow --mergedconfig without --type current in dumpconfig. Fix memleak.
Make global/lvdisplay_shows_full_device_path lvm.conf setting profilable.
Make global/{units|si_unit_consistency|suffix} lvm.conf setting profilable.
Validate minimal chunk size for snapshot COW volume in lvconvert.
diff --git a/tools/dumpconfig.c b/tools/dumpconfig.c
index dd86733..d9aebd9 100644
--- a/tools/dumpconfig.c
+++ b/tools/dumpconfig.c
@@ -126,6 +126,9 @@ int dumpconfig(struct cmd_context *cmd, int argc, char **argv)
"no effect with --type current");
return EINVALID_CMD_LINE;
}
+ } else if (arg_count(cmd, mergedconfig_ARG)) {
+ log_error("--mergedconfig has no effect without --type current");
+ return EINVALID_CMD_LINE;
}
if (!_get_vsn(cmd, &tree_spec.version))