dev-prajnoha-pv-ext-flag-used - cleanup: add cast
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3d08a49790c180...
Commit: 3d08a49790c180e10e8a6d35cbd43d7eb214bf30
Parent: 55a9262bdbc53acbd79035e904e7e00df8eec88b
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Aug 18 12:39:17 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Aug 18 15:00:08 2015 +0200
cleanup: add cast
---
tools/lvconvert.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 36c4593..0897e09 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -2002,7 +2002,7 @@ static int _lvconvert_uncache(struct cmd_context *cmd,
return 0;
}
- if (!lv_remove_single(cmd, first_seg(lv)->pool_lv, lp->force, 0))
+ if (!lv_remove_single(cmd, first_seg(lv)->pool_lv, (force_t) lp->force, 0))
return_0;
log_print_unless_silent("Logical volume %s is not cached.", display_lvname(lv));
8 years, 9 months
dev-prajnoha-pv-ext-flag-used - cleanup: unused header files (Coverity)
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=55a9262bdbc53a...
Commit: 55a9262bdbc53acbd79035e904e7e00df8eec88b
Parent: ba94d0f144844ff3fb15d0a2a87ccf7f27f550bc
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Aug 18 12:31:20 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Aug 18 15:00:08 2015 +0200
cleanup: unused header files (Coverity)
---
lib/config/config.c | 1 -
lib/metadata/raid_manip.c | 1 -
lib/metadata/vg.c | 1 -
libdm/libdm-stats.c | 2 --
4 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/lib/config/config.c b/lib/config/config.c
index 0c3cf92..ac1049d 100644
--- a/lib/config/config.c
+++ b/lib/config/config.c
@@ -23,7 +23,6 @@
#include "toolcontext.h"
#include "lvm-file.h"
#include "memlock.h"
-#include "segtype.h"
#include <sys/stat.h>
#include <sys/mman.h>
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index c574a14..8ecdc02 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -21,7 +21,6 @@
#include "activate.h"
#include "lv_alloc.h"
#include "lvm-string.h"
-#include "lvmlockd.h"
static int _lv_is_raid_with_tracking(const struct logical_volume *lv,
struct logical_volume **tracking)
diff --git a/lib/metadata/vg.c b/lib/metadata/vg.c
index 0e5aee5..ca2bf96 100644
--- a/lib/metadata/vg.c
+++ b/lib/metadata/vg.c
@@ -20,7 +20,6 @@
#include "toolcontext.h"
#include "lvmcache.h"
#include "archiver.h"
-#include "lvmlockd.h"
struct volume_group *alloc_vg(const char *pool_name, struct cmd_context *cmd,
const char *vg_name)
diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c
index f231016..4b4135a 100644
--- a/libdm/libdm-stats.c
+++ b/libdm/libdm-stats.c
@@ -13,8 +13,6 @@
*/
#include "dmlib.h"
-#include "libdm-targets.h"
-#include "libdm-common.h"
#define DM_STATS_REGION_NOT_PRESENT UINT64_MAX
8 years, 9 months
dev-prajnoha-pv-ext-flag-used - dmstats: fix type formatting
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=13d3eeb2ee6874...
Commit: 13d3eeb2ee687455bd6e19ff6dae314b3a85776a
Parent: dece918bc8e0d4e3222c4e71fc7f212b994e358c
Author: Bryn M. Reeves <bmr(a)redhat.com>
AuthorDate: Mon Aug 17 17:30:38 2015 +0100
Committer: Bryn M. Reeves <bmr(a)redhat.com>
CommitterDate: Tue Aug 18 10:30:53 2015 +0100
dmstats: fix type formatting
Fix several instances of 'const char * const*' to be:
'const char * const *'
---
tools/dmsetup.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/dmsetup.c b/tools/dmsetup.c
index a937027..10ec7a5 100644
--- a/tools/dmsetup.c
+++ b/tools/dmsetup.c
@@ -3409,7 +3409,7 @@ static int _dm_stats_program_id_disp(struct dm_report *rh,
const char *program_id;
if (!(program_id = dm_stats_get_current_region_program_id(dms)))
return_0;
- return dm_report_field_string(rh, field, (const char * const*) &program_id);
+ return dm_report_field_string(rh, field, (const char * const *) &program_id);
}
static int _dm_stats_aux_data_disp(struct dm_report *rh,
@@ -3421,7 +3421,7 @@ static int _dm_stats_aux_data_disp(struct dm_report *rh,
const char *aux_data;
if (!(aux_data = dm_stats_get_current_region_aux_data(dms)))
return_0;
- return dm_report_field_string(rh, field, (const char * const*) &aux_data);
+ return dm_report_field_string(rh, field, (const char * const *) &aux_data);
}
static int _dm_stats_rrqm_disp(struct dm_report *rh,
8 years, 9 months
dev-prajnoha-pv-ext-flag-used - config: add empty lines around examples
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b091c37595b287...
Commit: b091c37595b28702e8bd3570416fea2718836d56
Parent: ca70770cfd281a353143057d3164e3f9bc661081
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Aug 13 09:16:21 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Aug 17 13:52:34 2015 -0500
config: add empty lines around examples
When --withspaces is used, a blank line is
added before and after an Example section,
making the text less dense.
---
lib/config/config_settings.h | 137 +++++++++++++++++++++++++----------------
1 files changed, 83 insertions(+), 54 deletions(-)
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 789e2e2..d4f51eb 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -218,8 +218,10 @@ cfg_array(devices_preferred_names_CFG, "preferred_names", devices_CFG_SECTION, C
"Rule 2 prefers the path with the least slashes.\n"
"Rule 3 prefers a symlink.\n"
"Rule 4 prefers the path with least value in lexicographical order.\n"
- "Example:\n"
- "preferred_names = [ \"^/dev/mpath/\", \"^/dev/mapper/mpath\", \"^/dev/[hs]d\" ]\n")
+ "#\n"
+ "Example\n"
+ "preferred_names = [ \"^/dev/mpath/\", \"^/dev/mapper/mpath\", \"^/dev/[hs]d\" ]\n"
+ "#\n")
cfg_array(devices_filter_CFG, "filter", devices_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, "#Sa|.*/|", vsn(1, 0, 0), NULL, 0, NULL,
"Limit the block devices that are used by LVM commands.\n"
@@ -240,21 +242,19 @@ cfg_array(devices_filter_CFG, "filter", devices_CFG_SECTION, CFG_DEFAULT_COMMENT
"might produce unexpected results (test any changes.)\n"
"Run vgscan after changing the filter to regenerate the cache.\n"
"See the use_lvmetad comment for a special case regarding filters.\n"
- "Example:\n"
- "Accept every block device.\n"
+ "#\n"
+ "Example\n"
+ "Accept every block device:\n"
"filter = [ \"a|.*/|\" ]\n"
- "Example:\n"
- "Reject the cdrom drive.\n"
+ "Reject the cdrom drive:\n"
"filter = [ \"r|/dev/cdrom|\" ]\n"
- "Example:\n"
- "Work with just loopback devices, e.g. for testing.\n"
+ "Work with just loopback devices, e.g. for testing:\n"
"filter = [ \"a|loop|\", \"r|.*|\" ]\n"
- "Example:\n"
- "Accept all loop devices and ide drives except hdc.\n"
+ "Accept all loop devices and ide drives except hdc:\n"
"filter = [ \"a|loop|\", \"r|/dev/hdc|\", \"a|/dev/ide|\", \"r|.*|\" ]\n"
- "Example:\n"
- "Use anchors to be very specific.\n"
- "filter = [ \"a|^/dev/hda8$|\", \"r|.*/|\" ]\n")
+ "Use anchors to be very specific:\n"
+ "filter = [ \"a|^/dev/hda8$|\", \"r|.*/|\" ]\n"
+ "#\n")
cfg_array(devices_global_filter_CFG, "global_filter", devices_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, "#Sa|.*/|", vsn(2, 2, 98), NULL, 0, NULL,
"Limit the block devices that are used by LVM system components.\n"
@@ -287,8 +287,10 @@ cfg_array(devices_types_CFG, "types", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED
"List of additional acceptable block device types.\n"
"These are of device type names from /proc/devices,\n"
"followed by the maximum number of partitions.\n"
- "Example:\n"
- "types = [ \"fd\", 16 ]\n")
+ "#\n"
+ "Example\n"
+ "types = [ \"fd\", 16 ]\n"
+ "#\n")
cfg(devices_sysfs_scan_CFG, "sysfs_scan", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_SYSFS_SCAN, vsn(1, 0, 8), NULL, 0, NULL,
"Restrict device scanning to block devices appearing in sysfs.\n"
@@ -408,14 +410,15 @@ cfg_array(allocation_cling_tag_list_CFG, "cling_tag_list", allocation_CFG_SECTIO
"list of tags is defined here, it will check whether any of them are\n"
"attached to the PVs concerned and then seek to match those PV tags\n"
"between existing extents and new extents.\n"
- "Example:\n"
- "Use the special tag \"@*\" as a wildcard to match any PV tag.\n"
+ "#\n"
+ "Example\n"
+ "Use the special tag \"@*\" as a wildcard to match any PV tag:\n"
"cling_tag_list = [ \"@*\" ]\n"
- "Example:\n"
- "LVs are mirrored between two sites within a single VG.\n"
+ "LVs are mirrored between two sites within a single VG, and\n"
"PVs are tagged with either @site1 or @site2 to indicate where\n"
- "they are situated.\n"
- "cling_tag_list = [ \"@site1\", \"@site2\" ]\n")
+ "they are situated:\n"
+ "cling_tag_list = [ \"@site1\", \"@site2\" ]\n"
+ "#\n")
cfg(allocation_maximise_cling_CFG, "maximise_cling", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_MAXIMISE_CLING, vsn(2, 2, 85), NULL, 0, NULL,
"Use a previous allocation algorithm.\n"
@@ -907,16 +910,20 @@ cfg_array(global_thin_disabled_features_CFG, "thin_disabled_features", global_CF
"Features: block_size, discards, discards_non_power_2,\n"
"external_origin, metadata_resize, external_origin_extend,\n"
"error_if_no_space.\n"
- "Example:\n"
- "thin_disabled_features = [ \"discards\", \"block_size\" ]\n")
+ "#\n"
+ "Example\n"
+ "thin_disabled_features = [ \"discards\", \"block_size\" ]\n"
+ "#\n")
cfg_array(global_cache_disabled_features_CFG, "cache_disabled_features", global_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 128), NULL, 0, NULL,
"Features to not use in the cache driver.\n"
"This can be helpful for testing, or to avoid\n"
"using a feature that is causing problems.\n"
"Features: policy_mq, policy_smq.\n"
- "Example:\n"
- "cache_disabled_features = [ \"policy_smq\" ]\n")
+ "#\n"
+ "Example\n"
+ "cache_disabled_features = [ \"policy_smq\" ]\n"
+ "#\n")
cfg(global_cache_check_executable_CFG, "cache_check_executable", global_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, CACHE_CHECK_CMD, vsn(2, 2, 108), "@CACHE_CHECK_CMD@", 0, NULL,
"The full path to the cache_check command.\n"
@@ -1066,8 +1073,10 @@ cfg_array(activation_volume_list_CFG, "volume_list", activation_CFG_SECTION, CFG
"the LV or VG. See tags/hosttags.\n"
"If any host tags exist but volume_list is not defined,\n"
"a default single-entry list containing '@*' is assumed.\n"
- "Example:\n"
- "volume_list = [ \"vg1\", \"vg2/lvol1\", \"@tag1\", \"@*\" ]\n")
+ "#\n"
+ "Example\n"
+ "volume_list = [ \"vg1\", \"vg2/lvol1\", \"@tag1\", \"@*\" ]\n"
+ "#\n")
cfg_array(activation_auto_activation_volume_list_CFG, "auto_activation_volume_list", activation_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 97), NULL, 0, NULL,
"Only LVs selected by this list are auto-activated.\n"
@@ -1203,19 +1212,25 @@ cfg(activation_snapshot_autoextend_threshold_CFG, "snapshot_autoextend_threshold
"The minimum value is 50 (a smaller value is treated as 50.)\n"
"Also see snapshot_autoextend_percent.\n"
"Automatic extension requires dmeventd to be monitoring the LV.\n"
- "Example:\n"
- "With snapshot_autoextend_threshold 70 and\n"
- "snapshot_autoextend_percent 20, whenever a snapshot\n"
- "exceeds 70% usage, it will be extended by another 20%.\n"
- "For a 1G snapshot, using 700M will trigger a resize to 1.2G.\n"
- "When the usage exceeds 840M, the snapshot will be extended\n"
- "to 1.44G, and so on.\n")
+ "#\n"
+ "Example\n"
+ "Using 70% autoextend threshold and 20% autoextend size, when a 1G\n"
+ "snapshot exceeds 700M, it is extended to 1.2G, and when it exceeds\n"
+ "840M, it is extended to 1.44G:\n"
+ "snapshot_autoextend_threshold = 70\n"
+ "#\n")
cfg(activation_snapshot_autoextend_percent_CFG, "snapshot_autoextend_percent", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_SNAPSHOT_AUTOEXTEND_PERCENT, vsn(2, 2, 75), NULL, 0, NULL,
"Auto-extending a snapshot adds this percent extra space.\n"
"The amount of additional space added to a snapshot is this\n"
"percent of its current size.\n"
- "Also see snapshot_autoextend_threshold.\n")
+ "#\n"
+ "Example\n"
+ "Using 70% autoextend threshold and 20% autoextend size, when a 1G\n"
+ "snapshot exceeds 700M, it is extended to 1.2G, and when it exceeds\n"
+ "840M, it is extended to 1.44G:\n"
+ "snapshot_autoextend_percent = 20\n"
+ "#\n")
cfg(activation_thin_pool_autoextend_threshold_CFG, "thin_pool_autoextend_threshold", activation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA, CFG_TYPE_INT, DEFAULT_THIN_POOL_AUTOEXTEND_THRESHOLD, vsn(2, 2, 89), NULL, 0, NULL,
"Auto-extend a thin pool when its usage exceeds this percent.\n"
@@ -1223,18 +1238,25 @@ cfg(activation_thin_pool_autoextend_threshold_CFG, "thin_pool_autoextend_thresho
"The minimum value is 50 (a smaller value is treated as 50.)\n"
"Also see thin_pool_autoextend_percent.\n"
"Automatic extension requires dmeventd to be monitoring the LV.\n"
- "Example:\n"
- "With thin_pool_autoextend_threshold 70 and\n"
- "thin_pool_autoextend_percent 20, whenever a thin pool\n"
- "exceeds 70% usage, it will be extended by another 20%.\n"
- "For a 1G thin pool, using up 700M will trigger a resize to 1.2G.\n"
- "When the usage exceeds 840M, the thin pool will be extended\n"
- "to 1.44G, and so on.\n")
+ "#\n"
+ "Example\n"
+ "Using 70% autoextend threshold and 20% autoextend size, when a 1G\n"
+ "thin pool exceeds 700M, it is extended to 1.2G, and when it exceeds\n"
+ "840M, it is extended to 1.44G:\n"
+ "thin_pool_autoextend_threshold = 70\n"
+ "#\n")
cfg(activation_thin_pool_autoextend_percent_CFG, "thin_pool_autoextend_percent", activation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA, CFG_TYPE_INT, DEFAULT_THIN_POOL_AUTOEXTEND_PERCENT, vsn(2, 2, 89), NULL, 0, NULL,
"Auto-extending a thin pool adds this percent extra space.\n"
"The amount of additional space added to a thin pool is this\n"
- "percent of its current size.\n")
+ "percent of its current size.\n"
+ "#\n"
+ "Example\n"
+ "Using 70% autoextend threshold and 20% autoextend size, when a 1G\n"
+ "thin pool exceeds 700M, it is extended to 1.2G, and when it exceeds\n"
+ "840M, it is extended to 1.44G:\n"
+ "thin_pool_autoextend_percent = 20\n"
+ "#\n")
cfg_array(activation_mlock_filter_CFG, "mlock_filter", activation_CFG_SECTION, CFG_DEFAULT_UNDEFINED | CFG_ADVANCED, CFG_TYPE_STRING, NULL, vsn(2, 2, 62), NULL, 0, NULL,
"Do not mlock these memory areas.\n"
@@ -1249,8 +1271,10 @@ cfg_array(activation_mlock_filter_CFG, "mlock_filter", activation_CFG_SECTION, C
"to lines that match are not pinned. On some systems,\n"
"locale-archive was found to make up over 80% of the memory\n"
"used by the process.\n"
- "Example:\n"
- "mlock_filter = [ \"locale/locale-archive\", \"gconv/gconv-modules.cache\" ]\n")
+ "#\n"
+ "Example\n"
+ "mlock_filter = [ \"locale/locale-archive\", \"gconv/gconv-modules.cache\" ]\n"
+ "#\n")
cfg(activation_use_mlockall_CFG, "use_mlockall", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_USE_MLOCKALL, vsn(2, 2, 62), NULL, 0, NULL,
"Use the old behavior of mlockall to pin all memory.\n"
@@ -1358,8 +1382,10 @@ cfg_array(metadata_dirs_CFG, "dirs", metadata_CFG_SECTION, CFG_ADVANCED | CFG_DE
"Never edit any files in these directories by hand unless you\n"
"you are absolutely sure you know what you are doing! Use\n"
"the supplied toolset to make changes (e.g. vgcfgrestore).\n"
- "Example:\n"
- "dirs = [ \"/etc/lvm/metadata\", \"/mnt/disk2/lvm/metadata2\" ]\n")
+ "#\n"
+ "Example\n"
+ "dirs = [ \"/etc/lvm/metadata\", \"/mnt/disk2/lvm/metadata2\" ]\n"
+ "#\n")
cfg_section(metadata_disk_areas_CFG_SUBSECTION, "disk_areas", metadata_CFG_SECTION, CFG_UNSUPPORTED | CFG_DEFAULT_COMMENTED, vsn(1, 0, 0), 0, NULL, NULL)
cfg_section(disk_area_CFG_SUBSECTION, "disk_area", metadata_disk_areas_CFG_SUBSECTION, CFG_NAME_VARIABLE | CFG_UNSUPPORTED | CFG_DEFAULT_COMMENTED, vsn(1, 0, 0), 0, NULL, NULL)
@@ -1595,10 +1621,12 @@ cfg_section(tag_CFG_SUBSECTION, "tag", tags_CFG_SECTION, CFG_NAME_VARIABLE | CFG
"to the local machine as a 'host tag'.\n"
"If this subsection is empty (has no host_list), then\n"
"the subsection name is always applied as a 'host tag'.\n"
- "Example:\n"
+ "#\n"
+ "Example\n"
"The host tag foo is given to all hosts, and the host tag\n"
"bar is given to the hosts named machine1 and machine2.\n"
- "tags { foo { } bar { host_list = [ \"machine1\", \"machine2\" ] } }\n")
+ "tags { foo { } bar { host_list = [ \"machine1\", \"machine2\" ] } }\n"
+ "#\n")
cfg_array(tag_host_list_CFG, "host_list", tag_CFG_SUBSECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 18), NULL, 0, NULL,
"A list of machine names.\n"
@@ -1615,12 +1643,13 @@ cfg(local_system_id_CFG, "system_id", local_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_D
"When used, it must be set to a unique value\n"
"among all hosts sharing access to the storage,\n"
"e.g. a host name.\n"
- "Example:\n"
- "Set no system ID.\n"
+ "#\n"
+ "Example\n"
+ "Set no system ID:\n"
"system_id = \"\"\n"
- "Example:\n"
- "Set the system_id to the string 'host1'.\n"
- "system_id = \"host1\"\n")
+ "Set the system_id to a specific name:\n"
+ "system_id = \"host1\"\n"
+ "#\n")
cfg_array(local_extra_system_ids_CFG, "extra_system_ids", local_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 117), NULL, 0, NULL,
"A list of extra VG system IDs the local host can access.\n"
8 years, 9 months
dev-prajnoha-pv-ext-flag-used - config: explain automatic default values
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5243a81c29a4b6...
Commit: 5243a81c29a4b60fe8ef8e12b9a1486a3f2b85a6
Parent: 12acf852c5661b771d8800a60dcf1ac799466289
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Aug 13 13:35:45 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Aug 17 13:52:34 2015 -0500
config: explain automatic default values
Before printing a commented automatic config value,
print a line describing what it is. Otherwise, the
commented value can look like it's a part of an
example preceding it.
---
lib/config/config.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/lib/config/config.c b/lib/config/config.c
index d7a6cd9..bfcf87c 100644
--- a/lib/config/config.c
+++ b/lib/config/config.c
@@ -1717,6 +1717,9 @@ static int _out_prefix_fn(const struct dm_config_node *cn, const char *line, voi
if (cfg_def->flags & CFG_DEFAULT_UNDEFINED)
fprintf(out->fp, "%s# This configuration %s does not have a default value defined.\n", line, node_type_name);
+ if (cfg_def->flags & CFG_DEFAULT_COMMENTED)
+ fprintf(out->fp, "%s# This configuration %s has an automatic default value.\n", line, node_type_name);
+
if ((out->tree_spec->type == CFG_DEF_TREE_FULL) &&
(out->tree_spec->check_status[cn->id] & CFG_USED))
fprintf(out->fp, "%s# Value defined in existing configuration has been used for this setting.\n", line);
8 years, 9 months
dev-prajnoha-pv-ext-flag-used - dmsetup: check timerfd reads for valid byte count (Coverity)
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=12acf852c5661b...
Commit: 12acf852c5661b771d8800a60dcf1ac799466289
Parent: 074b5de7715b76ad63147f84edb5d9e1a05870e9
Author: Bryn M. Reeves <bmr(a)redhat.com>
AuthorDate: Mon Aug 17 19:26:44 2015 +0100
Committer: Bryn M. Reeves <bmr(a)redhat.com>
CommitterDate: Mon Aug 17 19:28:53 2015 +0100
dmsetup: check timerfd reads for valid byte count (Coverity)
The timerfd guarantees that it will return 8 bytes when a read(2)
is issued (a uint64_t giving the number of timer events during the
call). Check that it does so and log a non-fatal error if the byte
count is not 8.
---
tools/dmsetup.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/tools/dmsetup.c b/tools/dmsetup.c
index 7769fde..a937027 100644
--- a/tools/dmsetup.c
+++ b/tools/dmsetup.c
@@ -573,18 +573,25 @@ static int _start_timerfd_timer(void)
static int _do_timerfd_wait(void)
{
uint64_t expired;
+ ssize_t bytes;
if (_timer_fd < 0)
return 0;
/* read on timerfd returns a uint64_t in host byte order. */
- if (read(_timer_fd, &expired, sizeof(expired)) < 0) {
+ bytes = read(_timer_fd, &expired, sizeof(expired));
+
+ if (bytes < 0) {
/* EBADF from invalid timerfd or EINVAL from too small buffer. */
log_error("Interval timer wait failed: %s",
strerror(errno));
return 0;
}
+ /* read(2) on a timerfd descriptor is guaranteed to return 8 bytes. */
+ if (bytes != 8)
+ log_error("Unexepcted byte count on timerfd read: %d", bytes);
+
/* FIXME: attempt to rebase clock? */
if (expired > 1)
log_warn("WARNING: Try increasing --interval ("FMTu64
8 years, 9 months
dev-prajnoha-pv-ext-flag-used - post-release
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d1c65d1b28c894...
Commit: d1c65d1b28c8942b4296da30dc95b7e7de33e5fe
Parent: be1db6b6c17226894233f7d9629117b0cd554b88
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Mon Aug 17 17:26:20 2015 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Mon Aug 17 17:26:20 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 1f01f85..256a299 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.128(2)-git (2015-08-17)
+2.02.129(2)-git (2015-08-17)
diff --git a/VERSION_DM b/VERSION_DM
index c8c6485..84f6bdb 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.105-git (2015-08-17)
+1.02.106-git (2015-08-17)
diff --git a/WHATS_NEW b/WHATS_NEW
index a65fd7b..25cea03 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,3 +1,6 @@
+Version 2.02.129 -
+===================================
+
Version 2.02.128 - 17th August 2015
===================================
Allocation setting cache_pool_cachemode is replaced by cache_mode.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 32b333b..363f7bf 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,3 +1,6 @@
+Version 1.02.106 -
+===================================
+
Version 1.02.105 - 17th August 2015
===================================
Fix 'dmstats list -o all' segfault.
8 years, 9 months
dev-prajnoha-pv-ext-flag-used - pre-release
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=be1db6b6c17226...
Commit: be1db6b6c17226894233f7d9629117b0cd554b88
Parent: 4227b2ebb453410f00c0780d2d3a86b4dac4da24
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Mon Aug 17 17:20:14 2015 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Mon Aug 17 17:20:14 2015 +0100
pre-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 2 +-
WHATS_NEW_DM | 2 +-
lib/config/config_settings.h | 4 ++--
libdm/.exported_symbols.DM_1_02_104 | 1 -
libdm/.exported_symbols.DM_1_02_105 | 1 +
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/VERSION b/VERSION
index c2c0786..1f01f85 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.128(2)-git (2015-08-10)
+2.02.128(2)-git (2015-08-17)
diff --git a/VERSION_DM b/VERSION_DM
index 3f8be7a..c8c6485 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.105-git (2015-08-10)
+1.02.105-git (2015-08-17)
diff --git a/WHATS_NEW b/WHATS_NEW
index 8e6ca10..a65fd7b 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,4 +1,4 @@
-Version 2.02.128 -
+Version 2.02.128 - 17th August 2015
===================================
Allocation setting cache_pool_cachemode is replaced by cache_mode.
Don't attempt to close config file that couldn't be opened.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 870ffb2..32b333b 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,4 +1,4 @@
-Version 1.02.105 -
+Version 1.02.105 - 17th August 2015
===================================
Fix 'dmstats list -o all' segfault.
Separate dmstats statistics fields from region information fields.
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 399f748..789e2e2 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -485,7 +485,7 @@ cfg_section(allocation_cache_settings_CFG_SECTION, "cache_settings", allocation_
"Individual settings for policies.\n"
"See the help for individual policies for more info.\n")
-cfg_section(policy_settings_CFG_SUBSECTION, "policy_settings", allocation_cache_settings_CFG_SECTION, CFG_NAME_VARIABLE | CFG_SECTION_NO_CHECK | CFG_PROFILABLE | CFG_DEFAULT_COMMENTED, vsn(2, 2, 127), 0, NULL,
+cfg_section(policy_settings_CFG_SUBSECTION, "policy_settings", allocation_cache_settings_CFG_SECTION, CFG_NAME_VARIABLE | CFG_SECTION_NO_CHECK | CFG_PROFILABLE | CFG_DEFAULT_COMMENTED, vsn(2, 2, 128), 0, NULL,
"Replace this subsection name with a policy name.\n"
"Multiple subsections for different policies can be created.\n")
@@ -910,7 +910,7 @@ cfg_array(global_thin_disabled_features_CFG, "thin_disabled_features", global_CF
"Example:\n"
"thin_disabled_features = [ \"discards\", \"block_size\" ]\n")
-cfg_array(global_cache_disabled_features_CFG, "cache_disabled_features", global_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 126), NULL, 0, NULL,
+cfg_array(global_cache_disabled_features_CFG, "cache_disabled_features", global_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 128), NULL, 0, NULL,
"Features to not use in the cache driver.\n"
"This can be helpful for testing, or to avoid\n"
"using a feature that is causing problems.\n"
diff --git a/libdm/.exported_symbols.DM_1_02_104 b/libdm/.exported_symbols.DM_1_02_104
index 411ab2a..712fcf2 100644
--- a/libdm/.exported_symbols.DM_1_02_104
+++ b/libdm/.exported_symbols.DM_1_02_104
@@ -72,7 +72,6 @@ dm_task_get_ioctl_timestamp
dm_task_set_record_timestamp
dm_timestamp_alloc
dm_timestamp_compare
-dm_timestamp_copy
dm_timestamp_delta
dm_timestamp_destroy
dm_timestamp_get
diff --git a/libdm/.exported_symbols.DM_1_02_105 b/libdm/.exported_symbols.DM_1_02_105
index 4707164..b1556fa 100644
--- a/libdm/.exported_symbols.DM_1_02_105
+++ b/libdm/.exported_symbols.DM_1_02_105
@@ -1,3 +1,4 @@
dm_report_is_empty
dm_stats_get_area_offset
dm_stats_get_current_area_offset
+dm_timestamp_copy
8 years, 9 months
dev-prajnoha-pv-ext-flag-used - conf: Regenerate example.conf.
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=15e20bb5c01190...
Commit: 15e20bb5c01190217969c4b2e42926af3709223c
Parent: 80bc87e377cbcc10225e1d2b58d6e84b65b449de
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Mon Aug 17 16:51:43 2015 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Mon Aug 17 16:51:43 2015 +0100
conf: Regenerate example.conf.
---
conf/example.conf.in | 69 +++++++++++++++++++++++++++++++++----------------
1 files changed, 46 insertions(+), 23 deletions(-)
diff --git a/conf/example.conf.in b/conf/example.conf.in
index 3900ad4..014aa1a 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -204,7 +204,7 @@ devices {
# Configuration option devices/default_data_alignment.
# Default alignment of the start of a PV data area in MB.
- # If set to 0, a value of 64KB will be used.
+ # If set to 0, a value of 64KiB will be used.
# Set to 1 for 1MiB, 2 for 2MiB, etc.
# default_data_alignment = 1
@@ -222,7 +222,7 @@ devices {
data_alignment_detection = 1
# Configuration option devices/data_alignment.
- # Alignment of the start of a PV data area in KB.
+ # Alignment of the start of a PV data area in KiB.
# If a PV is placed directly on an md device and
# md_chunk_alignment or data_alignment_detection are enabled,
# then this setting is ignored. Otherwise, md_chunk_alignment
@@ -234,10 +234,10 @@ devices {
# Detect PV data alignment offset based on sysfs device information.
# The start of a PV aligned data area will be shifted by the
# alignment_offset exposed in sysfs. This offset is often 0, but
- # may be non-zero. Certain 4KB sector drives that compensate for
+ # may be non-zero. Certain 4KiB sector drives that compensate for
# windows partitioning will have an alignment_offset of 3584 bytes
- # (sector 7 is the lowest aligned logical block, the 4KB sectors start
- # at LBA -1, and consequently sector 63 is aligned on a 4KB boundary).
+ # (sector 7 is the lowest aligned logical block, the 4KiB sectors start
+ # at LBA -1, and consequently sector 63 is aligned on a 4KiB boundary).
# pvcreate --dataalignmentoffset will skip this detection.
data_alignment_offset_detection = 1
@@ -282,9 +282,9 @@ devices {
require_restorefile_with_uuid = 1
# Configuration option devices/pv_min_size.
- # Minimum size (in KB) of block devices which can be used as PVs.
+ # Minimum size in KiB of block devices which can be used as PVs.
# In a clustered environment all nodes must use the same value.
- # Any value smaller than 512KB is ignored. The previous built-in
+ # Any value smaller than 512KiB is ignored. The previous built-in
# value was 512.
pv_min_size = 2048
@@ -303,7 +303,7 @@ devices {
}
# Configuration section allocation.
-# How LVM selects free space for Logical Volumes.
+# How LVM selects space and applies properties to LVs.
allocation {
# Configuration option allocation/cling_tag_list.
@@ -348,7 +348,7 @@ allocation {
# Look for and erase any signatures while zeroing a new LV.
# Zeroing is controlled by the -Z/--zero option, and if not
# specified, zeroing is used by default if possible.
- # Zeroing simply overwrites the first 4 KiB of a new LV
+ # Zeroing simply overwrites the first 4KiB of a new LV
# with zeroes and does no signature detection or wiping.
# Signature wiping goes beyond zeroing and detects exact
# types and positions of signatures within the whole LV.
@@ -374,17 +374,31 @@ allocation {
# Cache pool metadata and data will always use different PVs.
cache_pool_metadata_require_separate_pvs = 0
- # Configuration option allocation/cache_pool_cachemode.
- # The default cache mode used for new cache pools.
+ # Configuration option allocation/cache_mode.
+ # The default cache mode used for new cache.
# Possible options are: writethrough, writeback.
# writethrough - Data blocks are immediately written from
# the cache to disk.
# writeback - Data blocks are written from the cache back
# to disk after some delay to improve performance.
- # cache_pool_cachemode = "writethrough"
+ # This setting replaces allocation/cache_pool_cachemode.
+ # cache_mode = "writethrough"
+
+ # Configuration option allocation/cache_policy.
+ # The default cache policy used for new cache volume.
+ # For the kernel 4.2 and newer the default policy is smq
+ # (Stochastic multique), otherwise the older mq (Multiqueue),
+ # policy is selected.
+ # This configuration option does not have a default value defined.
+
+ # Configuration section allocation/cache_settings.
+ # Individual settings for policies.
+ # See the help for individual policies for more info.
+ # cache_settings {
+ # }
# Configuration option allocation/cache_pool_chunk_size.
- # The minimal chunk size (in kiB) for cache pool volumes.
+ # The minimal chunk size in KiB for cache pool volumes.
# Using a chunk_size that is too large can result in wasteful
# use of the cache, where small reads and writes can cause
# large sections of an LV to be mapped into the cache. However,
@@ -392,8 +406,8 @@ allocation {
# overhead trying to manage the numerous chunks that become mapped
# into the cache. The former is more of a problem than the latter
# in most cases, so we default to a value that is on the smaller
- # end of the spectrum. Supported values range from 32(kiB) to
- # 1048576 in multiples of 32.
+ # end of the spectrum. Supported values range from 32KiB to
+ # 1GiB in multiples of 32.
# This configuration option does not have a default value defined.
# Configuration option allocation/thin_pool_metadata_require_separate_pvs.
@@ -424,17 +438,17 @@ allocation {
# thin_pool_chunk_size_policy = "generic"
# Configuration option allocation/thin_pool_chunk_size.
- # The minimal chunk size (in KB) for thin pool volumes.
+ # The minimal chunk size in KiB for thin pool volumes.
# Larger chunk sizes may improve performance for plain
# thin volumes, however using them for snapshot volumes
# is less efficient, as it consumes more space and takes
# extra time for copying. When unset, lvm tries to estimate
- # chunk size starting from 64KB. Supported values are in
- # the range 64 to 1048576.
+ # chunk size starting from 64KiB. Supported values are in
+ # the range 64KiB to 1GiB.
# This configuration option does not have a default value defined.
# Configuration option allocation/physical_extent_size.
- # Default physical extent size to use for new VGs (in KB).
+ # Default physical extent size in KiB to use for new VGs.
# physical_extent_size = 4096
}
@@ -779,11 +793,11 @@ global {
sparse_segtype_default = "@DEFAULT_SPARSE_SEGTYPE@"
# Configuration option global/lvdisplay_shows_full_device_path.
+ # Enable this to reinstate the previous lvdisplay name format.
# The default format for displaying LV names in lvdisplay was changed
# in version 2.02.89 to show the LV name and path separately.
# Previously this was always shown as /dev/vgname/lvname even when that
# was never a valid path in the /dev filesystem.
- # Enable this option to reinstate the previous format.
# lvdisplay_shows_full_device_path = 0
# Configuration option global/use_lvmetad.
@@ -889,6 +903,15 @@ global {
# thin_disabled_features = [ "discards", "block_size" ]
# This configuration option does not have a default value defined.
+ # Configuration option global/cache_disabled_features.
+ # Features to not use in the cache driver.
+ # This can be helpful for testing, or to avoid
+ # using a feature that is causing problems.
+ # Features: policy_mq, policy_smq.
+ # Example:
+ # cache_disabled_features = [ "policy_smq" ]
+ # This configuration option does not have a default value defined.
+
# Configuration option global/cache_check_executable.
# The full path to the cache_check command.
# LVM uses this command to check that a cache metadata
@@ -1031,12 +1054,12 @@ activation {
use_linear_target = 1
# Configuration option activation/reserved_stack.
- # Stack size in KB to reserve for use while devices are suspended.
+ # Stack size in KiB to reserve for use while devices are suspended.
# Insufficent reserve risks I/O deadlock during device suspension.
reserved_stack = 64
# Configuration option activation/reserved_memory.
- # Memory size in KB to reserve for use while devices are suspended.
+ # Memory size in KiB to reserve for use while devices are suspended.
# Insufficent reserve risks I/O deadlock during device suspension.
reserved_memory = 8192
@@ -1267,7 +1290,7 @@ activation {
monitoring = 1
# Configuration option activation/polling_interval.
- # Check pvmove or lvconvert progress at this interval (seconds)
+ # Check pvmove or lvconvert progress at this interval (seconds).
# When pvmove or lvconvert must wait for the kernel to finish
# synchronising or merging data, they check and report progress
# at intervals of this number of seconds.
8 years, 9 months
dev-prajnoha-pv-ext-flag-used - cache: more comments for new setting
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=80bc87e377cbcc...
Commit: 80bc87e377cbcc10225e1d2b58d6e84b65b449de
Parent: 77357081c8143d13d02aa0b7d5eb044a29aa65c3
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Aug 17 17:26:39 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Aug 17 17:26:39 2015 +0200
cache: more comments for new setting
---
WHATS_NEW | 1 +
lib/config/config_settings.h | 3 ++-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 7508794..8e6ca10 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.128 -
===================================
+ Allocation setting cache_pool_cachemode is replaced by cache_mode.
Don't attempt to close config file that couldn't be opened.
Check for valid cache mode in validation of cache segment.
Change internal interface handling cache mode and policy.
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index bdf7e6c..399f748 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -472,7 +472,8 @@ cfg(allocation_cache_mode_CFG, "cache_mode", allocation_CFG_SECTION, CFG_PROFILA
"writethrough - Data blocks are immediately written from\n"
"the cache to disk.\n"
"writeback - Data blocks are written from the cache back\n"
- "to disk after some delay to improve performance.\n")
+ "to disk after some delay to improve performance.\n"
+ "This setting replaces allocation/cache_pool_cachemode.\n")
cfg(allocation_cache_policy_CFG, "cache_policy", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, 0, vsn(2, 2, 128), NULL, 0, NULL,
"The default cache policy used for new cache volume.\n"
8 years, 9 months