Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=94d3878efb7cec344681b…
Commit: 94d3878efb7cec344681bf4a2b28774ffebda3ba
Parent: b8caca46527cd5e858b0218734ba9a1f24200d6e
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Thu Nov 30 13:30:28 2017 +0100
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Thu Nov 30 13:30:28 2017 +0100
Update WHATS_NEW
---
WHATS_NEW | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 4ff8dcb..32ed3c9 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -8,7 +8,13 @@ Version 2.02.177 -
Make a pvmove LV locking holder.
Do not change critical section counter on resume path without real resume.
Enhance activation code to automatically suspend pvmove participants.
+ Prevent conversion of thin volumes to snapshot origin when lvmlockd is used.
+ Correct the steps to change lock type in lvmlockd man page.
+ Retry lock acquisition on recognized sanlock errors.
+ Fix lock manager error codes in lvmlockd.
Remove unnecessary single read from lvmdiskscan.
+ Check raid reshape flags in vg_validate().
+ Add support for pvmove of cache and snapshot origins.
Avoid using precommitted metadata for suspending pvmove tree.
Ehnance pvmove locking.
Deactivate activated LVs on error path when pvmove activation fails.
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b8caca46527cd5e858b02…
Commit: b8caca46527cd5e858b0218734ba9a1f24200d6e
Parent: a9812ec9d3469edbe24a2d08ccb1dda209cf66a5
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Tue Nov 28 12:03:35 2017 +0100
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Tue Nov 28 12:03:35 2017 +0100
tests: Fix common_dev_ argument handling
from[:[len]] arguments with missing colon assigned from to len, instead
of till_the_end_of_device.
---
test/lib/aux.sh | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index b8a0cc0..de63167 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -912,6 +912,10 @@ common_dev_() {
for fromlen in "${@-0:}"; do
from=${fromlen%%:*}
len=${fromlen##*:}
+ if test "$len" = "$fromlen"; then
+ # Missing the colon at the end: empty len
+ len=
+ fi
test -n "$len" || len=$(( size - from ))
diff=$(( from - pos ))
if test $diff -gt 0 ; then
@@ -937,7 +941,7 @@ common_dev_() {
# Replace linear PV device with its 'delayed' version
# Could be used to more deterministicaly hit some problems.
-# Parameters: {device path} [read delay ms] [write delay ms] [offset:size]...
+# Parameters: {device path} [read delay ms] [write delay ms] [offset[:[size]]]...
# Original device is restored when both delay params are 0 (or missing).
# If the size is missing, the remaing portion of device is taken
# i.e. delay_dev "$dev1" 0 200 256:
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=efa17cae24190d1178a9d…
Commit: efa17cae24190d1178a9dac1473b8757c412292c
Parent: 34eb082bbcd57deb954ff4221c9320126c2096f3
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Nov 27 10:21:21 2017 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Nov 27 10:34:30 2017 +0100
cmdline: avoid overrun on very large numbers.
When large size number (>2^31) is given on command line it could be
misdetected and in certain cases lead to wrongly casted number.
So make sure all cases always do set _MAX number in case the value would
not fit within the supported range instead of getting some random value
within the range.
In most cases this was not a problem to detect, but i.e. stripesize
parameter might have been fooled by certain large numbers.
---
WHATS_NEW | 1 +
tools/lvmcmdline.c | 17 +++++++++--------
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 9b9e7a8..5937bad 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.177 -
====================================
+ Ensure very large numbers used as arguments are not casted to lower values.
Enhance reading and validation of options stripes and stripes_size.
Fix printing of default stripe size when user is not using stripes.
Activation code for pvmove automatically discovers holding LVs for resume.
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index 22f1c60..b693722 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -508,10 +508,10 @@ static int _get_int_arg(struct arg_values *av, char **ptr)
if (*ptr == val || errno)
return 0;
- av->i_value = (int32_t) v;
- av->ui_value = (uint32_t) v;
- av->i64_value = (int64_t) v;
- av->ui64_value = (uint64_t) v;
+ av->i_value = (v < INT32_MAX) ? (int32_t) v : INT32_MAX;
+ av->ui_value = (v < UINT32_MAX) ? (uint32_t) v : UINT32_MAX;
+ av->i64_value = (v < INT64_MAX) ? (int64_t) v : INT64_MAX;
+ av->ui64_value = (v < UINT64_MAX) ? (uint64_t) v : UINT64_MAX;
return 1;
}
@@ -641,10 +641,11 @@ static int _size_arg(struct cmd_context *cmd __attribute__((unused)),
log_error("Size is too big (>=16EiB).");
return 0;
}
- av->i_value = (int32_t) v;
- av->ui_value = (uint32_t) v;
- av->i64_value = (int64_t) v;
- av->ui64_value = (uint64_t) v;
+
+ av->i_value = (v < INT32_MAX) ? (int32_t) v : INT32_MAX;
+ av->ui_value = (v < UINT32_MAX) ? (uint32_t) v : UINT32_MAX;
+ av->i64_value = (v < INT64_MAX) ? (int64_t) v : INT64_MAX;
+ av->ui64_value = (v < UINT64_MAX) ? (uint64_t) v : UINT64_MAX;
return 1;
}