Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1307fafe0f72cea9…
Commit: 1307fafe0f72cea9b3f2e7e7fdb70b1b5d0a0670
Parent: 9886fd236e2cf09f299589e0e2b6cb7454b2314a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Aug 24 11:20:29 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Aug 26 11:24:41 2015 +0200
man: replace to with for
Better word.
---
man/lvconvert.8.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/man/lvconvert.8.in b/man/lvconvert.8.in
index c2ee2b2..4438893 100644
--- a/man/lvconvert.8.in
+++ b/man/lvconvert.8.in
@@ -326,7 +326,7 @@ operation from its arguments.
Separates \fICacheLogicalVolume\fP from cache pool.
Before the logical volume becomes uncached, cache is flushed.
The cache pool volume is then left unused and
-could be used e.g. to caching another volume.
+could be used e.g. for caching another volume.
See also the option \fB\-\-uncache\fP for uncaching and removing
cache pool with one command.
.TP
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=19ef3e0f31f375be…
Commit: 19ef3e0f31f375be72da875a5e6beb5d10af44df
Parent: 463f59eca4330300c549b40603065b8640fdb790
Author: Bryn M. Reeves <bmr(a)redhat.com>
AuthorDate: Tue Aug 25 18:18:34 2015 +0100
Committer: Bryn M. Reeves <bmr(a)redhat.com>
CommitterDate: Tue Aug 25 18:51:57 2015 +0100
makefiles: fix ld version script generation for older make versions
Commit 82a27a8 introduced a change to the symbol versioning macros
that allows a new version of a function to be introduced while
keeping the old behaviour via a versioned symbol export. The new
symbol is listed in the current .exported_symbols.DM_* file and a
default (@@VERSION) binding is created during linking.
This broke the build on RHEL5, RHEL6 and Debian Lenny. This is
because the make version in these distros returns results from the
$(wildcard *) command in a different order to the RHEL7 and F22
versions: this affects the ordering of the generated .export.sym
version script:
RHEL7/F22
for i in ./.exported_symbols.Base ./.exported_symbols.DM_1_02_99
./.exported_symbols.DM_1_02_98 ./.exported_symbols.DM_1_02_97
./.exported_symbols.DM_1_02_106 ./.exported_symbols.DM_1_02_105
./.exported_symbols.DM_1_02_103 ./.exported_symbols.DM_1_02_101
./.exported_symbols.DM_1_02_104 ./.exported_symbols.DM_1_02_100
290: 000000000003d101 106 FUNC GLOBAL DEFAULT 12 dm_stats_create_region_v1_02_104
*388: 000000000003cfc7 314 FUNC GLOBAL DEFAULT 12 dm_stats_create_region@@DM_1_02_106
391: 000000000003d101 106 FUNC GLOBAL DEFAULT 12 dm_stats_create_region@DM_1_02_104
*552: 000000000003cfc7 314 FUNC GLOBAL DEFAULT 12 dm_stats_create_region
944: 000000000003d101 106 FUNC GLOBAL DEFAULT 12 dm_stats_create_region_v1_02_104
992: 000000000003d101 106 FUNC GLOBAL DEFAULT 12 dm_stats_create_region@DM_1_02_104
RHEL6:
for i in ./.exported_symbols.Base ./.exported_symbols.DM_1_02_100
./.exported_symbols.DM_1_02_101 ./.exported_symbols.DM_1_02_103
./.exported_symbols.DM_1_02_104 ./.exported_symbols.DM_1_02_105
./.exported_symbols.DM_1_02_106 ./.exported_symbols.DM_1_02_97
./.exported_symbols.DM_1_02_98 ./.exported_symbols.DM_1_02_99; do\
290: 000000000003d0e1 106 FUNC GLOBAL DEFAULT 12 dm_stats_create_region_v1_02_104
390: 000000000003d0e1 106 FUNC GLOBAL DEFAULT 12 dm_stats_create_region@DM_1_02_104
*479: 000000000003cfa7 314 FUNC LOCAL DEFAULT 12 dm_stats_create_region
944: 000000000003d0e1 106 FUNC GLOBAL DEFAULT 12 dm_stats_create_region_v1_02_104
992: 000000000003d0e1 106 FUNC GLOBAL DEFAULT 12 dm_stats_create_region@DM_1_02_104
The F22 build has the correct behaviour (although the sort order is
inconsistent) but on RHEL6 the 1_02_106 symbol file appears after
version 1_02_104 which introduced the original symbol. This causes
the later version of the symbol to lose its version binding and be
reduced to local scope.
If using un-versioned exports of the current version of a symbol
(i.e. exported with the plain symbol name and no macro) and using
the linker script to set the symbol version, the current version
node must appear first in the version script: the un-versioned
symbol will be bound to the first version node found that contains
it.
On RHEL6 and the other older distros the original version of the
dm_stats_create_region() call sorted before the current version
(DM_1_02_104 vs. DM_1_02_106) leading to a subsequent link error for
the later symbol version:
dmsetup.o: In function `_do_stats_create_regions':
/root/src/git/lvm2/tools/dmsetup.c:4658: undefined reference to
`dm_stats_create_region'
Ensure that the ordering of entries in the version script is
consistent to avoid an old implementation shadowing a newer one by
sorting the list of file names before the loop:
$$(echo $(EXPORTED_SYMBOLS) | tr ' ' '\n' | sort -rnt_ -k5 )
This only sorts by patch level but this is sufficient to maintain
the correct order for current version files.
Tested on RHEL5, 6, 7 and F22.
---
make.tmpl.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/make.tmpl.in b/make.tmpl.in
index e4f8835..3e39a3a 100644
--- a/make.tmpl.in
+++ b/make.tmpl.in
@@ -502,7 +502,7 @@ else
set -e;\
R=$$(sort $^ | uniq -u);\
test -z "$$R" || { echo "Mismatch between symbols in shared library and lists in .exported_symbols.* files: $$R"; false; } ;\
- for i in $(EXPORTED_SYMBOLS); do\
+ for i in $$(echo $(EXPORTED_SYMBOLS) | tr ' ' '\n' | sort -rnt_ -k5 )); do\
echo "$${i##*.} {"; echo " global:";\
$(SED) "s/^/ /;s/$$/;/" $$i;\
test "$$i" = Base && { echo " local:"; echo " *;"; };\
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=e4145ebc47a833d4…
Commit: e4145ebc47a833d443a7c8bcec26d9d2ec9e5518
Parent: 567189cc7617a4d239d0f2ea052801fe2573d011
Author: Bryn M. Reeves <bmr(a)redhat.com>
AuthorDate: Tue Aug 18 12:39:34 2015 +0100
Committer: Bryn M. Reeves <bmr(a)redhat.com>
CommitterDate: Mon Aug 24 20:03:21 2015 +0100
dmstats: add --precise switch to enable nanosecond counters.
---
WHATS_NEW_DM | 1 +
man/dmstats.8.in | 9 +++++++++
tools/dmsetup.c | 16 ++++++++++++++--
3 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index e083231..01ceefb 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
Version 1.02.106 -
===================================
+ Add --precise switch to 'dmstats create' to request nanosecond counters.
Add precise argument to dm_stats_create_region().
Add support to libdm-stats for precise_timestamps
diff --git a/man/dmstats.8.in b/man/dmstats.8.in
index bdcf742..ad5f952 100644
--- a/man/dmstats.8.in
+++ b/man/dmstats.8.in
@@ -32,6 +32,7 @@ dmstats \(em device-mapper statistics management
.IR nr_areas ]
.RB |[ \-\-areasize
.IR area_size ]]
+.RB [ \-\-precise ]
.RB [[ \-\-start
.IR start_sector ]
.RB [ \-\-length
@@ -181,6 +182,10 @@ Specify which report fields to display.
Sort output according to the list of fields given. Precede any
sort_field with - for a reverse sort on that column.
.TP
+.BR \-\-precise
+Attempt to use nanosecond precision counters when creating new
+statistics regions.
+.TP
.B \-\-programid \fIid
Specify a program ID string. When creating new statistics regions this
string is stored with the region. Subsequent operations may supply a
@@ -240,6 +245,7 @@ regions (with the exception of in-flight IO counters).
.IR nr_areas ]
.RB [ \-\-areasize
.IR area_size ]
+.RB [ \-\-precise ]
.RB [[ \-\-start
.IR start_sector ]
.RB [ \-\-length
@@ -259,6 +265,9 @@ at an arbitrary offset into the device. The \fB\-\-segments\fP option
causes a new region to be created for each target in the corresponding
device-mapper device's table.
+If the \fB\-\-precise\fP option is used the command will attempt to
+create a region using nanosecond precision counters.
+
An optional \fBprogram_id\fP or \fBaux_data\fP string may be associated
with the region. A \fBprogram_id\fP may then be used to select regions
for subsequent list, print, and report operations. The \fBaux_data\fP
diff --git a/tools/dmsetup.c b/tools/dmsetup.c
index b8376dd..e98bdcd 100644
--- a/tools/dmsetup.c
+++ b/tools/dmsetup.c
@@ -190,6 +190,7 @@ enum {
NOUDEVRULES_ARG,
NOUDEVSYNC_ARG,
OPTIONS_ARG,
+ PRECISE_ARG,
PROGRAM_ID_ARG,
RAW_ARG,
READAHEAD_ARG,
@@ -4473,7 +4474,7 @@ static int _do_stats_create_regions(struct dm_stats *dms,
struct dm_info info;
void *next = NULL;
const char *devname = NULL;
- int r = 0;
+ int r = 0, precise = _switches[PRECISE_ARG];
if (!(dmt = dm_task_create(DM_DEVICE_TABLE))) {
dm_stats_destroy(dms);
@@ -4520,7 +4521,7 @@ static int _do_stats_create_regions(struct dm_stats *dms,
this_len = (segments) ? segment_len : this_len;
if (!dm_stats_create_region(dms, ®ion_id,
this_start, this_len, step,
- -1,
+ precise,
program_id, aux_data)) {
log_error("%s: Could not create statistics region.",
devname);
@@ -4631,6 +4632,14 @@ static int _stats_create(CMD_ARGS)
if (!_bind_stats_device(dms, name))
goto_out;
+ if (_switches[PRECISE_ARG]) {
+ if (!dm_stats_driver_supports_precise()) {
+ log_error("Using --precise requires driver version "
+ "4.32.0 or later.");
+ goto out;
+ }
+ }
+
if (!strlen(program_id))
/* force creation of a region with no id */
dm_stats_set_program_id(dms, 1, NULL);
@@ -5497,6 +5506,7 @@ static int _process_switches(int *argcp, char ***argvp, const char *dev_dir)
{"noudevrules", 0, &ind, NOUDEVRULES_ARG},
{"noudevsync", 0, &ind, NOUDEVSYNC_ARG},
{"options", 1, &ind, OPTIONS_ARG},
+ {"precise", 0, &ind, PRECISE_ARG},
{"programid", 1, &ind, PROGRAM_ID_ARG},
{"raw", 0, &ind, RAW_ARG},
{"readahead", 1, &ind, READAHEAD_ARG},
@@ -5648,6 +5658,8 @@ static int _process_switches(int *argcp, char ***argvp, const char *dev_dir)
_switches[PROGRAM_ID_ARG]++;
_string_args[PROGRAM_ID_ARG] = optarg;
}
+ if (ind == PRECISE_ARG)
+ _switches[PRECISE_ARG]++;
if (ind == RAW_ARG)
_switches[RAW_ARG]++;
if (ind == REGION_ID_ARG) {