master - post-release
by Alasdair Kergon
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
master - pre-release
by Alasdair Kergon
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
master - libdm-stats: only return uint64_t when required
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=4227b2ebb45341...
Commit: 4227b2ebb453410f00c0780d2d3a86b4dac4da24
Parent: 15e20bb5c01190217969c4b2e42926af3709223c
Author: Bryn M. Reeves <bmr(a)redhat.com>
AuthorDate: Mon Aug 17 15:23:27 2015 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Mon Aug 17 16:59:52 2015 +0100
libdm-stats: only return uint64_t when required
Several interfaced in libdm-stats return a uint64_t when it is
only used to signal success/failure: change all these uses to
return a simple int instead.
---
libdm/libdevmapper.h | 44 +++++++++++++++++++++++---------------------
libdm/libdm-stats.c | 40 ++++++++++++++++++++--------------------
2 files changed, 43 insertions(+), 41 deletions(-)
diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h
index bfc90da..af08ba3 100644
--- a/libdm/libdevmapper.h
+++ b/libdm/libdevmapper.h
@@ -697,12 +697,14 @@ int dm_stats_set_program_id(struct dm_stats *dms, int allow_empty,
*
* All values are returned in units of 512b sectors.
*/
-uint64_t dm_stats_get_region_start(const struct dm_stats *dms, uint64_t *start,
- uint64_t region_id);
-uint64_t dm_stats_get_region_len(const struct dm_stats *dms, uint64_t *len,
- uint64_t region_id);
-uint64_t dm_stats_get_region_area_len(const struct dm_stats *dms,
- uint64_t *area_len, uint64_t region_id);
+int dm_stats_get_region_start(const struct dm_stats *dms, uint64_t *start,
+ uint64_t region_id);
+
+int dm_stats_get_region_len(const struct dm_stats *dms, uint64_t *len,
+ uint64_t region_id);
+
+int dm_stats_get_region_area_len(const struct dm_stats *dms,
+ uint64_t *len, uint64_t region_id);
/*
* Area properties: start, offset and length.
@@ -720,11 +722,11 @@ uint64_t dm_stats_get_region_area_len(const struct dm_stats *dms,
*
* All values are returned in units of 512b sectors.
*/
-uint64_t dm_stats_get_area_start(const struct dm_stats *dms, uint64_t *start,
- uint64_t region_id, uint64_t area_id);
+int dm_stats_get_area_start(const struct dm_stats *dms, uint64_t *start,
+ uint64_t region_id, uint64_t area_id);
-uint64_t dm_stats_get_area_offset(const struct dm_stats *dms, uint64_t *offset,
- uint64_t region_id, uint64_t area_id);
+int dm_stats_get_area_offset(const struct dm_stats *dms, uint64_t *offset,
+ uint64_t region_id, uint64_t area_id);
/*
* Retrieve program_id and aux_data for a specific region. Only valid
@@ -864,14 +866,14 @@ uint64_t dm_stats_get_current_area(const struct dm_stats *dms);
*
* All values are returned in units of 512b sectors.
*/
-uint64_t dm_stats_get_current_region_start(const struct dm_stats *dms,
- uint64_t *start);
+int dm_stats_get_current_region_start(const struct dm_stats *dms,
+ uint64_t *start);
-uint64_t dm_stats_get_current_region_len(const struct dm_stats *dms,
- uint64_t *len);
+int dm_stats_get_current_region_len(const struct dm_stats *dms,
+ uint64_t *len);
-uint64_t dm_stats_get_current_region_area_len(const struct dm_stats *dms,
- uint64_t *area_len);
+int dm_stats_get_current_region_area_len(const struct dm_stats *dms,
+ uint64_t *area_len);
/*
* Current area properties: start and length.
@@ -881,13 +883,13 @@ uint64_t dm_stats_get_current_region_area_len(const struct dm_stats *dms,
*
* All values are returned in units of 512b sectors.
*/
-uint64_t dm_stats_get_current_area_start(const struct dm_stats *dms,
- uint64_t *start);
+int dm_stats_get_current_area_start(const struct dm_stats *dms,
+ uint64_t *start);
-uint64_t dm_stats_get_current_area_offset(const struct dm_stats *dms,
- uint64_t *offset);
+int dm_stats_get_current_area_offset(const struct dm_stats *dms,
+ uint64_t *offset);
-uint64_t dm_stats_get_current_area_len(const struct dm_stats *dms,
+int dm_stats_get_current_area_len(const struct dm_stats *dms,
uint64_t *start);
/*
diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c
index 50492f3..f8d0012 100644
--- a/libdm/libdm-stats.c
+++ b/libdm/libdm-stats.c
@@ -1280,7 +1280,7 @@ uint64_t dm_stats_get_current_area(const struct dm_stats *dms)
return dms->cur_area;
}
-uint64_t dm_stats_get_region_start(const struct dm_stats *dms, uint64_t *start,
+int dm_stats_get_region_start(const struct dm_stats *dms, uint64_t *start,
uint64_t region_id)
{
if (!dms || !dms->regions)
@@ -1289,7 +1289,7 @@ uint64_t dm_stats_get_region_start(const struct dm_stats *dms, uint64_t *start,
return 1;
}
-uint64_t dm_stats_get_region_len(const struct dm_stats *dms, uint64_t *len,
+int dm_stats_get_region_len(const struct dm_stats *dms, uint64_t *len,
uint64_t region_id)
{
if (!dms || !dms->regions)
@@ -1298,35 +1298,35 @@ uint64_t dm_stats_get_region_len(const struct dm_stats *dms, uint64_t *len,
return 1;
}
-uint64_t dm_stats_get_region_area_len(const struct dm_stats *dms, uint64_t *step,
- uint64_t region_id)
+int dm_stats_get_region_area_len(const struct dm_stats *dms, uint64_t *len,
+ uint64_t region_id)
{
if (!dms || !dms->regions)
return_0;
- *step = dms->regions[region_id].step;
+ *len = dms->regions[region_id].step;
return 1;
}
-uint64_t dm_stats_get_current_region_start(const struct dm_stats *dms,
- uint64_t *start)
+int dm_stats_get_current_region_start(const struct dm_stats *dms,
+ uint64_t *start)
{
return dm_stats_get_region_start(dms, start, dms->cur_region);
}
-uint64_t dm_stats_get_current_region_len(const struct dm_stats *dms,
- uint64_t *len)
+int dm_stats_get_current_region_len(const struct dm_stats *dms,
+ uint64_t *len)
{
return dm_stats_get_region_len(dms, len, dms->cur_region);
}
-uint64_t dm_stats_get_current_region_area_len(const struct dm_stats *dms,
- uint64_t *step)
+int dm_stats_get_current_region_area_len(const struct dm_stats *dms,
+ uint64_t *step)
{
return dm_stats_get_region_area_len(dms, step, dms->cur_region);
}
-uint64_t dm_stats_get_area_start(const struct dm_stats *dms, uint64_t *start,
- uint64_t region_id, uint64_t area_id)
+int dm_stats_get_area_start(const struct dm_stats *dms, uint64_t *start,
+ uint64_t region_id, uint64_t area_id)
{
struct dm_stats_region *region = &dms->regions[region_id];
if (!dms || !dms->regions)
@@ -1335,8 +1335,8 @@ uint64_t dm_stats_get_area_start(const struct dm_stats *dms, uint64_t *start,
return 1;
}
-uint64_t dm_stats_get_area_offset(const struct dm_stats *dms, uint64_t *offset,
- uint64_t region_id, uint64_t area_id)
+int dm_stats_get_area_offset(const struct dm_stats *dms, uint64_t *offset,
+ uint64_t region_id, uint64_t area_id)
{
if (!dms || !dms->regions)
return_0;
@@ -1344,22 +1344,22 @@ uint64_t dm_stats_get_area_offset(const struct dm_stats *dms, uint64_t *offset,
return 1;
}
-uint64_t dm_stats_get_current_area_start(const struct dm_stats *dms,
- uint64_t *start)
+int dm_stats_get_current_area_start(const struct dm_stats *dms,
+ uint64_t *start)
{
return dm_stats_get_area_start(dms, start,
dms->cur_region, dms->cur_area);
}
-uint64_t dm_stats_get_current_area_offset(const struct dm_stats *dms,
+int dm_stats_get_current_area_offset(const struct dm_stats *dms,
uint64_t *offset)
{
return dm_stats_get_area_offset(dms, offset,
dms->cur_region, dms->cur_area);
}
-uint64_t dm_stats_get_current_area_len(const struct dm_stats *dms,
- uint64_t *len)
+int dm_stats_get_current_area_len(const struct dm_stats *dms,
+ uint64_t *len)
{
return dm_stats_get_region_area_len(dms, len, dms->cur_region);
}
8 years, 9 months
master - conf: Regenerate example.conf.
by Alasdair Kergon
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
master - cache: more comments for new setting
by Zdenek Kabelac
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
master - tests: update thin test
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=77357081c8143d...
Commit: 77357081c8143d13d02aa0b7d5eb044a29aa65c3
Parent: 4b28383b1c5f84d5f4190dd19586082c23d6c904
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Aug 17 17:07:09 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Aug 17 17:07:09 2015 +0200
tests: update thin test
Since we now let pass activation of thin-pool 'off-by-one' for
plain 'vgchange -ay' update the test to use higher TID.
---
test/shell/lvextend-thin-metadata-dmeventd.sh | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/test/shell/lvextend-thin-metadata-dmeventd.sh b/test/shell/lvextend-thin-metadata-dmeventd.sh
index d7f5ccc..4e80f75 100644
--- a/test/shell/lvextend-thin-metadata-dmeventd.sh
+++ b/test/shell/lvextend-thin-metadata-dmeventd.sh
@@ -63,8 +63,9 @@ vgcreate -s 1M $vg $(cat DEVICES)
# Testing dmeventd autoresize
lvcreate -L200M -V500M -n thin -T $vg/pool 2>&1 | tee out
not grep "WARNING: Sum" out
+lvcreate -V2M -n thin2 $vg/pool
lvcreate -L2M -n $lv1 $vg
-lvchange -an $vg/thin $vg/pool
+lvchange -an $vg/thin $vg/thin2 $vg/pool
# Prepare some fake metadata with unmatching id
# Transaction_id is lower by 1 and there are no message -> ERROR
@@ -77,7 +78,7 @@ grep expected out
check inactive $vg pool_tmeta
# Transaction_id is higher by 1
-fake_metadata_ 10 2 >data
+fake_metadata_ 10 3 >data
"$LVM_TEST_THIN_RESTORE_CMD" -i data -o "$DM_DEV_DIR/mapper/$vg-$lv1"
lvconvert -y --thinpool $vg/pool --poolmetadata $vg/$lv1
not vgchange -ay $vg 2>&1 | tee out
@@ -86,7 +87,7 @@ grep expected out
check inactive $vg pool_tmeta
# Prepare some fake metadata prefilled to ~81% (>70%)
-fake_metadata_ 400 1 >data
+fake_metadata_ 400 2 >data
"$LVM_TEST_THIN_RESTORE_CMD" -i data -o "$DM_DEV_DIR/mapper/$vg-$lv1"
# Swap volume with restored fake metadata
8 years, 9 months
master - cache: move detection code to cache_set_policy
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=4b28383b1c5f84...
Commit: 4b28383b1c5f84d5f4190dd19586082c23d6c904
Parent: 94c56559ca485c32c0e5c7253d22159ab1bbc0ea
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Aug 17 15:35:43 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Aug 17 15:52:06 2015 +0200
cache: move detection code to cache_set_policy
Move code which runtime detects settings for cache_policy
out of config dir to cache seg handling code.
Also mark cache_mode as command profilable setting.
---
lib/config/config.c | 24 ------------------------
lib/config/config_settings.h | 4 ++--
lib/metadata/cache_manip.c | 35 +++++++++++++++++++++++++++++++++--
3 files changed, 35 insertions(+), 28 deletions(-)
diff --git a/lib/config/config.c b/lib/config/config.c
index ad2db76..d7a6cd9 100644
--- a/lib/config/config.c
+++ b/lib/config/config.c
@@ -2419,27 +2419,3 @@ int get_default_allocation_cache_pool_chunk_size_CFG(struct cmd_context *cmd, st
{
return DEFAULT_CACHE_POOL_CHUNK_SIZE * 2;
}
-
-const char *get_default_allocation_cache_policy_CFG(struct cmd_context *cmd, struct profile *profile)
-{
- const struct segment_type *segtype = get_segtype_from_string(cmd, "cache");
- unsigned attr = ~0;
-
- if (!segtype ||
- !segtype->ops->target_present ||
- !segtype->ops->target_present(cmd, NULL, &attr)) {
- log_warn("WARNING: Cannot detect default cache policy, using \""
- DEFAULT_CACHE_POLICY "\".");
- return DEFAULT_CACHE_POLICY;
- }
-
- if (attr & CACHE_FEATURE_POLICY_SMQ)
- return "smq";
-
- if (attr & CACHE_FEATURE_POLICY_MQ)
- return "mq";
-
- log_warn("WARNING: Default cache policy not available.");
-
- return NULL;
-}
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index f18d173..bdf7e6c 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -466,7 +466,7 @@ cfg(allocation_cache_pool_cachemode_CFG, "cache_pool_cachemode", allocation_CFG_
"This has been replaced by the allocation/cache_mode setting.\n",
"Cache mode.\n")
-cfg(allocation_cache_mode_CFG, "cache_mode", allocation_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_CACHE_MODE, vsn(2, 2, 128), NULL, 0, NULL,
+cfg(allocation_cache_mode_CFG, "cache_mode", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_CACHE_MODE, vsn(2, 2, 128), NULL, 0, NULL,
"The default cache mode used for new cache.\n"
"Possible options are: writethrough, writeback.\n"
"writethrough - Data blocks are immediately written from\n"
@@ -474,7 +474,7 @@ cfg(allocation_cache_mode_CFG, "cache_mode", allocation_CFG_SECTION, CFG_DEFAULT
"writeback - Data blocks are written from the cache back\n"
"to disk after some delay to improve performance.\n")
-cfg_runtime(allocation_cache_policy_CFG, "cache_policy", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, vsn(2, 2, 128), 0, NULL,
+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"
"For the kernel 4.2 and newer the default policy is smq\n"
"(Stochastic multique), otherwise the older mq (Multiqueue),\n"
diff --git a/lib/metadata/cache_manip.c b/lib/metadata/cache_manip.c
index fbd0663..30d890c 100644
--- a/lib/metadata/cache_manip.c
+++ b/lib/metadata/cache_manip.c
@@ -434,6 +434,34 @@ int lv_is_cache_origin(const struct logical_volume *lv)
return seg && lv_is_cache(seg->lv) && !lv_is_pending_delete(seg->lv) && (seg_lv(seg, 0) == lv);
}
+static const char *_get_default_cache_policy(struct cmd_context *cmd)
+{
+ const struct segment_type *segtype = get_segtype_from_string(cmd, "cache");
+ unsigned attr = ~0;
+ const char *def = NULL;
+
+ if (!segtype ||
+ !segtype->ops->target_present ||
+ !segtype->ops->target_present(cmd, NULL, &attr)) {
+ log_warn("WARNING: Cannot detect default cache policy, using \""
+ DEFAULT_CACHE_POLICY "\".");
+ return DEFAULT_CACHE_POLICY;
+ }
+
+ if (attr & CACHE_FEATURE_POLICY_SMQ)
+ def = "smq";
+ else if (attr & CACHE_FEATURE_POLICY_MQ)
+ def = "mq";
+ else {
+ log_error("Default cache policy is not available.");
+ return NULL;
+ }
+
+ log_debug_metadata("Detected default cache_policy \"%s\".", def);
+
+ return def;
+}
+
int cache_set_policy(struct lv_segment *seg, const char *name,
const struct dm_config_tree *settings)
{
@@ -451,8 +479,11 @@ int cache_set_policy(struct lv_segment *seg, const char *name,
log_error("Failed to duplicate policy name.");
return 0;
}
- } else if (!seg->policy_name && passed_seg_is_cache)
- seg->policy_name = find_config_tree_str(seg->lv->vg->cmd, allocation_cache_policy_CFG, NULL);
+ } else if (!seg->policy_name && passed_seg_is_cache) {
+ if (!(seg->policy_name = find_config_tree_str(seg->lv->vg->cmd, allocation_cache_policy_CFG, NULL)) &&
+ !(seg->policy_name = _get_default_cache_policy(seg->lv->vg->cmd)))
+ return_0;
+ }
if (settings) {
if (!seg->policy_name) {
8 years, 9 months
master - dmsetup: fix usage of ifdefs
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=94c56559ca485c...
Commit: 94c56559ca485c32c0e5c7253d22159ab1bbc0ea
Parent: 427d0a5e925d86145df12313aa36d5c61ff59bd5
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Aug 17 15:11:00 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Aug 17 15:52:06 2015 +0200
dmsetup: fix usage of ifdefs
---
tools/dmsetup.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/dmsetup.c b/tools/dmsetup.c
index 097f1fd..dc002b0 100644
--- a/tools/dmsetup.c
+++ b/tools/dmsetup.c
@@ -48,11 +48,11 @@
# include <sys/ioctl.h>
#endif
-#if HAVE_SYS_TIMERFD_H
+#ifdef HAVE_SYS_TIMERFD_H
# include <sys/timerfd.h>
#endif
-#if HAVE_TERMIOS_H
+#ifdef HAVE_TERMIOS_H
# include <termios.h>
#endif
@@ -532,7 +532,7 @@ static uint64_t _interval_num(void)
return 1 + (uint64_t) _int_args[COUNT_ARG] - _count;
}
-#if HAVE_SYS_TIMERFD_H
+#ifdef HAVE_SYS_TIMERFD_H
static int _start_timerfd_timer(void)
{
struct itimerspec interval_timer;
8 years, 9 months
master - libdm: ensure dm_stats_get_area_offset() returns a value
by Bryn Reeves
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=427d0a5e925d86...
Commit: 427d0a5e925d86145df12313aa36d5c61ff59bd5
Parent: 623b46a17d4163b42f9f65c41d5c8d8f95ec95c5
Author: Bryn M. Reeves <bmr(a)redhat.com>
AuthorDate: Mon Aug 17 13:56:44 2015 +0100
Committer: Bryn M. Reeves <bmr(a)redhat.com>
CommitterDate: Mon Aug 17 14:40:48 2015 +0100
libdm: ensure dm_stats_get_area_offset() returns a value
---
libdm/libdm-stats.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c
index 400b12d..50492f3 100644
--- a/libdm/libdm-stats.c
+++ b/libdm/libdm-stats.c
@@ -1341,6 +1341,7 @@ uint64_t dm_stats_get_area_offset(const struct dm_stats *dms, uint64_t *offset,
if (!dms || !dms->regions)
return_0;
*offset = dms->regions[region_id].step * area_id;
+ return 1;
}
uint64_t dm_stats_get_current_area_start(const struct dm_stats *dms,
8 years, 9 months
master - device: Don't try to close config file on failure.
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=623b46a17d4163...
Commit: 623b46a17d4163b42f9f65c41d5c8d8f95ec95c5
Parent: a606966029d411a1336eb5bc2f99a4162e0d97d6
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Mon Aug 17 12:57:01 2015 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Mon Aug 17 12:57:01 2015 +0100
device: Don't try to close config file on failure.
$file: open failed: Permission denied
Failed to load config file $file
Attempt to close device '$file' which is not open.
---
WHATS_NEW | 1 +
lib/config/config.c | 5 ++++-
lib/device/dev-cache.c | 10 ++++++++++
lib/device/dev-io.c | 8 ++------
lib/device/device.h | 1 +
5 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index dbb78d6..7508794 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.128 -
===================================
+ 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.
When no cache policy specified, prefer smq (if available) over mq.
diff --git a/lib/config/config.c b/lib/config/config.c
index cd6c1d8..ad2db76 100644
--- a/lib/config/config.c
+++ b/lib/config/config.c
@@ -582,8 +582,11 @@ int config_file_read(struct dm_config_tree *cft)
if (!(cf->dev = dev_create_file(filename, NULL, NULL, 1)))
return_0;
- if (!dev_open_readonly_buffered(cf->dev))
+ if (!dev_open_readonly_buffered(cf->dev)) {
+ dev_destroy_file(cf->dev);
+ cf->dev = NULL;
return_0;
+ }
}
r = config_file_read_fd(cft, cf->dev, 0, (size_t) info.st_size, 0, 0,
diff --git a/lib/device/dev-cache.c b/lib/device/dev-cache.c
index e58ac0f..043a722 100644
--- a/lib/device/dev-cache.c
+++ b/lib/device/dev-cache.c
@@ -71,6 +71,16 @@ static void _dev_init(struct device *dev, int max_error_count)
dm_list_init(&dev->open_list);
}
+void dev_destroy_file(struct device *dev)
+{
+ if (!(dev->flags & DEV_ALLOCED))
+ return;
+
+ dm_free((void *) dm_list_item(dev->aliases.n, struct dm_str_list)->str);
+ dm_free(dev->aliases.n);
+ dm_free(dev);
+}
+
struct device *dev_create_file(const char *filename, struct device *dev,
struct dm_str_list *alias, int use_malloc)
{
diff --git a/lib/device/dev-io.c b/lib/device/dev-io.c
index d712f31..8c2388b 100644
--- a/lib/device/dev-io.c
+++ b/lib/device/dev-io.c
@@ -586,12 +586,8 @@ static void _close(struct device *dev)
log_debug_devs("Closed %s", dev_name(dev));
- if (dev->flags & DEV_ALLOCED) {
- dm_free((void *) dm_list_item(dev->aliases.n, struct dm_str_list)->
- str);
- dm_free(dev->aliases.n);
- dm_free(dev);
- }
+ if (dev->flags & DEV_ALLOCED)
+ dev_destroy_file(dev);
}
static int _dev_close(struct device *dev, int immediate)
diff --git a/lib/device/device.h b/lib/device/device.h
index dcc3713..733b0d0 100644
--- a/lib/device/device.h
+++ b/lib/device/device.h
@@ -123,6 +123,7 @@ void dev_flush(struct device *dev);
struct device *dev_create_file(const char *filename, struct device *dev,
struct dm_str_list *alias, int use_malloc);
+void dev_destroy_file(struct device *dev);
/* Return a valid device name from the alias list; NULL otherwise */
const char *dev_name_confirmed(struct device *dev, int quiet);
8 years, 9 months