master - cleanup: share the nonremoval message
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=89a8c7bea6df1d...
Commit: 89a8c7bea6df1d52818837f5a6778d7ae3e9626c
Parent: 3cb9041764005c3a8f59b0b5ede3808b660d001a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Nov 12 15:08:35 2013 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Nov 15 12:38:37 2013 +0100
cleanup: share the nonremoval message
Use common goto label for not remove log error.
---
lib/metadata/lv_manip.c | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 4a224e4..e22aaa2 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -4709,10 +4709,8 @@ int lv_remove_with_dependencies(struct cmd_context *cmd, struct logical_volume *
} else if ((snap_percent == PERCENT_MERGE_FAILED) &&
(force == PROMPT) &&
yes_no_prompt("Removing snapshot \"%s\" that failed to merge may leave origin \"%s\" inconsistent. "
- "Proceed? [y/n]: ", lv->name, origin_from_cow(lv)->name) == 'n') {
- log_error("Logical volume %s not removed.", lv->name);
- return 0;
- }
+ "Proceed? [y/n]: ", lv->name, origin_from_cow(lv)->name) == 'n')
+ goto no_remove;
}
} else if (!level && lv_is_virtual_origin(origin = origin_from_cow(lv)))
/* If this is a sparse device, remove its origin too. */
@@ -4727,10 +4725,8 @@ int lv_remove_with_dependencies(struct cmd_context *cmd, struct logical_volume *
!lv_is_active(lv) &&
yes_no_prompt("Removing origin %s will also remove %u "
"snapshots(s). Proceed? [y/n]: ",
- lv->name, lv->origin_count) == 'n') {
- log_error("Logical volume %s not removed.", lv->name);
- return 0;
- }
+ lv->name, lv->origin_count) == 'n')
+ goto no_remove;
dm_list_iterate_safe(snh, snht, &lv->snapshot_segs)
if (!lv_remove_with_dependencies(cmd, dm_list_struct_base(snh, struct lv_segment,
@@ -4766,12 +4762,15 @@ int lv_remove_with_dependencies(struct cmd_context *cmd, struct logical_volume *
(force == PROMPT) &&
(yes_no_prompt("Removal of pool metadata spare logical volume \"%s\" "
"disables automatic recovery attempts after damage "
- "to a thin pool. Proceed? [y/n]: ", lv->name) == 'n')) {
- log_error("Logical volume \"%s\" not removed.", lv->name);
- return 0;
- }
+ "to a thin pool. Proceed? [y/n]: ", lv->name) == 'n'))
+ goto no_remove;
return lv_remove_single(cmd, lv, force);
+
+no_remove:
+ log_error("Logical volume \"%s\" not removed.", lv->name);
+
+ return 0;
}
/*
10 years, 6 months
master - cleanup: do not pass uninitialized space to selinux.
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3cb9041764005c...
Commit: 3cb9041764005c3a8f59b0b5ede3808b660d001a
Parent: eb4b03768f3ae751518b77b69882539e0c864a90
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Sep 24 14:47:32 2013 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Nov 15 12:38:37 2013 +0100
cleanup: do not pass uninitialized space to selinux.
Just like with dm_prepare_selinux_context rather initialize to NULL.
---
libdm/libdm-common.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c
index febcd0e..5ec5769 100644
--- a/libdm/libdm-common.c
+++ b/libdm/libdm-common.c
@@ -899,7 +899,7 @@ int dm_prepare_selinux_context(const char *path, mode_t mode)
int dm_set_selinux_context(const char *path, mode_t mode)
{
#ifdef HAVE_SELINUX
- security_context_t scontext;
+ security_context_t scontext = NULL;
if (is_selinux_enabled() <= 0)
return 1;
10 years, 6 months
master - libdm: catch wrongly reported values
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=eb4b03768f3ae7...
Commit: eb4b03768f3ae751518b77b69882539e0c864a90
Parent: 37b7c6707952b0cca2c583f2a48f997c94576a70
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Nov 15 12:16:50 2013 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Nov 15 12:38:37 2013 +0100
libdm: catch wrongly reported values
Add internal error warning when string value is used
as sort value for numerical field.
Using log_warn since the function itself does not return error,
so we do not confuse log_error() checker.
---
WHATS_NEW_DM | 1 +
libdm/libdm-report.c | 4 ++++
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index e3953e4..24d53af 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
Version 1.02.84 -
====================================
+ Catch invalid use of string sort values when reporting numerical fields.
Version 1.02.83 - 13th November 2013
====================================
diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c
index 0984416..7e8484e 100644
--- a/libdm/libdm-report.c
+++ b/libdm/libdm-report.c
@@ -240,6 +240,10 @@ void dm_report_field_set_value(struct dm_report_field *field, const void *value,
{
field->report_string = (const char *) value;
field->sort_value = sortvalue ? : value;
+
+ if ((field->sort_value == value) &&
+ (field->props->flags & DM_REPORT_FIELD_TYPE_NUMBER))
+ log_warn(INTERNAL_ERROR "Using string as sort value for numerical field.");
}
/*
10 years, 6 months
master - thin: report thin device id
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=37b7c6707952b0...
Commit: 37b7c6707952b0cca2c583f2a48f997c94576a70
Parent: 6ca832ceafe4ca599e059464faf2ef5760a29b23
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Nov 11 10:05:45 2013 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Nov 15 12:38:37 2013 +0100
thin: report thin device id
Support lvs -o+thin_id to report thin device id.
This device_id is connection between kernel and lvm2 user space thin
metadata.
---
WHATS_NEW | 1 +
lib/display/display.c | 1 +
lib/report/columns.h | 1 +
lib/report/properties.c | 2 ++
lib/report/report.c | 12 ++++++++++++
test/shell/lvcreate-thin.sh | 1 +
6 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index fb3b21a..0a4909a 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.105 -
=====================================
+ Add reporting of thin_id device id for thin volumes.
Fix reporting of empty numerical values.
Simplify reporting code.
diff --git a/lib/display/display.c b/lib/display/display.c
index d3b4d6e..be56f12 100644
--- a/lib/display/display.c
+++ b/lib/display/display.c
@@ -600,6 +600,7 @@ int lvdisplay_full(struct cmd_context *cmd,
if (lv_is_thin_volume(lv)) {
seg = first_seg(lv);
log_print("LV Pool name %s", seg->pool_lv->name);
+ log_print("LV Thin device ID %u", seg->device_id);
if (seg->origin)
log_print("LV Thin origin name %s",
seg->origin->name);
diff --git a/lib/report/columns.h b/lib/report/columns.h
index 6df9771..88a0266 100644
--- a/lib/report/columns.h
+++ b/lib/report/columns.h
@@ -122,6 +122,7 @@ FIELD(SEGS, seg, NUM, "#Thins", list, 4, thincount, thin_count, "For thin pools,
FIELD(SEGS, seg, STR, "Discards", list, 8, discards, discards, "For thin pools, how discards are handled.", 0)
FIELD(SEGS, seg, NUM, "Zero", list, 4, thinzero, zero, "For thin pools, if zeroing is enabled.", 0)
FIELD(SEGS, seg, NUM, "TransId", list, 4, transactionid, transaction_id, "For thin pools, the transaction id.", 0)
+FIELD(SEGS, seg, NUM, "ThId", list, 4, thinid, thin_id, "For thin volume, the thin device id.", 0)
FIELD(SEGS, seg, NUM, "Start", list, 5, segstart, seg_start, "Offset within the LV to the start of the segment in current units.", 0)
FIELD(SEGS, seg, NUM, "Start", list, 5, segstartpe, seg_start_pe, "Offset within the LV to the start of the segment in physical extents.", 0)
FIELD(SEGS, seg, NUM, "SSize", list, 5, segsize, seg_size, "Size of segment in current units.", 0)
diff --git a/lib/report/properties.c b/lib/report/properties.c
index 56200f0..8c48de1 100644
--- a/lib/report/properties.c
+++ b/lib/report/properties.c
@@ -307,6 +307,8 @@ GET_LVSEG_NUM_PROPERTY_FN(zero, lvseg->zero_new_blocks)
#define _zero_set prop_not_implemented_set
GET_LVSEG_NUM_PROPERTY_FN(transaction_id, lvseg->transaction_id)
#define _transaction_id_set prop_not_implemented_set
+GET_LVSEG_NUM_PROPERTY_FN(thin_id, lvseg->device_id)
+#define _thin_id_set prop_not_implemented_set
GET_LVSEG_STR_PROPERTY_FN(discards, lvseg_discards_dup(lvseg->lv->vg->vgmem, lvseg))
#define _discards_set prop_not_implemented_set
GET_LVSEG_NUM_PROPERTY_FN(seg_start, (SECTOR_SIZE * lvseg_start(lvseg)))
diff --git a/lib/report/report.c b/lib/report/report.c
index 1565aec..c780ca4 100644
--- a/lib/report/report.c
+++ b/lib/report/report.c
@@ -610,6 +610,18 @@ static int _transactionid_disp(struct dm_report *rh, struct dm_pool *mem,
return _field_set_value(field, "", &_minusone64);
}
+static int _thinid_disp(struct dm_report *rh, struct dm_pool *mem,
+ struct dm_report_field *field,
+ const void *data, void *private)
+{
+ const struct lv_segment *seg = (const struct lv_segment *) data;
+
+ if (seg_is_thin_volume(seg))
+ return dm_report_field_uint32(rh, field, &seg->device_id);
+
+ return _field_set_value(field, "", &_minusone64);
+}
+
static int _discards_disp(struct dm_report *rh, struct dm_pool *mem,
struct dm_report_field *field,
const void *data, void *private)
diff --git a/test/shell/lvcreate-thin.sh b/test/shell/lvcreate-thin.sh
index 743da3b..d2e3022 100644
--- a/test/shell/lvcreate-thin.sh
+++ b/test/shell/lvcreate-thin.sh
@@ -129,6 +129,7 @@ lvcreate -V2G --type thin --thinpool pool --name $vg/lv12 $vg
check lv_exists $vg lv1 lv2 lv3 lv4 lv5 lv6 lv7 lv8 lv9 lv10 lv11 lv12
check vg_field $vg lv_count 19
+check lv_field $vg/lv1 thin_id 7
lvremove -ff $vg
check vg_field $vg lv_count 0
10 years, 6 months
master - report: use _field_set_percent
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6ca832ceafe4ca...
Commit: 6ca832ceafe4ca599e059464faf2ef5760a29b23
Parent: 36d7c639d14e121e839b2117dcf744097e6ebfde
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Sep 23 11:03:02 2013 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Nov 15 11:05:03 2013 +0100
report: use _field_set_percent
Use common routine for displaying percentage.
---
lib/report/report.c | 131 ++++++++++-----------------------------------------
1 files changed, 25 insertions(+), 106 deletions(-)
diff --git a/lib/report/report.c b/lib/report/report.c
index 5caebb2..1565aec 100644
--- a/lib/report/report.c
+++ b/lib/report/report.c
@@ -34,6 +34,7 @@ struct lvm_report_object {
struct pv_segment *pvseg;
};
+static const uint64_t _hundred64 = UINT64_C(100);
static const uint64_t _minusone64 = UINT64_C(-1);
static const int32_t _minusone32 = INT32_C(-1);
static const uint64_t _zero64 = UINT64_C(0);
@@ -851,56 +852,23 @@ static int _snpercent_disp(struct dm_report *rh __attribute__((unused)), struct
{
const struct logical_volume *lv = (const struct logical_volume *) data;
percent_t snap_percent;
- uint64_t *sortval;
- char *repstr;
-
- /* Suppress snapshot percentage if not using driver */
- if (!activation()) {
- dm_report_field_set_value(field, "", NULL);
- return 1;
- }
-
- if (!(sortval = dm_pool_alloc(mem, sizeof(uint64_t)))) {
- log_error("dm_pool_alloc failed");
- return 0;
- }
- if ((!lv_is_cow(lv) && !lv_is_merging_origin(lv)) ||
- !lv_is_active_locally(lv)) {
- *sortval = UINT64_C(0);
- dm_report_field_set_value(field, "", sortval);
- return 1;
- }
+ if ((lv_is_cow(lv) || lv_is_merging_origin(lv)) &&
+ lv_snapshot_percent(lv, &snap_percent)) {
+ if ((snap_percent != PERCENT_INVALID) &&
+ (snap_percent != PERCENT_MERGE_FAILED))
+ return _field_set_percent(field, mem, snap_percent);
- if (!lv_snapshot_percent(lv, &snap_percent) ||
- (snap_percent == PERCENT_INVALID) || (snap_percent == PERCENT_MERGE_FAILED)) {
- if (!lv_is_merging_origin(lv)) {
- *sortval = UINT64_C(100);
- dm_report_field_set_value(field, "100.00", sortval);
- } else {
- /* onactivate merge that hasn't started yet would
- * otherwise display incorrect snap% in origin
- */
- *sortval = UINT64_C(0);
- dm_report_field_set_value(field, "", sortval);
- }
- return 1;
- }
+ if (!lv_is_merging_origin(lv))
+ return _field_set_value(field, "100.00", &_hundred64);
- if (!(repstr = dm_pool_zalloc(mem, 8))) {
- log_error("dm_pool_alloc failed");
- return 0;
+ /*
+ * on activate merge that hasn't started yet would
+ * otherwise display incorrect snap% in origin
+ */
}
- if (dm_snprintf(repstr, 7, "%.2f", percent_to_float(snap_percent)) < 0) {
- log_error("snapshot percentage too large");
- return 0;
- }
-
- *sortval = (uint64_t)(snap_percent * 1000.f);
- dm_report_field_set_value(field, repstr, sortval);
-
- return 1;
+ return _field_set_value(field, "", &_minusone64);
}
static int _copypercent_disp(struct dm_report *rh __attribute__((unused)),
@@ -910,44 +878,17 @@ static int _copypercent_disp(struct dm_report *rh __attribute__((unused)),
{
const struct logical_volume *lv = (const struct logical_volume *) data;
percent_t percent;
- uint64_t *sortval;
- char *repstr;
-
- if (!(sortval = dm_pool_alloc(mem, sizeof(uint64_t)))) {
- log_error("dm_pool_alloc failed");
- return 0;
- }
-
- if (lv->status & RAID) {
- if (!lv_raid_percent(lv, &percent) ||
- (percent == PERCENT_INVALID))
- goto no_copypercent;
- } else if ((!(lv->status & PVMOVE) && !(lv->status & MIRRORED)) ||
- !lv_mirror_percent(lv->vg->cmd, lv, 0, &percent, NULL) ||
- (percent == PERCENT_INVALID))
- goto no_copypercent;
- percent = copy_percent(lv);
+ if (((lv_is_raid(lv) && lv_raid_percent(lv, &percent)) ||
- if (!(repstr = dm_pool_zalloc(mem, 8))) {
- log_error("dm_pool_alloc failed");
- return 0;
+ ((lv->status & (PVMOVE | MIRRORED)) &&
+ lv_mirror_percent(lv->vg->cmd, lv, 0, &percent, NULL))) &&
+ (percent != PERCENT_INVALID)) {
+ percent = copy_percent(lv);
+ return _field_set_percent(field, mem, percent);
}
- if (dm_snprintf(repstr, 7, "%.2f", percent_to_float(percent)) < 0) {
- log_error("copy percentage too large");
- return 0;
- }
-
- *sortval = (uint64_t)(percent * 1000.f);
- dm_report_field_set_value(field, repstr, sortval);
-
- return 1;
-
-no_copypercent:
- *sortval = UINT64_C(0);
- dm_report_field_set_value(field, "", sortval);
- return 1;
+ return _field_set_value(field, "", &_minusone64);
}
static int _raidsyncaction_disp(struct dm_report *rh __attribute__((unused)),
@@ -1030,21 +971,12 @@ static int _dtpercent_disp(int metadata, struct dm_pool *mem,
const void *data, void *private)
{
const struct logical_volume *lv = (const struct logical_volume *) data;
- struct lvinfo info;
percent_t percent;
- uint64_t *sortval;
- char *repstr;
- /* Suppress data percent if not thin pool/volume or not using driver */
- if (!lv_info(lv->vg->cmd, lv, 1, &info, 0, 0) || !info.exists) {
- dm_report_field_set_value(field, "", NULL);
- return 1;
- }
-
- if (!(sortval = dm_pool_zalloc(mem, sizeof(uint64_t)))) {
- log_error("Failed to allocate sortval.");
- return 0;
- }
+ /* Suppress data percent if not using driver */
+ /* cannot use lv_is_active_locally - need to check for layer -tpool */
+ if (!lv_info(lv->vg->cmd, lv, 1, NULL, 0, 0))
+ return _field_set_value(field, "", &_minusone64);
if (lv_is_thin_pool(lv)) {
if (!lv_thin_pool_percent(lv, metadata, &percent))
@@ -1054,20 +986,7 @@ static int _dtpercent_disp(int metadata, struct dm_pool *mem,
return_0;
}
- if (!(repstr = dm_pool_alloc(mem, 8))) {
- log_error("Failed to allocate report buffer.");
- return 0;
- }
-
- if (dm_snprintf(repstr, 8, "%.2f", percent_to_float(percent)) < 0) {
- log_error("Data percentage too large.");
- return 0;
- }
-
- *sortval = (uint64_t)(percent * 1000.f);
- dm_report_field_set_value(field, repstr, sortval);
-
- return 1;
+ return _field_set_percent(field, mem, percent);
}
static int _datapercent_disp(struct dm_report *rh, struct dm_pool *mem,
10 years, 6 months
master - report: fix dereference of string as uint64_t
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=36d7c639d14e12...
Commit: 36d7c639d14e121e839b2117dcf744097e6ebfde
Parent: 9eb81b1bf74411bba6cc950a4ebe0a44856c0e74
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Sep 23 10:18:10 2013 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Nov 15 11:05:02 2013 +0100
report: fix dereference of string as uint64_t
Fix buggy usage of "" (empty string) as a numerical string
value used for sorting.
On intel 64b platform this was typically resolve
as 0xffffff0000000000 - which is already 'close' to
UINT64_MAX which is used for _minusone64.
On other platforms it might have been giving
different numbers depends on aligment of strings.
Use proper &_minusone64 for sorting value when the reported
value is NUM.
Note: each numerical value needs to be thought about if it needs
default value &_zero64 or &_minusone64 since for cases, were
value of zero is valid, sorting should not be mixing entries
together.
---
WHATS_NEW | 1 +
lib/report/report.c | 84 ++++++++++++++++++--------------------------------
2 files changed, 31 insertions(+), 54 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index b190ca4..fb3b21a 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.105 -
=====================================
+ Fix reporting of empty numerical values.
Simplify reporting code.
Version 2.02.104 - 13th November 2013
diff --git a/lib/report/report.c b/lib/report/report.c
index 697d642..5caebb2 100644
--- a/lib/report/report.c
+++ b/lib/report/report.c
@@ -591,13 +591,10 @@ static int _thinzero_disp(struct dm_report *rh, struct dm_pool *mem,
{
const struct lv_segment *seg = (const struct lv_segment *) data;
- /* Suppress thin count if not thin pool */
- if (!seg_is_thin_pool(seg)) {
- dm_report_field_set_value(field, "", NULL);
- return 1;
- }
+ if (seg_is_thin_pool(seg))
+ return _uint32_disp(rh, mem, field, &seg->zero_new_blocks, private);
- return _uint32_disp(rh, mem, field, &seg->zero_new_blocks, private);
+ return _field_set_value(field, "", &_minusone64);
}
static int _transactionid_disp(struct dm_report *rh, struct dm_pool *mem,
@@ -606,13 +603,10 @@ static int _transactionid_disp(struct dm_report *rh, struct dm_pool *mem,
{
const struct lv_segment *seg = (const struct lv_segment *) data;
- /* Suppress thin count if not thin pool */
- if (!seg_is_thin_pool(seg)) {
- dm_report_field_set_value(field, "", NULL);
- return 1;
- }
+ if (seg_is_thin_pool(seg))
+ return dm_report_field_uint64(rh, field, &seg->transaction_id);
- return dm_report_field_uint64(rh, field, &seg->transaction_id);
+ return _field_set_value(field, "", &_minusone64);
}
static int _discards_disp(struct dm_report *rh, struct dm_pool *mem,
@@ -980,13 +974,10 @@ static int _raidmismatchcount_disp(struct dm_report *rh __attribute__((unused)),
const struct logical_volume *lv = (const struct logical_volume *) data;
uint64_t mismatch_count;
- if (!(lv->status & RAID) ||
- !lv_raid_mismatch_count(lv, &mismatch_count)) {
- dm_report_field_set_value(field, "", NULL);
- return 1;
- }
+ if (lv_is_raid(lv) && lv_raid_mismatch_count(lv, &mismatch_count))
+ return dm_report_field_uint64(rh, field, &mismatch_count);
- return dm_report_field_uint64(rh, field, &mismatch_count);
+ return _field_set_value(field, "", &_minusone64);
}
static int _raidwritebehind_disp(struct dm_report *rh __attribute__((unused)),
@@ -997,12 +988,10 @@ static int _raidwritebehind_disp(struct dm_report *rh __attribute__((unused)),
{
const struct logical_volume *lv = (const struct logical_volume *) data;
- if (!lv_is_raid_type(lv) || !first_seg(lv)->writebehind) {
- dm_report_field_set_value(field, "", NULL);
- return 1;
- }
+ if (lv_is_raid_type(lv) && first_seg(lv)->writebehind)
+ return dm_report_field_uint32(rh, field, &first_seg(lv)->writebehind);
- return dm_report_field_uint32(rh, field, &first_seg(lv)->writebehind);
+ return _field_set_value(field, "", &_minusone64);
}
static int _raidminrecoveryrate_disp(struct dm_report *rh __attribute__((unused)),
@@ -1013,13 +1002,11 @@ static int _raidminrecoveryrate_disp(struct dm_report *rh __attribute__((unused)
{
const struct logical_volume *lv = (const struct logical_volume *) data;
- if (!lv_is_raid_type(lv) || !first_seg(lv)->min_recovery_rate) {
- dm_report_field_set_value(field, "", NULL);
- return 1;
- }
+ if (lv_is_raid_type(lv) && first_seg(lv)->min_recovery_rate)
+ return dm_report_field_uint32(rh, field,
+ &first_seg(lv)->min_recovery_rate);
- return dm_report_field_uint32(rh, field,
- &first_seg(lv)->min_recovery_rate);
+ return _field_set_value(field, "", &_minusone64);
}
static int _raidmaxrecoveryrate_disp(struct dm_report *rh __attribute__((unused)),
@@ -1030,13 +1017,11 @@ static int _raidmaxrecoveryrate_disp(struct dm_report *rh __attribute__((unused)
{
const struct logical_volume *lv = (const struct logical_volume *) data;
- if (!lv_is_raid_type(lv) || !first_seg(lv)->max_recovery_rate) {
- dm_report_field_set_value(field, "", NULL);
- return 1;
- }
+ if (lv_is_raid_type(lv) && first_seg(lv)->max_recovery_rate)
+ return dm_report_field_uint32(rh, field,
+ &first_seg(lv)->max_recovery_rate);
- return dm_report_field_uint32(rh, field,
- &first_seg(lv)->max_recovery_rate);
+ return _field_set_value(field, "", &_minusone64);
}
/* Called only with lv_is_thin_pool/volume */
@@ -1097,9 +1082,7 @@ static int _datapercent_disp(struct dm_report *rh, struct dm_pool *mem,
if (lv_is_thin_pool(lv) || lv_is_thin_volume(lv))
return _dtpercent_disp(0, mem, field, data, private);
- dm_report_field_set_value(field, "", NULL);
-
- return 1;
+ return _field_set_value(field, "", &_minusone64);
}
static int _metadatapercent_disp(struct dm_report *rh, struct dm_pool *mem,
@@ -1111,9 +1094,7 @@ static int _metadatapercent_disp(struct dm_report *rh, struct dm_pool *mem,
if (lv_is_thin_pool(lv))
return _dtpercent_disp(1, mem, field, data, private);
- dm_report_field_set_value(field, "", NULL);
-
- return 1;
+ return _field_set_value(field, "", &_minusone64);
}
static int _lvmetadatasize_disp(struct dm_report *rh, struct dm_pool *mem,
@@ -1123,14 +1104,12 @@ static int _lvmetadatasize_disp(struct dm_report *rh, struct dm_pool *mem,
const struct logical_volume *lv = (const struct logical_volume *) data;
uint64_t size;
- if (!lv_is_thin_pool(lv)) {
- dm_report_field_set_value(field, "", NULL);
- return 1;
+ if (lv_is_thin_pool(lv)) {
+ size = lv_metadata_size(lv);
+ return _size64_disp(rh, mem, field, &size, private);
}
- size = lv_metadata_size(lv);
-
- return _size64_disp(rh, mem, field, &size, private);
+ return _field_set_value(field, "", &_minusone64);
}
static int _thincount_disp(struct dm_report *rh, struct dm_pool *mem,
@@ -1140,15 +1119,12 @@ static int _thincount_disp(struct dm_report *rh, struct dm_pool *mem,
const struct lv_segment *seg = (const struct lv_segment *) data;
uint32_t count;
- /* Suppress thin count if not thin pool */
- if (!seg_is_thin_pool(seg)) {
- dm_report_field_set_value(field, "", NULL);
- return 1;
+ if (seg_is_thin_pool(seg)) {
+ count = dm_list_size(&seg->lv->segs_using_this_lv);
+ return _uint32_disp(rh, mem, field, &count, private);
}
- count = dm_list_size(&seg->lv->segs_using_this_lv);
-
- return _uint32_disp(rh, mem, field, &count, private);
+ return _field_set_value(field, "", &_minusone64);
}
static int _lvtime_disp(struct dm_report *rh, struct dm_pool *mem,
10 years, 6 months
master - report: using _field_set_value
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9eb81b1bf74411...
Commit: 9eb81b1bf74411bba6cc950a4ebe0a44856c0e74
Parent: 49ccf44f4505242262bf35f7e226d2791aad9397
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Sep 23 10:17:50 2013 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Nov 15 11:05:02 2013 +0100
report: using _field_set_value
Simple conversion to use _field_set_value() and shorteing
the code.
---
lib/report/report.c | 162 ++++++++++++++++++---------------------------------
1 files changed, 56 insertions(+), 106 deletions(-)
diff --git a/lib/report/report.c b/lib/report/report.c
index 49a6b8a..697d642 100644
--- a/lib/report/report.c
+++ b/lib/report/report.c
@@ -106,12 +106,11 @@ static int _devices_disp(struct dm_report *rh __attribute__((unused)), struct dm
const void *data, void *private __attribute__((unused)))
{
char *str;
- if (!(str = lvseg_devices(mem, (const struct lv_segment *) data)))
- return 0;
- dm_report_field_set_value(field, str, NULL);
+ if (!(str = lvseg_devices(mem, (const struct lv_segment *) data)))
+ return_0;
- return 1;
+ return _field_set_value(field, str, NULL);
}
static int _peranges_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem,
@@ -119,12 +118,11 @@ static int _peranges_disp(struct dm_report *rh __attribute__((unused)), struct d
const void *data, void *private __attribute__((unused)))
{
char *str;
- if (!(str = lvseg_seg_pe_ranges(mem, (const struct lv_segment *) data)))
- return 0;
- dm_report_field_set_value(field, str, NULL);
+ if (!(str = lvseg_seg_pe_ranges(mem, (const struct lv_segment *) data)))
+ return_0;
- return 1;
+ return _field_set_value(field, str, NULL);
}
static int _tags_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem,
@@ -135,11 +133,9 @@ static int _tags_disp(struct dm_report *rh __attribute__((unused)), struct dm_po
char *tags_str;
if (!(tags_str = tags_format_and_copy(mem, tags)))
- return 0;
-
- dm_report_field_set_value(field, tags_str, NULL);
+ return_0;
- return 1;
+ return _field_set_value(field, tags_str, NULL);
}
static int _modules_disp(struct dm_report *rh, struct dm_pool *mem,
@@ -150,10 +146,9 @@ static int _modules_disp(struct dm_report *rh, struct dm_pool *mem,
char *modules_str;
if (!(modules_str = lv_modules_dup(mem, lv)))
- return 0;
+ return_0;
- dm_report_field_set_value(field, modules_str, NULL);
- return 1;
+ return _field_set_value(field, modules_str, NULL);
}
static int _lvprofile_disp(struct dm_report *rh, struct dm_pool *mem,
@@ -165,8 +160,7 @@ static int _lvprofile_disp(struct dm_report *rh, struct dm_pool *mem,
if (lv->profile)
return dm_report_field_string(rh, field, &lv->profile->name);
- dm_report_field_set_value(field, "", NULL);
- return 1;
+ return _field_set_value(field, "", NULL);
}
static int _vgfmt_disp(struct dm_report *rh, struct dm_pool *mem,
@@ -175,12 +169,10 @@ static int _vgfmt_disp(struct dm_report *rh, struct dm_pool *mem,
{
const struct volume_group *vg = (const struct volume_group *) data;
- if (!vg->fid) {
- dm_report_field_set_value(field, "", NULL);
- return 1;
- }
+ if (vg->fid)
+ return _string_disp(rh, mem, field, &vg->fid->fmt->name, private);
- return _string_disp(rh, mem, field, &vg->fid->fmt->name, private);
+ return _field_set_value(field, "", NULL);
}
static int _pvfmt_disp(struct dm_report *rh, struct dm_pool *mem,
@@ -190,12 +182,10 @@ static int _pvfmt_disp(struct dm_report *rh, struct dm_pool *mem,
const struct physical_volume *pv =
(const struct physical_volume *) data;
- if (!pv->fmt) {
- dm_report_field_set_value(field, "", NULL);
- return 1;
- }
+ if (pv->fmt)
+ return _string_disp(rh, mem, field, &pv->fmt->name, private);
- return _string_disp(rh, mem, field, &pv->fmt->name, private);
+ return _field_set_value(field, "", NULL);
}
static int _lvkmaj_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)),
@@ -232,10 +222,9 @@ static int _lvstatus_disp(struct dm_report *rh __attribute__((unused)), struct d
char *repstr;
if (!(repstr = lv_attr_dup(mem, lv)))
- return 0;
+ return_0;
- dm_report_field_set_value(field, repstr, NULL);
- return 1;
+ return _field_set_value(field, repstr, NULL);
}
static int _pvstatus_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem,
@@ -247,10 +236,9 @@ static int _pvstatus_disp(struct dm_report *rh __attribute__((unused)), struct d
char *repstr;
if (!(repstr = pv_attr_dup(mem, pv)))
- return 0;
+ return_0;
- dm_report_field_set_value(field, repstr, NULL);
- return 1;
+ return _field_set_value(field, repstr, NULL);
}
static int _vgstatus_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem,
@@ -261,10 +249,9 @@ static int _vgstatus_disp(struct dm_report *rh __attribute__((unused)), struct d
char *repstr;
if (!(repstr = vg_attr_dup(mem, vg)))
- return 0;
+ return_0;
- dm_report_field_set_value(field, repstr, NULL);
- return 1;
+ return _field_set_value(field, repstr, NULL);
}
static int _segtype_disp(struct dm_report *rh __attribute__((unused)),
@@ -280,8 +267,7 @@ static int _segtype_disp(struct dm_report *rh __attribute__((unused)),
return 0;
}
- dm_report_field_set_value(field, name, NULL);
- return 1;
+ return _field_set_value(field, name, NULL);
}
static int _loglv_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)),
@@ -294,8 +280,7 @@ static int _loglv_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((
if ((name = lv_mirror_log_dup(mem, lv)))
return dm_report_field_string(rh, field, &name);
- dm_report_field_set_value(field, "", NULL);
- return 1;
+ return _field_set_value(field, "", NULL);
}
static int _lvname_disp(struct dm_report *rh, struct dm_pool *mem,
@@ -325,9 +310,7 @@ static int _lvname_disp(struct dm_report *rh, struct dm_pool *mem,
return 0;
}
- dm_report_field_set_value(field, repstr, lvname);
-
- return 1;
+ return _field_set_value(field, repstr, lvname);
}
static int _datalv_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)),
@@ -340,8 +323,7 @@ static int _datalv_disp(struct dm_report *rh, struct dm_pool *mem __attribute__(
if (seg)
return _lvname_disp(rh, mem, field, seg_lv(seg, 0), private);
- dm_report_field_set_value(field, "", NULL);
- return 1;
+ return _field_set_value(field, "", NULL);
}
static int _metadatalv_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)),
@@ -354,8 +336,7 @@ static int _metadatalv_disp(struct dm_report *rh, struct dm_pool *mem __attribut
if (seg)
return _lvname_disp(rh, mem, field, seg->metadata_lv, private);
- dm_report_field_set_value(field, "", NULL);
- return 1;
+ return _field_set_value(field, "", NULL);
}
static int _poollv_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)),
@@ -368,8 +349,7 @@ static int _poollv_disp(struct dm_report *rh, struct dm_pool *mem __attribute__(
if (seg)
return _lvname_disp(rh, mem, field, seg->pool_lv, private);
- dm_report_field_set_value(field, "", NULL);
- return 1;
+ return _field_set_value(field, "", NULL);
}
static int _lvpath_disp(struct dm_report *rh, struct dm_pool *mem,
@@ -380,11 +360,9 @@ static int _lvpath_disp(struct dm_report *rh, struct dm_pool *mem,
char *repstr;
if (!(repstr = lv_path_dup(mem, lv)))
- return 0;
-
- dm_report_field_set_value(field, repstr, NULL);
+ return_0;
- return 1;
+ return _field_set_value(field, repstr, NULL);
}
static int _origin_disp(struct dm_report *rh, struct dm_pool *mem,
@@ -402,8 +380,7 @@ static int _origin_disp(struct dm_report *rh, struct dm_pool *mem,
if (lv_is_thin_volume(lv) && first_seg(lv)->external_lv)
return _lvname_disp(rh, mem, field, first_seg(lv)->external_lv, private);
- dm_report_field_set_value(field, "", NULL);
- return 1;
+ return _field_set_value(field, "", NULL);
}
static int _movepv_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)),
@@ -413,11 +390,10 @@ static int _movepv_disp(struct dm_report *rh, struct dm_pool *mem __attribute__(
const struct logical_volume *lv = (const struct logical_volume *) data;
const char *name;
- if (!(name = lv_move_pv_dup(mem, lv)))
- dm_report_field_set_value(field, "", NULL);
- else
+ if ((name = lv_move_pv_dup(mem, lv)))
return dm_report_field_string(rh, field, &name);
- return 1;
+
+ return _field_set_value(field, "", NULL);
}
static int _convertlv_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)),
@@ -425,14 +401,12 @@ static int _convertlv_disp(struct dm_report *rh, struct dm_pool *mem __attribute
const void *data, void *private __attribute__((unused)))
{
const struct logical_volume *lv = (const struct logical_volume *) data;
- const char *name = NULL;
+ const char *name;
- name = lv_convert_lv_dup(mem, lv);
- if (name)
+ if ((name = lv_convert_lv_dup(mem, lv)))
return dm_report_field_string(rh, field, &name);
- dm_report_field_set_value(field, "", NULL);
- return 1;
+ return _field_set_value(field, "", NULL);
}
static int _size32_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem,
@@ -458,9 +432,7 @@ static int _size32_disp(struct dm_report *rh __attribute__((unused)), struct dm_
*sortval = (uint64_t) size;
- dm_report_field_set_value(field, repstr, sortval);
-
- return 1;
+ return _field_set_value(field, repstr, sortval);
}
static int _size64_disp(struct dm_report *rh __attribute__((unused)),
@@ -486,9 +458,8 @@ static int _size64_disp(struct dm_report *rh __attribute__((unused)),
}
*sortval = size;
- dm_report_field_set_value(field, repstr, sortval);
- return 1;
+ return _field_set_value(field, repstr, sortval);
}
static int _uint32_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)),
@@ -520,10 +491,8 @@ static int _lvreadahead_disp(struct dm_report *rh, struct dm_pool *mem,
{
const struct logical_volume *lv = (const struct logical_volume *) data;
- if (lv->read_ahead == DM_READ_AHEAD_AUTO) {
- dm_report_field_set_value(field, "auto", &_minusone64);
- return 1;
- }
+ if (lv->read_ahead == DM_READ_AHEAD_AUTO)
+ return _field_set_value(field, "auto", &_minusone64);
return _size32_disp(rh, mem, field, &lv->read_ahead, private);
}
@@ -561,9 +530,7 @@ static int _segmonitor_disp(struct dm_report *rh, struct dm_pool *mem,
if (!(str = lvseg_monitor_dup(mem, (const struct lv_segment *)data)))
return_0;
- dm_report_field_set_value(field, str, NULL);
-
- return 1;
+ return _field_set_value(field, str, NULL);
}
static int _segstart_disp(struct dm_report *rh, struct dm_pool *mem,
@@ -663,9 +630,7 @@ static int _discards_disp(struct dm_report *rh, struct dm_pool *mem,
return dm_report_field_string(rh, field, &discards_str);
}
- dm_report_field_set_value(field, "", NULL);
-
- return 1;
+ return _field_set_value(field, "", NULL);
}
static int _originsize_disp(struct dm_report *rh, struct dm_pool *mem,
@@ -678,9 +643,7 @@ static int _originsize_disp(struct dm_report *rh, struct dm_pool *mem,
if (size)
return _size64_disp(rh, mem, field, &size, private);
- dm_report_field_set_value(field, "", &_zero64);
-
- return 1;
+ return _field_set_value(field, "", &_zero64);
}
static int _pvused_disp(struct dm_report *rh, struct dm_pool *mem,
@@ -741,13 +704,12 @@ static int _uuid_disp(struct dm_report *rh __attribute__((unused)), struct dm_po
struct dm_report_field *field,
const void *data, void *private __attribute__((unused)))
{
- char *repstr = NULL;
+ char *repstr;
if (!(repstr = id_format_and_copy(mem, data)))
return_0;
- dm_report_field_set_value(field, repstr, NULL);
- return 1;
+ return _field_set_value(field, repstr, NULL);
}
static int _pvmdas_disp(struct dm_report *rh, struct dm_pool *mem,
@@ -799,10 +761,8 @@ static int _vgmdacopies_disp(struct dm_report *rh, struct dm_pool *mem,
const struct volume_group *vg = (const struct volume_group *) data;
uint32_t count = vg_mda_copies(vg);
- if (count == VGMETADATACOPIES_UNMANAGED) {
- dm_report_field_set_value(field, "unmanaged", &_minusone64);
- return 1;
- }
+ if (count == VGMETADATACOPIES_UNMANAGED)
+ return _field_set_value(field, "unmanaged", &_minusone64);
return _uint32_disp(rh, mem, field, &count, private);
}
@@ -816,8 +776,7 @@ static int _vgprofile_disp(struct dm_report *rh, struct dm_pool *mem,
if (vg->profile)
return dm_report_field_string(rh, field, &vg->profile->name);
- dm_report_field_set_value(field, "", NULL);
- return 1;
+ return _field_set_value(field, "", NULL);
}
static int _pvmdafree_disp(struct dm_report *rh, struct dm_pool *mem,
@@ -1006,13 +965,10 @@ static int _raidsyncaction_disp(struct dm_report *rh __attribute__((unused)),
const struct logical_volume *lv = (const struct logical_volume *) data;
char *sync_action;
- if (!(lv->status & RAID) ||
- !lv_raid_sync_action(lv, &sync_action)) {
- dm_report_field_set_value(field, "", NULL);
- return 1;
- }
+ if (lv_is_raid(lv) && lv_raid_sync_action(lv, &sync_action))
+ return _string_disp(rh, mem, field, &sync_action, private);
- return _string_disp(rh, mem, field, &sync_action, private);
+ return _field_set_value(field, "", NULL);
}
static int _raidmismatchcount_disp(struct dm_report *rh __attribute__((unused)),
@@ -1211,9 +1167,7 @@ static int _lvtime_disp(struct dm_report *rh, struct dm_pool *mem,
*sortval = lv->timestamp;
- dm_report_field_set_value(field, repstr, sortval);
-
- return 1;
+ return _field_set_value(field, repstr, sortval);
}
static int _lvhost_disp(struct dm_report *rh, struct dm_pool *mem,
@@ -1228,9 +1182,7 @@ static int _lvhost_disp(struct dm_report *rh, struct dm_pool *mem,
return 0;
}
- dm_report_field_set_value(field, repstr, repstr);
-
- return 1;
+ return _field_set_value(field, repstr, NULL);
}
static int _lvactive_disp(struct dm_report *rh, struct dm_pool *mem,
@@ -1244,9 +1196,7 @@ static int _lvactive_disp(struct dm_report *rh, struct dm_pool *mem,
return 0;
}
- dm_report_field_set_value(field, repstr, NULL);
-
- return 1;
+ return _field_set_value(field, repstr, NULL);
}
/* Report object types */
10 years, 6 months
master - report: add wrappers to set values and percents
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=49ccf44f450524...
Commit: 49ccf44f4505242262bf35f7e226d2791aad9397
Parent: 322e7b3060e79e62708f7936f140386d64704878
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Sep 23 10:02:01 2013 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Nov 15 11:05:00 2013 +0100
report: add wrappers to set values and percents
Add wrapper function for dm_report_field_set_value() which returns void
and return 1, so the code could be shorter.
Add wrapper function for percent display _field_set_percent().
---
WHATS_NEW | 1 +
lib/report/report.c | 37 +++++++++++++++++++++++++++++++++++++
2 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index b6f51e1..b190ca4 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.105 -
=====================================
+ Simplify reporting code.
Version 2.02.104 - 13th November 2013
=====================================
diff --git a/lib/report/report.c b/lib/report/report.c
index 46edf56..49a6b8a 100644
--- a/lib/report/report.c
+++ b/lib/report/report.c
@@ -38,6 +38,43 @@ static const uint64_t _minusone64 = UINT64_C(-1);
static const int32_t _minusone32 = INT32_C(-1);
static const uint64_t _zero64 = UINT64_C(0);
+static int _field_set_value(struct dm_report_field *field, const void *data, const void *sort)
+{
+ dm_report_field_set_value(field, data, sort);
+
+ return 1;
+}
+
+static int _field_set_percent(struct dm_report_field *field,
+ struct dm_pool *mem,
+ percent_t percent)
+{
+ char *repstr;
+ uint64_t *sortval;
+
+ if (percent == PERCENT_INVALID)
+ // FIXME maybe use here '--'?
+ return _field_set_value(field, "", &_minusone64);
+
+ if (!(repstr = dm_pool_alloc(mem, 8)) ||
+ !(sortval = dm_pool_alloc(mem, sizeof(uint64_t)))) {
+ if (repstr)
+ dm_pool_free(mem, repstr);
+ log_error("dm_pool_alloc failed.");
+ return 0;
+ }
+
+ if (dm_snprintf(repstr, 7, "%.2f", percent_to_float(percent)) < 0) {
+ dm_pool_free(mem, repstr);
+ log_error("Percentage too large.");
+ return 0;
+ }
+
+ *sortval = (uint64_t)(percent * 1000.f);
+
+ return _field_set_value(field, repstr, sortval);
+}
+
/*
* Data-munging functions to prepare each data type for display and sorting
*/
10 years, 6 months
master - post-release
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=322e7b3060e79e...
Commit: 322e7b3060e79e62708f7936f140386d64704878
Parent: 77a1efeb8eb0fe73c858ade05b578c3cfe3ddd9f
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Wed Nov 13 14:11:11 2013 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Wed Nov 13 14:11:11 2013 +0000
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 576af30..8594917 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.104(2)-git (2013-11-13)
+2.02.105(2)-git (2013-11-13)
diff --git a/VERSION_DM b/VERSION_DM
index 89b02c3..d36b815 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.83-git (2013-11-13)
+1.02.84-git (2013-11-13)
diff --git a/WHATS_NEW b/WHATS_NEW
index 475794e..b6f51e1 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,3 +1,6 @@
+Version 2.02.105 -
+=====================================
+
Version 2.02.104 - 13th November 2013
=====================================
Workaround VG refresh race during autoactivation by retrying the refresh.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 1e8bae7..e3953e4 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,3 +1,6 @@
+Version 1.02.84 -
+====================================
+
Version 1.02.83 - 13th November 2013
====================================
Consistently report on stderr when device is not found for dmsetup info.
10 years, 6 months
master - release 2.02.104
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=77a1efeb8eb0fe...
Commit: 77a1efeb8eb0fe73c858ade05b578c3cfe3ddd9f
Parent: 527db4645fdbf10361797c871b9cadf6c5e73405
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Wed Nov 13 14:02:34 2013 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Wed Nov 13 14:02:34 2013 +0000
release 2.02.104
87 files changed, 1207 insertions(+), 294 deletions(-)
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 7 +++----
WHATS_NEW_DM | 6 ++++--
4 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/VERSION b/VERSION
index 8e798d0..576af30 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.104(2)-git (2013-10-04)
+2.02.104(2)-git (2013-11-13)
diff --git a/VERSION_DM b/VERSION_DM
index 0e6eddb..89b02c3 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.83-git (2013-10-04)
+1.02.83-git (2013-11-13)
diff --git a/WHATS_NEW b/WHATS_NEW
index ff6041d..475794e 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,5 @@
-Version 2.02.104 -
-===================================
+Version 2.02.104 - 13th November 2013
+=====================================
Workaround VG refresh race during autoactivation by retrying the refresh.
Handle failures in temporary mirror used when adding images to mirrors.
Fix and improve logic for implicitely exclusive activations.
@@ -28,7 +28,6 @@ Version 2.02.104 -
Move code to remove virtual snapshot from tools to lib for lvm2app.
Fix possible race during daemon worker thread creation (lvmetad).
Fix possible deadlock while clearing lvmetad cache for full rescan.
- Fix possible race while creating/destroying memory pools.
Recognise NVM Express devices in filter.
Fix failing metadata repair when lvmetad is used.
Fix incorrect memory handling when reading messages from lvmetad.
@@ -37,7 +36,7 @@ Version 2.02.104 -
Add support for flagging an LV to skip udev scanning during activation.
Improve message when unable to change discards setting on active thin pool.
Run full scan before vgrename operation to avoid any cache name collision.
- Fix lvconvert when converting to a thin pool and thin LV at once.
+ Fix lvconvert when converting to a thin pool and thin LV at once. (2.02.99)
Version 2.02.103 - 4th October 2013
===================================
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 0f905fd..1e8bae7 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,9 +1,11 @@
-Version 1.02.83
-==================================
+Version 1.02.83 - 13th November 2013
+====================================
Consistently report on stderr when device is not found for dmsetup info.
Skip race errors when non-udev dmsetup build runs on udev-enabled system.
Skip error message when holders are not present in sysfs.
Use __linux__ instead of linux define to make libdevmapper.h C compliant.
+ Use mutex to avoid possible race while creating/destroying memory pools.
+ Require libpthread to build now.
Version 1.02.82 - 4th October 2013
==================================
10 years, 6 months