master - coverity: previous commit - not "break" but "fall through"
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=e8dbaf62d3b3e2...
Commit: e8dbaf62d3b3e2a175d3b0237a4d85c009d98038
Parent: 705fee709fdb2f3f23a5a466d30cf36dab0a9c96
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Jul 8 14:42:26 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jul 8 14:42:31 2015 +0200
coverity: previous commit - not "break" but "fall through"
---
lib/lvmpolld/lvmpolld-client.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/lvmpolld/lvmpolld-client.c b/lib/lvmpolld/lvmpolld-client.c
index 6676ce9..8be2d7b 100644
--- a/lib/lvmpolld/lvmpolld-client.c
+++ b/lib/lvmpolld/lvmpolld-client.c
@@ -106,7 +106,7 @@ static void _explain_error_codes(int retcode)
/* lvmpolld specific return codes */
case LVMPD_RET_DUP_FAILED:
log_error("lvmpolld failed to duplicate file descriptors.");
- break;
+ /* fall through */
case LVMPD_RET_EXC_FAILED:
log_error("lvmpolld failed to exec() lvm binary.");
break;
8 years, 10 months
master - coverity: missing break in switch expression
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=705fee709fdb2f...
Commit: 705fee709fdb2f3f23a5a466d30cf36dab0a9c96
Parent: 71f4fbfbde720795995abffa1bd8aeaa00706a6b
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Jul 8 14:36:02 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jul 8 14:36:02 2015 +0200
coverity: missing break in switch expression
lib/lvmpolld/lvmpolld-client.c:109: fallthrough: The above case falls through to this one
---
lib/lvmpolld/lvmpolld-client.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/lvmpolld/lvmpolld-client.c b/lib/lvmpolld/lvmpolld-client.c
index d770e74..6676ce9 100644
--- a/lib/lvmpolld/lvmpolld-client.c
+++ b/lib/lvmpolld/lvmpolld-client.c
@@ -106,6 +106,7 @@ static void _explain_error_codes(int retcode)
/* lvmpolld specific return codes */
case LVMPD_RET_DUP_FAILED:
log_error("lvmpolld failed to duplicate file descriptors.");
+ break;
case LVMPD_RET_EXC_FAILED:
log_error("lvmpolld failed to exec() lvm binary.");
break;
8 years, 10 months
master - coverity: fix uninitialized values and other reported problems
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=71f4fbfbde7207...
Commit: 71f4fbfbde720795995abffa1bd8aeaa00706a6b
Parent: 16e9b32c2f1a2d7e0f05a88981824ef0e7607965
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Jul 8 14:19:51 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jul 8 14:19:51 2015 +0200
coverity: fix uninitialized values and other reported problems
daemons/lvmlockd/lvmlockd-core.c:5709: error[uninitStructMember]: Uninitialized struct member: ds.....
daemons/lvmlockd/lvmlockd-core.c:799: error[uninitstring]: Dangerous usage of 'version' (strncpy doesn't always null-terminate it)
daemons/lvmlockd/lvmlockd-core.c:646: error[memleakOnRealloc]: Common realloc mistake: 'pollfd' nulled but not freed upon failure
---
daemons/lvmlockd/lvmlockd-core.c | 28 +++++++++++++++-------------
1 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/daemons/lvmlockd/lvmlockd-core.c b/daemons/lvmlockd/lvmlockd-core.c
index 9f3efac..b247bb5 100644
--- a/daemons/lvmlockd/lvmlockd-core.c
+++ b/daemons/lvmlockd/lvmlockd-core.c
@@ -624,6 +624,7 @@ fail:
static int add_pollfd(int fd)
{
int i, new_size;
+ struct pollfd *tmp_pollfd;
pthread_mutex_lock(&pollfd_mutex);
for (i = 0; i < pollfd_size; i++) {
@@ -643,11 +644,12 @@ static int add_pollfd(int fd)
new_size = pollfd_size + ADD_POLL_SIZE;
- pollfd = realloc(pollfd, new_size * sizeof(struct pollfd));
- if (!pollfd) {
+ tmp_pollfd = realloc(pollfd, new_size * sizeof(struct pollfd));
+ if (!tmp_pollfd) {
log_error("can't alloc new size %d for pollfd", new_size);
return -ENOMEM;
}
+ pollfd = tmp_pollfd;
for (i = pollfd_size; i < new_size; i++) {
pollfd[i].fd = POLL_FD_UNUSED;
@@ -790,7 +792,7 @@ int last_string_from_args(char *args_in, char *last)
int version_from_args(char *args, unsigned int *major, unsigned int *minor, unsigned int *patch)
{
- char version[MAX_ARGS];
+ char version[MAX_ARGS+1];
char *major_str, *minor_str, *patch_str;
char *n, *d1, *d2;
@@ -5606,16 +5608,16 @@ static void usage(char *prog, FILE *file)
int main(int argc, char *argv[])
{
- daemon_state ds;
-
- ds.daemon_main = main_loop;
- ds.daemon_init = NULL;
- ds.daemon_fini = NULL;
- ds.pidfile = getenv("LVM_LVMLOCKD_PIDFILE");
- ds.socket_path = getenv("LVM_LVMLOCKD_SOCKET");
- ds.protocol = lvmlockd_protocol;
- ds.protocol_version = lvmlockd_protocol_version;
- ds.name = "lvmlockd";
+ daemon_state ds = {
+ .daemon_main = main_loop,
+ .daemon_init = NULL,
+ .daemon_fini = NULL,
+ .pidfile = getenv("LVM_LVMLOCKD_PIDFILE"),
+ .socket_path = getenv("LVM_LVMLOCKD_SOCKET"),
+ .protocol = lvmlockd_protocol,
+ .protocol_version = lvmlockd_protocol_version,
+ .name = "lvmlockd",
+ };
static struct option long_options[] = {
{"help", no_argument, 0, 'h' },
8 years, 10 months
master - coverity: fix resource leaks
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=16e9b32c2f1a2d...
Commit: 16e9b32c2f1a2d7e0f05a88981824ef0e7607965
Parent: 3b6840e0997dd4df0ea711c2036871e3cc2fe40a
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Jul 8 13:56:06 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jul 8 13:56:06 2015 +0200
coverity: fix resource leaks
lib/log/log.c:115: leaked_storage: Variable "st" going out of scope leaks the storage it points to
daemons/lvmpolld/lvmpolld-core.c:573: leaked_storage: Variable "cmdargv" going out of scope leaks the storage it points to
daemons/lvmlockd/lvmlockd-core.c:5341: leaked_handle: Handle variable "fd" going out of scope leaks the handle
daemons/lvmlockd/lvmlockctl.c:575: overwrite_var: Overwriting "able_vg_name" in "able_vg_name = strdup(optarg)" leaks the storage that "able_vg_name" points to
daemons/lvmlockd/lvmlockctl.c:571: overwrite_var: Overwriting "able_vg_name" in "able_vg_name = strdup(optarg)" leaks the storage that "able_vg_name" points to
daemons/lvmlockd/lvmlockctl.c:385: leaked_handle: Handle variable "s" going out of scope leaks the handle
---
daemons/lvmlockd/lvmlockctl.c | 23 +++++++++++++----------
daemons/lvmlockd/lvmlockd-core.c | 5 ++++-
lib/log/log.c | 6 +++---
3 files changed, 20 insertions(+), 14 deletions(-)
diff --git a/daemons/lvmlockd/lvmlockctl.c b/daemons/lvmlockd/lvmlockctl.c
index 5a4f3f5..51b5734 100644
--- a/daemons/lvmlockd/lvmlockctl.c
+++ b/daemons/lvmlockd/lvmlockctl.c
@@ -21,15 +21,15 @@
#include <sys/socket.h>
#include <sys/un.h>
-static int quit;
-static int info;
-static int dump;
-static int wait_opt;
-static int force_opt;
-static int gl_enable;
-static int gl_disable;
-static int stop_lockspaces;
-static char *able_vg_name;
+static int quit = 0;
+static int info = 0;
+static int dump = 0;
+static int wait_opt = 0;
+static int force_opt = 0;
+static int gl_enable = 0;
+static int gl_disable = 0;
+static int stop_lockspaces = 0;
+static char *able_vg_name = NULL;
#define DUMP_SOCKET_NAME "lvmlockd-dump.sock"
#define DUMP_BUF_SIZE (1024 * 1024)
@@ -381,8 +381,11 @@ static int setup_dump_socket(void)
dump_addrlen = sizeof(sa_family_t) + strlen(dump_addr.sun_path+1) + 1;
rv = bind(s, (struct sockaddr *) &dump_addr, dump_addrlen);
- if (rv < 0)
+ if (rv < 0) {
+ if (!close(s))
+ log_error("failed to close dump socket");
return rv;
+ }
return s;
}
diff --git a/daemons/lvmlockd/lvmlockd-core.c b/daemons/lvmlockd/lvmlockd-core.c
index 649c9aa..9f3efac 100644
--- a/daemons/lvmlockd/lvmlockd-core.c
+++ b/daemons/lvmlockd/lvmlockd-core.c
@@ -5337,8 +5337,11 @@ static void process_listener(int poll_fd)
if (fd < 0)
return;
- if (!(cl = alloc_client()))
+ if (!(cl = alloc_client())) {
+ if (!close(fd))
+ log_error("failed to close lockd poll fd");
return;
+ }
pi = add_pollfd(fd);
if (pi < 0) {
diff --git a/lib/log/log.c b/lib/log/log.c
index 20ca293..e3570d4 100644
--- a/lib/log/log.c
+++ b/lib/log/log.c
@@ -92,9 +92,6 @@ void init_log_file(const char *log_file, int append)
"%llu", &pid, &starttime) != 2) {
log_warn("WARNING: Cannot parse content of %s.", statfile);
} else {
- if (fclose(st))
- log_sys_debug("fclose", statfile);
-
if (dm_snprintf(_log_file_path, sizeof(_log_file_path),
"%s_%s_%d_%lld", log_file, env, pid, starttime) < 0) {
log_warn("WARNING: Debug log file path is too long for epoch.");
@@ -105,6 +102,9 @@ void init_log_file(const char *log_file, int append)
}
}
}
+
+ if (st && fclose(st))
+ log_sys_debug("fclose", statfile);
no_epoch:
if (!(_log_file = fopen(log_file, append ? "a" : "w"))) {
log_sys_error("fopen", log_file);
8 years, 10 months
master - config: replace find_config_tree_node with find_config_tree_array where appropriate
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3b6840e0997dd4...
Commit: 3b6840e0997dd4df0ea711c2036871e3cc2fe40a
Parent: 67a61cce1b26e91eb765a682f66be67bd997f09f
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Jul 8 11:22:24 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jul 8 13:03:08 2015 +0200
config: replace find_config_tree_node with find_config_tree_array where appropriate
---
lib/activate/activate.c | 6 +++---
lib/activate/dev_manager.c | 28 +++++++++-------------------
lib/commands/toolcontext.c | 30 ++++++++++++------------------
lib/config/config.c | 6 +++---
lib/config/config.h | 2 +-
lib/config/defaults.h | 5 -----
lib/device/dev-cache.c | 2 +-
lib/format_text/format-text.c | 2 +-
lib/metadata/lv_manip.c | 2 +-
lib/metadata/metadata.c | 2 +-
lib/misc/lvm-globals.c | 2 +-
lib/thin/thin.c | 2 +-
tools/lvconvert.c | 24 +++++++++---------------
tools/vgchange.c | 2 +-
14 files changed, 44 insertions(+), 71 deletions(-)
diff --git a/lib/activate/activate.c b/lib/activate/activate.c
index 2e58c3b..7d2adf1 100644
--- a/lib/activate/activate.c
+++ b/lib/activate/activate.c
@@ -180,7 +180,7 @@ int lv_passes_auto_activation_filter(struct cmd_context *cmd, struct logical_vol
{
const struct dm_config_node *cn;
- if (!(cn = find_config_tree_node(cmd, activation_auto_activation_volume_list_CFG, NULL))) {
+ if (!(cn = find_config_tree_array(cmd, activation_auto_activation_volume_list_CFG, NULL))) {
log_verbose("activation/auto_activation_volume_list configuration setting "
"not defined: All logical volumes will be auto-activated.");
return 1;
@@ -467,7 +467,7 @@ static int _passes_activation_filter(struct cmd_context *cmd,
{
const struct dm_config_node *cn;
- if (!(cn = find_config_tree_node(cmd, activation_volume_list_CFG, NULL))) {
+ if (!(cn = find_config_tree_array(cmd, activation_volume_list_CFG, NULL))) {
log_verbose("activation/volume_list configuration setting "
"not defined: Checking only host tags for %s/%s",
lv->vg->name, lv->name);
@@ -496,7 +496,7 @@ static int _passes_readonly_filter(struct cmd_context *cmd,
{
const struct dm_config_node *cn;
- if (!(cn = find_config_tree_node(cmd, activation_read_only_volume_list_CFG, NULL)))
+ if (!(cn = find_config_tree_array(cmd, activation_read_only_volume_list_CFG, NULL)))
return 0;
return _lv_passes_volumes_filter(cmd, lv, cn, activation_read_only_volume_list_CFG);
diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c
index 6a4da3c..0e29bcd 100644
--- a/lib/activate/dev_manager.c
+++ b/lib/activate/dev_manager.c
@@ -1918,7 +1918,6 @@ struct pool_cb_data {
int skip_zero; /* to skip zeroed device header (check first 64B) */
int exec; /* which binary to call */
int opts;
- const char *defaults;
const char *global;
};
@@ -1926,7 +1925,6 @@ static int _pool_callback(struct dm_tree_node *node,
dm_node_callback_t type, void *cb_data)
{
int ret, status, fd;
- char *split;
const struct dm_config_node *cn;
const struct dm_config_value *cv;
const struct pool_cb_data *data = cb_data;
@@ -1941,23 +1939,17 @@ static int _pool_callback(struct dm_tree_node *node,
if (!*argv[0])
return 1; /* Checking disabled */
- if ((cn = find_config_tree_node(mlv->vg->cmd, data->opts, NULL))) {
- for (cv = cn->v; cv && args < 16; cv = cv->next) {
- if (cv->type != DM_CFG_STRING) {
- log_error("Invalid string in config file: "
- "global/%s_check_options",
- data->global);
- return 0;
- }
- argv[++args] = cv->v.str;
- }
- } else {
- /* Use default options (no support for options with spaces) */
- if (!(split = dm_pool_strdup(data->dm->mem, data->defaults))) {
- log_error("Failed to duplicate defaults.");
+ if (!(cn = find_config_tree_array(mlv->vg->cmd, data->opts, NULL)))
+ return_0;
+
+ for (cv = cn->v; cv && args < 16; cv = cv->next) {
+ if (cv->type != DM_CFG_STRING) {
+ log_error("Invalid string in config file: "
+ "global/%s_check_options",
+ data->global);
return 0;
}
- args = dm_split_words(split, 16, 0, (char**) argv + 1);
+ argv[++args] = cv->v.str;
}
if (args == 16) {
@@ -2048,14 +2040,12 @@ static int _pool_register_callback(struct dev_manager *dm,
data->skip_zero = 1;
data->exec = global_thin_check_executable_CFG;
data->opts = global_thin_check_options_CFG;
- data->defaults = DEFAULT_THIN_CHECK_OPTION1 " " DEFAULT_THIN_CHECK_OPTION2;
data->global = "thin";
} else if (lv_is_cache(lv)) { /* cache pool */
data->pool_lv = first_seg(lv)->pool_lv;
data->skip_zero = dm->activation;
data->exec = global_cache_check_executable_CFG;
data->opts = global_cache_check_options_CFG;
- data->defaults = DEFAULT_CACHE_CHECK_OPTION1 " " DEFAULT_CACHE_CHECK_OPTION2;
data->global = "cache";
} else {
log_error(INTERNAL_ERROR "Registering unsupported pool callback.");
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
index 00db078..002627b 100644
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
@@ -245,8 +245,8 @@ static int _parse_debug_classes(struct cmd_context *cmd)
const struct dm_config_value *cv;
int debug_classes = 0;
- if (!(cn = find_config_tree_node(cmd, log_debug_classes_CFG, NULL)))
- return DEFAULT_LOGGED_DEBUG_CLASSES;
+ if (!(cn = find_config_tree_array(cmd, log_debug_classes_CFG, NULL)))
+ return -1;
for (cv = cn->v; cv; cv = cv->next) {
if (cv->type != DM_CFG_STRING) {
@@ -652,7 +652,7 @@ static int _process_config(struct cmd_context *cmd)
}
}
- if ((cn = find_config_tree_node(cmd, activation_mlock_filter_CFG, NULL)))
+ if ((cn = find_config_tree_array(cmd, activation_mlock_filter_CFG, NULL)))
for (cv = cn->v; cv; cv = cv->next)
if ((cv->type != DM_CFG_STRING) || !cv->v.str[0])
log_error("Ignoring invalid activation/mlock_filter entry in config file");
@@ -1016,14 +1016,10 @@ static int _init_dev_cache(struct cmd_context *cmd)
init_obtain_device_list_from_udev(device_list_from_udev);
if (!(cn = find_config_tree_node(cmd, devices_scan_CFG, NULL))) {
- if (!dev_cache_add_dir("/dev")) {
- log_error("Failed to add /dev to internal "
- "device cache");
- return 0;
- }
- log_verbose("device/scan not in config file: "
- "Defaulting to /dev");
- return 1;
+ log_verbose("device/scan not in config file, "
+ "using defaults.");
+ if (!(cn = find_config_tree_array(cmd, devices_scan_CFG, NULL)))
+ return_0;
}
for (cv = cn->v; cv; cv = cv->next) {
@@ -1061,7 +1057,7 @@ static int _init_dev_cache(struct cmd_context *cmd)
}
}
- if (!(cn = find_config_tree_node(cmd, devices_loopfiles_CFG, NULL)))
+ if (!(cn = find_config_tree_array(cmd, devices_loopfiles_CFG, NULL)))
return 1;
for (cv = cn->v; cv; cv = cv->next) {
@@ -1235,8 +1231,6 @@ static int _init_filters(struct cmd_context *cmd, unsigned load_persistent_cache
cmd->lvmetad_filter = NULL;
}
- cn = find_config_tree_array(cmd, devices_filter_CFG, NULL);
-
/* filter component 1 */
if ((cn = find_config_tree_node(cmd, devices_filter_CFG, NULL))) {
if (!(filter_components[1] = regex_filter_create(cn->v)))
@@ -1355,7 +1349,7 @@ static int _init_formats(struct cmd_context *cmd)
#ifdef HAVE_LIBDL
/* Load any formats in shared libs if not static */
if (!is_static() &&
- (cn = find_config_tree_node(cmd, global_format_libraries_CFG, NULL))) {
+ (cn = find_config_tree_array(cmd, global_format_libraries_CFG, NULL))) {
const struct dm_config_value *cv;
struct format_type *(*init_format_fn) (struct cmd_context *);
@@ -1521,7 +1515,7 @@ static int _init_segtypes(struct cmd_context *cmd)
#ifdef HAVE_LIBDL
/* Load any formats in shared libs unless static */
if (!is_static() &&
- (cn = find_config_tree_node(cmd, global_segment_libraries_CFG, NULL))) {
+ (cn = find_config_tree_array(cmd, global_segment_libraries_CFG, NULL))) {
const struct dm_config_value *cv;
int (*init_multiple_segtypes_fn) (struct cmd_context *,
@@ -1827,7 +1821,7 @@ struct cmd_context *create_toolcontext(unsigned is_long_lived,
goto_out;
if (!(cmd->dev_types = create_dev_types(cmd->proc_dir,
- find_config_tree_node(cmd, devices_types_CFG, NULL))))
+ find_config_tree_array(cmd, devices_types_CFG, NULL))))
goto_out;
if (!_init_dev_cache(cmd))
@@ -2042,7 +2036,7 @@ int refresh_toolcontext(struct cmd_context *cmd)
return_0;
if (!(cmd->dev_types = create_dev_types(cmd->proc_dir,
- find_config_tree_node(cmd, devices_types_CFG, NULL))))
+ find_config_tree_array(cmd, devices_types_CFG, NULL))))
return_0;
if (!_init_dev_cache(cmd))
diff --git a/lib/config/config.c b/lib/config/config.c
index 9458107..6aaeef1 100644
--- a/lib/config/config.c
+++ b/lib/config/config.c
@@ -1386,12 +1386,12 @@ static struct dm_config_node *_get_array_def_node(struct cmd_context *cmd,
return cn;
}
-struct dm_config_node *find_config_tree_array(struct cmd_context *cmd, int id, struct profile *profile)
+const struct dm_config_node *find_config_tree_array(struct cmd_context *cmd, int id, struct profile *profile)
{
cfg_def_item_t *item = cfg_def_get_item_p(id);
char path[CFG_PATH_MAX_LEN];
int profile_applied;
- struct dm_config_node *cn;
+ const struct dm_config_node *cn;
profile_applied = _apply_local_profile(cmd, profile);
_cfg_def_make_path(path, sizeof(path), item->id, item, 0);
@@ -1400,7 +1400,7 @@ struct dm_config_node *find_config_tree_array(struct cmd_context *cmd, int id, s
log_error(INTERNAL_ERROR "%s cfg tree element not declared as array.", path);
if (_config_disabled(cmd, item, path) ||
- !(cn = dm_config_find_node(cmd->cft->root, path)))
+ !(cn = find_config_tree_node(cmd, id, profile)))
cn = _get_array_def_node(cmd, item, profile);
if (profile_applied)
diff --git a/lib/config/config.h b/lib/config/config.h
index a20fd8f..03319bf 100644
--- a/lib/config/config.h
+++ b/lib/config/config.h
@@ -272,7 +272,7 @@ int find_config_tree_int(struct cmd_context *cmd, int id, struct profile *profil
int64_t find_config_tree_int64(struct cmd_context *cmd, int id, struct profile *profile);
float find_config_tree_float(struct cmd_context *cmd, int id, struct profile *profile);
int find_config_tree_bool(struct cmd_context *cmd, int id, struct profile *profile);
-struct dm_config_node *find_config_tree_array(struct cmd_context *cmd, int id, struct profile *profile);
+const struct dm_config_node *find_config_tree_array(struct cmd_context *cmd, int id, struct profile *profile);
/*
* Functions for configuration settings for which the default
diff --git a/lib/config/defaults.h b/lib/config/defaults.h
index 33f9d08..c568340 100644
--- a/lib/config/defaults.h
+++ b/lib/config/defaults.h
@@ -152,11 +152,6 @@
# define DEFAULT_LOG_FACILITY LOG_USER
#endif
-#define DEFAULT_LOGGED_DEBUG_CLASSES (LOG_CLASS_MEM | LOG_CLASS_DEVS | \
- LOG_CLASS_ACTIVATION | LOG_CLASS_ALLOC | LOG_CLASS_LVMETAD | \
- LOG_CLASS_METADATA | LOG_CLASS_CACHE | LOG_CLASS_LOCKING | \
- LOG_CLASS_LVMPOLLD)
-
#define DEFAULT_SYSLOG 1
#define DEFAULT_VERBOSE 0
#define DEFAULT_SILENT 0
diff --git a/lib/device/dev-cache.c b/lib/device/dev-cache.c
index d594dd4..136921b 100644
--- a/lib/device/dev-cache.c
+++ b/lib/device/dev-cache.c
@@ -681,7 +681,7 @@ static int _init_preferred_names(struct cmd_context *cmd)
_cache.preferred_names_matcher = NULL;
- if (!(cn = find_config_tree_node(cmd, devices_preferred_names_CFG, NULL)) ||
+ if (!(cn = find_config_tree_array(cmd, devices_preferred_names_CFG, NULL)) ||
cn->v->type == DM_CFG_EMPTY_ARRAY) {
log_very_verbose("devices/preferred_names not found in config file: "
"using built-in preferences");
diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c
index fc759fb..1d7dc3c 100644
--- a/lib/format_text/format-text.c
+++ b/lib/format_text/format-text.c
@@ -2491,7 +2491,7 @@ struct format_type *create_text_format(struct cmd_context *cmd)
goto bad;
}
- if ((cn = find_config_tree_node(cmd, metadata_dirs_CFG, NULL))) {
+ if ((cn = find_config_tree_array(cmd, metadata_dirs_CFG, NULL))) {
for (cv = cn->v; cv; cv = cv->next) {
if (cv->type != DM_CFG_STRING) {
log_error("Invalid string in config file: "
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index a447f08..9decf32 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -3255,7 +3255,7 @@ static struct alloc_handle *_alloc_init(struct cmd_context *cmd,
ah->parallel_areas = parallel_areas;
- if ((ah->cling_tag_list_cn = find_config_tree_node(cmd, allocation_cling_tag_list_CFG, NULL)))
+ if ((ah->cling_tag_list_cn = find_config_tree_array(cmd, allocation_cling_tag_list_CFG, NULL)))
(void) _validate_tag_list(ah->cling_tag_list_cn);
ah->maximise_cling = find_config_tree_bool(cmd, allocation_maximise_cling_CFG, NULL);
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index 08bfe91..07ef54e 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -4602,7 +4602,7 @@ static int _allow_system_id(struct cmd_context *cmd, const char *system_id)
const struct dm_config_value *cv;
const char *str;
- if (!(cn = find_config_tree_node(cmd, local_extra_system_ids_CFG, NULL)))
+ if (!(cn = find_config_tree_array(cmd, local_extra_system_ids_CFG, NULL)))
return 0;
for (cv = cn->v; cv; cv = cv->next) {
diff --git a/lib/misc/lvm-globals.c b/lib/misc/lvm-globals.c
index 4fa0779..60397e5 100644
--- a/lib/misc/lvm-globals.c
+++ b/lib/misc/lvm-globals.c
@@ -33,7 +33,7 @@ static int _obtain_device_list_from_udev = DEFAULT_OBTAIN_DEVICE_LIST_FROM_UDEV;
static unsigned _external_device_info_source = DEV_EXT_NONE;
static int _trust_cache = 0; /* Don't scan when incomplete VGs encountered */
static int _debug_level = 0;
-static int _debug_classes_logged = DEFAULT_LOGGED_DEBUG_CLASSES;
+static int _debug_classes_logged = 0;
static int _log_cmd_name = 0;
static int _ignorelockingfailure = 0;
static int _security_level = SECURITY_LEVEL;
diff --git a/lib/thin/thin.c b/lib/thin/thin.c
index 6993249..4c4636f 100644
--- a/lib/thin/thin.c
+++ b/lib/thin/thin.c
@@ -687,7 +687,7 @@ static int _thin_target_present(struct cmd_context *cmd,
if (attributes) {
if (!_feature_mask) {
/* Support runtime lvm.conf changes, N.B. avoid 32 feature */
- if ((cn = find_config_tree_node(cmd, global_thin_disabled_features_CFG, NULL))) {
+ if ((cn = find_config_tree_array(cmd, global_thin_disabled_features_CFG, NULL))) {
for (cv = cn->v; cv; cv = cv->next) {
if (cv->type != DM_CFG_STRING) {
log_error("Ignoring invalid string in config file %s.",
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index c7e797b..528c351 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -2299,7 +2299,7 @@ static int _lvconvert_pool_repair(struct cmd_context *cmd,
int ret = 0, status;
int args = 0;
const char *argv[19]; /* Max supported 10 args */
- char *split, *dm_name, *trans_id_str;
+ char *dm_name, *trans_id_str;
char meta_path[PATH_MAX];
char pms_path[PATH_MAX];
uint64_t trans_id;
@@ -2339,22 +2339,16 @@ static int _lvconvert_pool_repair(struct cmd_context *cmd,
return 0;
}
- if ((cn = find_config_tree_node(cmd, global_thin_repair_options_CFG, NULL))) {
- for (cv = cn->v; cv && args < 16; cv = cv->next) {
- if (cv->type != DM_CFG_STRING) {
- log_error("Invalid string in config file: "
- "global/thin_repair_options");
- return 0;
- }
- argv[++args] = cv->v.str;
- }
- } else {
- /* Use default options (no support for options with spaces) */
- if (!(split = dm_pool_strdup(cmd->mem, DEFAULT_THIN_REPAIR_OPTIONS))) {
- log_error("Failed to duplicate thin repair string.");
+ if (!(cn = find_config_tree_array(cmd, global_thin_repair_options_CFG, NULL)))
+ return_0;
+
+ for (cv = cn->v; cv && args < 16; cv = cv->next) {
+ if (cv->type != DM_CFG_STRING) {
+ log_error("Invalid string in config file: "
+ "global/thin_repair_options");
return 0;
}
- args = dm_split_words(split, 16, 0, (char**) argv + 1);
+ argv[++args] = cv->v.str;
}
if (args == 10) {
diff --git a/tools/vgchange.c b/tools/vgchange.c
index 076fcb8..92c854b 100644
--- a/tools/vgchange.c
+++ b/tools/vgchange.c
@@ -818,7 +818,7 @@ static int _passes_lock_start_filter(struct cmd_context *cmd,
/* undefined list means no restrictions, all vg names pass */
- cn = find_config_tree_node(cmd, cfg_id, NULL);
+ cn = find_config_tree_array(cmd, cfg_id, NULL);
if (!cn)
return 1;
8 years, 10 months
master - config: add find_config_tree_array
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=67a61cce1b26e9...
Commit: 67a61cce1b26e91eb765a682f66be67bd997f09f
Parent: d9d47b7b88b47719ff972f27a448f9cdf6982c4a
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Jul 8 10:43:59 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jul 8 12:59:22 2015 +0200
config: add find_config_tree_array
Before, we used general find_config_tree_node function to retrieve
array values. This had a downside where if the node was not found,
we had to insert default values directly in-situ after the
find_config_tree_node call. This way, we had two copies of default
values - one in config_settings.h and the other one directly in the
code where we found out that find_config_tree_node returned NULL and
hence we needed to fall back to defaults.
With separate find_config_tree_array used for array config values,
we keep all the defaults centrally in config_settings.h because
the new find_config_tree_array automatically returns these defaults
if it can't find any value set in the configuration.
This patch just makes the behaviour exactly the same for arrays as
for any other non-array type where we call find_config_tree_<type>
already, hence making the internal interface for handling array
values consistent with the rest of the config types.
---
lib/commands/toolcontext.c | 2 +
lib/config/config.c | 59 ++++++++++++++++++++++++++++++++++++++++---
lib/config/config.h | 1 +
3 files changed, 57 insertions(+), 5 deletions(-)
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
index 4265954..00db078 100644
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
@@ -1235,6 +1235,8 @@ static int _init_filters(struct cmd_context *cmd, unsigned load_persistent_cache
cmd->lvmetad_filter = NULL;
}
+ cn = find_config_tree_array(cmd, devices_filter_CFG, NULL);
+
/* filter component 1 */
if ((cn = find_config_tree_node(cmd, devices_filter_CFG, NULL))) {
if (!(filter_components[1] = regex_filter_create(cn->v)))
diff --git a/lib/config/config.c b/lib/config/config.c
index 53987f8..9458107 100644
--- a/lib/config/config.c
+++ b/lib/config/config.c
@@ -666,14 +666,18 @@ static void _log_type_error(const char *path, cfg_def_type_t actual,
actual_type_name, expected_type_name);
}
-static struct dm_config_value *_get_def_array_values(struct dm_config_tree *cft,
+static struct dm_config_value *_get_def_array_values(struct cmd_context *cmd,
+ struct dm_config_tree *cft,
const cfg_def_item_t *def,
uint32_t format_flags)
{
+ const char *def_enc_value;
char *enc_value, *token, *p, *r;
struct dm_config_value *array = NULL, *v = NULL, *oldv = NULL;
- if (!def->default_value.v_CFG_TYPE_STRING) {
+ def_enc_value = cfg_def_get_default_value(cmd, def, CFG_TYPE_ARRAY, NULL);
+
+ if (!def_enc_value) {
if (!(array = dm_config_create_value(cft))) {
log_error("Failed to create default empty array for %s.", def->name);
return NULL;
@@ -683,7 +687,7 @@ static struct dm_config_value *_get_def_array_values(struct dm_config_tree *cft,
return array;
}
- if (!(p = token = enc_value = dm_strdup(def->default_value.v_CFG_TYPE_STRING))) {
+ if (!(p = token = enc_value = dm_strdup(def_enc_value))) {
log_error("_get_def_array_values: dm_strdup failed");
return NULL;
}
@@ -844,7 +848,7 @@ static int _check_value_differs_from_default(struct cft_check_handle *handle,
}
if (!v_def && (def->type & CFG_TYPE_ARRAY)) {
- if (!(v_def_array = v_def_iter = _get_def_array_values(handle->cft, def, 0)))
+ if (!(v_def_array = v_def_iter = _get_def_array_values(handle->cmd, handle->cft, def, 0)))
return_0;
do {
/* iterate over each element of the array and check its value */
@@ -1360,6 +1364,51 @@ int find_config_tree_bool(struct cmd_context *cmd, int id, struct profile *profi
return b;
}
+static struct dm_config_node *_get_array_def_node(struct cmd_context *cmd,
+ cfg_def_item_t *def,
+ struct profile *profile)
+{
+ struct dm_config_node *cn;
+
+ if (def->flags & CFG_DEFAULT_UNDEFINED)
+ return NULL;
+
+ if (!(cn = dm_config_create_node(cmd->cft, def->name))) {
+ log_error("Failed to create default array node for %s.", def->name);
+ return NULL;
+ }
+
+ if (!(cn->v = _get_def_array_values(cmd, cmd->cft, def, 0))) {
+ dm_pool_free(cmd->cft->mem, cn);
+ return_NULL;
+ }
+
+ return cn;
+}
+
+struct dm_config_node *find_config_tree_array(struct cmd_context *cmd, int id, struct profile *profile)
+{
+ cfg_def_item_t *item = cfg_def_get_item_p(id);
+ char path[CFG_PATH_MAX_LEN];
+ int profile_applied;
+ struct dm_config_node *cn;
+
+ profile_applied = _apply_local_profile(cmd, profile);
+ _cfg_def_make_path(path, sizeof(path), item->id, item, 0);
+
+ if (!(item->type & CFG_TYPE_ARRAY))
+ log_error(INTERNAL_ERROR "%s cfg tree element not declared as array.", path);
+
+ if (_config_disabled(cmd, item, path) ||
+ !(cn = dm_config_find_node(cmd->cft->root, path)))
+ cn = _get_array_def_node(cmd, item, profile);
+
+ if (profile_applied)
+ remove_config_tree_by_source(cmd, profile->source);
+
+ return cn;
+}
+
/* Insert cn2 after cn1 */
static void _insert_config_node(struct dm_config_node **cn1,
struct dm_config_node *cn2)
@@ -1826,7 +1875,7 @@ static struct dm_config_node *_add_def_node(struct dm_config_tree *cft,
if (spec->withspaces)
format_flags |= DM_CONFIG_VALUE_FMT_COMMON_EXTRA_SPACES;
format_flags |= DM_CONFIG_VALUE_FMT_COMMON_ARRAY;
- cn->v = _get_def_array_values(cft, def, format_flags);
+ cn->v = _get_def_array_values(spec->cmd, cft, def, format_flags);
}
cn->child = NULL;
diff --git a/lib/config/config.h b/lib/config/config.h
index 24d1f3f..a20fd8f 100644
--- a/lib/config/config.h
+++ b/lib/config/config.h
@@ -272,6 +272,7 @@ int find_config_tree_int(struct cmd_context *cmd, int id, struct profile *profil
int64_t find_config_tree_int64(struct cmd_context *cmd, int id, struct profile *profile);
float find_config_tree_float(struct cmd_context *cmd, int id, struct profile *profile);
int find_config_tree_bool(struct cmd_context *cmd, int id, struct profile *profile);
+struct dm_config_node *find_config_tree_array(struct cmd_context *cmd, int id, struct profile *profile);
/*
* Functions for configuration settings for which the default
8 years, 10 months
master - spec: Move lvm2-lockd into separate package
by Marian Csontos
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d9d47b7b88b477...
Commit: d9d47b7b88b47719ff972f27a448f9cdf6982c4a
Parent: 181e701cc51af20c599998358a49902228cb65c1
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Tue Jul 7 16:27:17 2015 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Tue Jul 7 16:53:19 2015 +0200
spec: Move lvm2-lockd into separate package
---
spec/packages.inc | 52 ++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 40 insertions(+), 12 deletions(-)
diff --git a/spec/packages.inc b/spec/packages.inc
index ed02822..33dda2e 100644
--- a/spec/packages.inc
+++ b/spec/packages.inc
@@ -86,10 +86,6 @@ fi
%if %{have_service lvmpolld}
%{_sbindir}/lvmpolld
%endif
-%if %{have_service lvmlockd}
- %{_sbindir}/lvmlockd
- %{_sbindir}/lvmlockctl
-%endif
%if %{have_with cache}
%{_mandir}/man7/lvmcache.7.gz
%endif
@@ -160,9 +156,6 @@ fi
%{_mandir}/man8/lvmpolld.8.gz
%{_mandir}/man8/lvm-lvpoll.8.gz
%endif
-%if %{have_service lvmlockd}
- %{_mandir}/man8/lvmlockd.8.gz
-%endif
%dir %{_sysconfdir}/lvm
%ghost %{_sysconfdir}/lvm/cache/.cache
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvm.conf
@@ -174,7 +167,6 @@ fi
%dir %{_sysconfdir}/lvm/backup
%dir %{_sysconfdir}/lvm/cache
%dir %{_sysconfdir}/lvm/archive
-%dir %{_default_locking_dir}
%dir %{_default_run_dir}
%if %{enable_systemd}
%config(noreplace) %{_prefix}/lib/tmpfiles.d/%{name}.conf
@@ -189,10 +181,6 @@ fi
%{_unitdir}/lvm2-lvmpolld.service
%{_unitdir}/lvm2-lvmpolld.socket
%endif
- %if %{have_service lvmlockd}
- %{_unitdir}/lvm2-lvmlockd.service
- %{_unitdir}/lvm2-lvmlocking.service
- %endif
%else
%{_sysconfdir}/rc.d/init.d/lvm2-monitor
%{_sysconfdir}/rc.d/init.d/blk-availability
@@ -259,6 +247,46 @@ This package contains shared lvm2 libraries for applications.
%{_libdir}/libdevmapper-event-lvm2snapshot.so
%{_libdir}/libdevmapper-event-lvm2raid.so
+
+##############################################################################
+# LVM locking daemon
+##############################################################################
+%if %{have_service lvmlockd}
+%package lockd
+Summary: LVM locking daemon
+Group: System Environment/Base
+Requires: lvm2 = %{version}-%{release}
+%if %{enable_lockd_dlm}
+Requires: dlm >= %{dlm_version}
+%endif
+%if %{enable_lockd_sanlock}
+Requires: sanlock-lib >= %{sanlock_version}
+%endif
+Requires(post): systemd-units
+Requires(preun): systemd-units
+Requires(postun): systemd-units
+
+%description lockd
+LVM commands use lvmlockd to coordinate access to shared storage.
+
+%post lockd
+%systemd_post lvm2-lvmlockd.service lvm2-lvmlocking.service
+
+%preun lockd
+%systemd_preun lvm2-lvmlockd.service lvm2-lvmlocking.service
+
+%postun lockd
+%systemd_postun lvm2-lvmlockd.service lvm2-lvmlocking.service
+
+%files lockd
+%{_sbindir}/lvmlockd
+%{_sbindir}/lvmlockctl
+%{_mandir}/man8/lvmlockd.8.gz
+%dir %{_default_locking_dir}
+%{_unitdir}/lvm2-lvmlockd.service
+%{_unitdir}/lvm2-lvmlocking.service
+%endif
+
##############################################################################
# Cluster subpackage
##############################################################################
8 years, 10 months
master - spec: Update to use enable_lockd_*
by Marian Csontos
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=181e701cc51af2...
Commit: 181e701cc51af20c599998358a49902228cb65c1
Parent: a421879bb5da8b32141cec851c490a1ce9906e6d
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Tue Jul 7 14:54:57 2015 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Tue Jul 7 16:53:19 2015 +0200
spec: Update to use enable_lockd_*
---
spec/build.inc | 5 ++++-
spec/source.inc | 22 +++++++++++++++++++++-
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/spec/build.inc b/spec/build.inc
index db9bcc2..94d5e06 100644
--- a/spec/build.inc
+++ b/spec/build.inc
@@ -7,7 +7,10 @@
%global enable_lvmpolld %(if echo %{services} | grep -q lvmpolld; then echo 1; else echo 0; fi)
%enableif %{enable_lvmpolld} lvmpolld
%global enable_lvmlockd %(if echo %{services} | grep -q lvmlockd; then echo 1; else echo 0; fi)
-%enableif %{enable_lvmlockd} lvmlockd
+%if %{enable_lvmlockd}
+%enableif %{enable_lockd_dlm} lockd-dlm
+%enableif %{enable_lockd_sanlock} lockd-sanlock
+%endif
%build
%configure \
diff --git a/spec/source.inc b/spec/source.inc
index 0a0d9e5..2c17dbd 100644
--- a/spec/source.inc
+++ b/spec/source.inc
@@ -8,6 +8,9 @@
%global enable_udev 1
%global enable_systemd 1
%global enable_cmirror 1
+#%global enable_lvmlockd 0
+#%global enable_lockd_dlm 0
+#%global enable_lockd_sanlock 0
%global buildreq_cluster corosync-devel >= 1.99.9-1, dlm-devel >= 3.99.1-1
%global req_cluster corosync >= 1.99.9-1, dlm >= 3.99.2-1
@@ -28,7 +31,22 @@
%service lvmpolld 1
%if %{fedora} >= 22 || %{rhel} >= 7
-%service lvmlockd 1
+ %service lvmlockd 1
+ %define sanlock_version 3.2.4-1
+ %define enable_lockd_dlm 1
+ %define enable_lockd_sanlock 1
+ %if %{rhel}
+ %ifarch i686 x86_64 s390x
+ %global buildreq_lockd_dlm dlm-devel >= %{dlm_version}
+ %else
+ %define enable_lockd_dlm 0
+ %endif
+ %ifarch x86_64 ppc64le ppc64 aarch64
+ %global buildreq_lockd_sanlock sanlock-devel >= %{sanlock_version}
+ %else
+ %define enable_lockd_sanlock 0
+ %endif
+ %endif
%endif
##############################################################
@@ -109,6 +127,8 @@ BuildRequires: pkgconfig
%maybe BuildRequires: %{?buildreq_udev}
%maybe BuildRequires: %{?buildreq_cluster}
+%maybe BuildRequires: %{?buildreq_lockd_dlm}
+%maybe BuildRequires: %{?buildreq_lockd_sanlock}
%description
LVM2 includes all of the support for handling read/write operations on
8 years, 10 months
v2_02_125 annotated tag has been created
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=7b397fb6e272f6...
Commit: 7b397fb6e272f632d553971463f4a136964604cd
Parent: 0000000000000000000000000000000000000000
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: 2015-07-07 12:56 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: 2015-07-07 12:56 +0000
annotated tag: v2_02_125 has been created
at 7b397fb6e272f632d553971463f4a136964604cd (tag)
tagging 3472910177c96780628c7d54dfb6b4aab735353c (commit)
replaces v2_02_124
Release 2.02.125.
82 files changed, 1095 insertions(+), 614 deletions(-)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
iEYEABECAAYFAlWbzIQACgkQIoGRwVZ+LBeVCQCePpJjvDWXV2L+HtdeA4AzmDmN
7DEAnA3woE7XcoVEBmKtAT29VYxBHILG
=kZ0K
-----END PGP SIGNATURE-----
Alasdair G Kergon (6):
post-release
macros: Wrap PRI with FMT.
include: Standardise around new tool.h.
configure: Separate sanlock and dlm lock config.
WHATS_NEW: Update. Fix renamed config setting vsn.
pre-release
David Teigland (6):
configure: enable building lvmlockd without sanlock or dlm
config: rename lock_retries lvmlockd_lock_retries
lockd: remove unused code for overriding lock modes
config: remove read_only_lock_modes
man lvmlockd: minor updates
lvmetactl: program to interact with lvmetad
Jonathan Brassow (1):
clean-up: typos s/bellow/below/
Marian Csontos (2):
Build lockd only for Fedora >= 22 and RHEL >= 7
lockd: Clean up spec
Ondrej Kozina (1):
lvmpolld: fix possible memory corruption with mem debug
Peter Rajnoha (2):
conf: regenerate
conf: regenerate
Zdenek Kabelac (2):
cache: support clear-needs-check
tests: use old snapshot for huge volumes
8 years, 10 months
master - post-release
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a421879bb5da8b...
Commit: a421879bb5da8b32141cec851c490a1ce9906e6d
Parent: 3472910177c96780628c7d54dfb6b4aab735353c
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Tue Jul 7 13:57:13 2015 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Tue Jul 7 13:57:13 2015 +0100
post-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 3 +++
WHATS_NEW_DM | 3 +++
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/VERSION b/VERSION
index 6e9667f..c491170 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.125(2)-git (2015-07-07)
+2.02.126(2)-git (2015-07-07)
diff --git a/VERSION_DM b/VERSION_DM
index e0980a8..9c79a79 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.102-git (2015-07-07)
+1.02.103-git (2015-07-07)
diff --git a/WHATS_NEW b/WHATS_NEW
index f792ffb..1a8bbbb 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,3 +1,6 @@
+Version 2.02.126 -
+================================
+
Version 2.02.125 - 7th July 2015
================================
Fix getline memory usage in lvmpolld.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 8e38a24..57edd8d 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,3 +1,6 @@
+Version 1.02.103 -
+================================
+
Version 1.02.102 - 7th July 2015
================================
Include tool.h for default non-library use.
8 years, 10 months