master - pre-release
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=228b8245e4fbae...
Commit: 228b8245e4fbae92968feeb8ded57697b567ceed
Parent: 672deaebc55464015065c2101a3de03e02190e01
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Mon Feb 15 10:35:16 2016 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Mon Feb 15 10:35:16 2016 +0000
pre-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 9 +++++----
WHATS_NEW_DM | 4 ++--
4 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/VERSION b/VERSION
index 2cb3303..6ac1ce6 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.142(2)-git (2016-01-25)
+2.02.142(2)-git (2016-02-15)
diff --git a/VERSION_DM b/VERSION_DM
index 17b06bb..73eb926 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.116-git (2016-01-25)
+1.02.116-git (2016-02-15)
diff --git a/WHATS_NEW b/WHATS_NEW
index 8c3a204..9207fca 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,12 +1,13 @@
-Version 2.02.142 -
-====================================
+Version 2.02.142 - 15th February 2016
+=====================================
Fix memory pool corruption in pvmove (2.02.141).
Support control of spare metadata creation when repairing thin-pool.
Fix config type of 'log/verbose' from bool to int (2.02.99).
- Fix thinp watermark calc for data LV for faster dmeventd responce (2.02.133).
+ Fix inverted data LV thinp watermark calc for dmeventd response (2.02.133).
Use use_blkid_wiping=0 if not defined in lvm.conf and support not compiled in.
Do not check for suspended devices if scanning for lvmetad update.
- Fix part. table filter with external_device_info_source="udev" and blkid<2.20.
+ Clear cached bootloader areas when PV format changed.
+ Fix partn table filter with external_device_info_source="udev" and blkid<2.20.
Version 2.02.141 - 25th January 2016
====================================
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 693667b..9e30e66 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,5 @@
-Version 1.02.116 -
-====================================
+Version 1.02.116 - 15th February 2016
+=====================================
Use fully aligned allocations for dm_pool_strdup/strndup() (1.02.64).
Fix thin-pool table parameter feature order to match kernel output.
8 years, 2 months
master - man: pvresize: remove old comment about inability to resize PV with more mdas
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=672deaebc55464...
Commit: 672deaebc55464015065c2101a3de03e02190e01
Parent: 337aa4ca8ef4e88c09567b47838e28688258ae44
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Fri Feb 12 16:29:39 2016 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Fri Feb 12 16:29:47 2016 +0100
man: pvresize: remove old comment about inability to resize PV with more mdas
---
man/pvresize.8.in | 3 +--
test/shell/pvresize-mdas.sh | 26 ++++++++++++++++++++++++++
2 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/man/pvresize.8.in b/man/pvresize.8.in
index 2cc1183..8b78651 100644
--- a/man/pvresize.8.in
+++ b/man/pvresize.8.in
@@ -46,8 +46,7 @@ free space, like
does.
.sp
.B pvresize
-won't currently work correctly on LVM1 volumes or PVs with extra
-metadata areas.
+won't currently work correctly on LVM1 volumes.
.SH SEE ALSO
.BR lvm (8),
.BR pvmove (8),
diff --git a/test/shell/pvresize-mdas.sh b/test/shell/pvresize-mdas.sh
new file mode 100644
index 0000000..96d0381
--- /dev/null
+++ b/test/shell/pvresize-mdas.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+# Copyright (C) 2016 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+SKIP_WITH_LVMPOLLD=1
+
+. lib/inittest
+
+aux prepare_devs 1 8
+
+pvcreate --setphysicalvolumesize 8m --metadatacopies 2 "$dev1"
+check pv_field "$dev1" pv_size 8.00m
+check pv_field "$dev1" pv_mda_count 2
+pvs "$dev1"
+
+pvresize --setphysicalvolumesize 4m "$dev1"
+check pv_field "$dev1" pv_size 4.00m
+check pv_field "$dev1" pv_mda_count 2
+pvs "$dev1"
8 years, 2 months
master - tests: indent
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=337aa4ca8ef4e8...
Commit: 337aa4ca8ef4e88c09567b47838e28688258ae44
Parent: 0daf9d7ac5009d7c5642a6b1c7d8bb3fbc0c4382
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Feb 12 11:59:42 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Feb 12 11:59:42 2016 +0100
tests: indent
Better bash indention
---
test/shell/thin-autoumount-dmeventd.sh | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/test/shell/thin-autoumount-dmeventd.sh b/test/shell/thin-autoumount-dmeventd.sh
index 6b7c7c1..d4485b5 100644
--- a/test/shell/thin-autoumount-dmeventd.sh
+++ b/test/shell/thin-autoumount-dmeventd.sh
@@ -73,17 +73,20 @@ lvs -a $vg
for i in $(seq 1 12) ; do
is_lv_opened_ "$vg/$lv1" || break
test $i -lt 12 || die "$mntdir should have been unmounted by dmeventd!"
- sleep 1
+ sleep 1
done
is_lv_opened_ "$vg/$lv2" || \
- die "$mntusedir is not mounted here (sleep already expired??) "
+ die "$mntusedir is not mounted here (sleep already expired??)"
# Kill device holding process
kill $PID_SLEEP
wait
-is_lv_opened_ "$vg/$lv2" && \
- { mount; die "$mntusedir should have been unmounted by dmeventd!" }
+is_lv_opened_ "$vg/$lv2" && {
+ mount
+ die "$mntusedir should have been unmounted by dmeventd!"
+}
vgremove -f $vg
+
8 years, 2 months
master - pvmove: fix possible memory pool corruption
by okozina
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=0daf9d7ac5009d...
Commit: 0daf9d7ac5009d7c5642a6b1c7d8bb3fbc0c4382
Parent: a077a649837b6d60d892516e32be8854bfb57ee7
Author: Ondrej Kozina <okozina(a)redhat.com>
AuthorDate: Fri Feb 12 11:34:26 2016 +0100
Committer: Ondrej Kozina <okozina(a)redhat.com>
CommitterDate: Fri Feb 12 11:40:33 2016 +0100
pvmove: fix possible memory pool corruption
This is a hotfix for a bug introduced in
6d7dc87cb356162f912b13c8a0cd198037c0226b.
The bug description: First we allocate memory for
processing handle (at an address 1) then we
allocate some memory on the same pool for later use
in pvmove_poll function inside the process_each_pv
function (at an address 2). After we jump out of
process_each_pv we called destroy_processing_handle.
As a result of destroying the handle memory pool could
deallocate all memory at address 1 or higher. The
pvmove_poll function tried to copy a memory allocated
at address 2 that could be returned to the system.
If it was so it led to segfault.
We need to rethink proper fix but in the same time
cmd->mem pool is recreated per each lvm command so
this should not cause problems even when we run
multiple commands in lvm shell.
A valgrind snapshot of the corruption:
Invalid read of size 1
at 0x4C29F92: strlen (mc_replace_strmem.c:403)
by 0x5495F2E: dm_pool_strdup (pool.c:51)
by 0x1592A7: _create_id (pvmove.c:774)
by 0x159409: pvmove_poll (pvmove.c:796)
by 0x1599E3: pvmove (pvmove.c:931)
by 0x15105B: lvm_run_command (lvmcmdline.c:1655)
by 0x1523C3: lvm2_main (lvmcmdline.c:2121)
by 0x1754F3: main (lvm.c:22)
Address 0xf15df8a is 138 bytes inside a block of size 8,192 free'd
at 0x4C28430: free (vg_replace_malloc.c:446)
by 0x5494E73: dm_free_wrapper (dbg_malloc.c:357)
by 0x5495DE2: _free_chunk (pool-fast.c:318)
by 0x549561C: dm_pool_free (pool-fast.c:151)
by 0x164451: destroy_processing_handle (toollib.c:1837)
by 0x1598C1: pvmove (pvmove.c:903)
by 0x15105B: lvm_run_command (lvmcmdline.c:1655)
by 0x1523C3: lvm2_main (lvmcmdline.c:2121)
by 0x1754F3: main (lvm.c:22)
---
WHATS_NEW | 1 +
tools/toollib.c | 6 +++++-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 7b10da8..8c3a204 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.142 -
====================================
+ Fix memory pool corruption in pvmove (2.02.141).
Support control of spare metadata creation when repairing thin-pool.
Fix config type of 'log/verbose' from bool to int (2.02.99).
Fix thinp watermark calc for data LV for faster dmeventd responce (2.02.133).
diff --git a/tools/toollib.c b/tools/toollib.c
index c89d8e5..f9ac259 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -1834,7 +1834,11 @@ void destroy_processing_handle(struct cmd_context *cmd, struct processing_handle
if (handle) {
if (handle->selection_handle && handle->selection_handle->selection_rh)
dm_report_free(handle->selection_handle->selection_rh);
- dm_pool_free(cmd->mem, handle);
+ /*
+ * TODO: think about better alternatives:
+ * handle mempool, dm_alloc for handle memory...
+ */
+ memset(handle, 0, sizeof(*handle));
}
}
8 years, 2 months
master - pvmove: fix memory pool corruption
by okozina
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8a80cc5bc37994...
Commit: 8a80cc5bc3799483a211b2ff9677a392a7b47e8b
Parent: a077a649837b6d60d892516e32be8854bfb57ee7
Author: Ondrej Kozina <okozina(a)redhat.com>
AuthorDate: Thu Feb 11 15:41:29 2016 +0100
Committer: Ondrej Kozina <okozina(a)redhat.com>
CommitterDate: Fri Feb 12 11:07:21 2016 +0100
pvmove: fix memory pool corruption
This is a hotfix for a bug introduced in
6d7dc87cb356162f912b13c8a0cd198037c0226b.
The bug description: First we allocate memory for
processing handle (at an address 1) then we
allocate some memory on the same pool for later use
in pvmove_poll function inside the process_each_pv
function (at an address 2). After we jump out of
process_each_pv we called destroy_processing_handle.
As a result of destroying the handle memory pool could
deallocate all memory at address 1 or higher. The
pvmove_poll function tried to copy a memory allocated
at address 2 that could be returned to the system.
If it was so it led to segfault.
We don't have to call destroy_processing_handle() since
the mempool is freed automatically during command context
teardown.
A valgrind snapshot of the corruption:
Invalid read of size 1
at 0x4C29F92: strlen (mc_replace_strmem.c:403)
by 0x5495F2E: dm_pool_strdup (pool.c:51)
by 0x1592A7: _create_id (pvmove.c:774)
by 0x159409: pvmove_poll (pvmove.c:796)
by 0x1599E3: pvmove (pvmove.c:931)
by 0x15105B: lvm_run_command (lvmcmdline.c:1655)
by 0x1523C3: lvm2_main (lvmcmdline.c:2121)
by 0x1754F3: main (lvm.c:22)
Address 0xf15df8a is 138 bytes inside a block of size 8,192 free'd
at 0x4C28430: free (vg_replace_malloc.c:446)
by 0x5494E73: dm_free_wrapper (dbg_malloc.c:357)
by 0x5495DE2: _free_chunk (pool-fast.c:318)
by 0x549561C: dm_pool_free (pool-fast.c:151)
by 0x164451: destroy_processing_handle (toollib.c:1837)
by 0x1598C1: pvmove (pvmove.c:903)
by 0x15105B: lvm_run_command (lvmcmdline.c:1655)
by 0x1523C3: lvm2_main (lvmcmdline.c:2121)
by 0x1754F3: main (lvm.c:22)
---
WHATS_NEW | 1 +
tools/pvmove.c | 2 --
2 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 7b10da8..8c3a204 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.142 -
====================================
+ Fix memory pool corruption in pvmove (2.02.141).
Support control of spare metadata creation when repairing thin-pool.
Fix config type of 'log/verbose' from bool to int (2.02.99).
Fix thinp watermark calc for data LV for faster dmeventd responce (2.02.133).
diff --git a/tools/pvmove.c b/tools/pvmove.c
index 0b8ca46..21f2eab 100644
--- a/tools/pvmove.c
+++ b/tools/pvmove.c
@@ -900,8 +900,6 @@ int pvmove(struct cmd_context *cmd, int argc, char **argv)
handle,
is_abort ? &_pvmove_read_single : &_pvmove_setup_single);
- destroy_processing_handle(cmd, handle);
-
if (!is_abort) {
if (!pp.found_pv) {
stack;
8 years, 2 months
master - tests: update test
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a077a649837b6d...
Commit: a077a649837b6d60d892516e32be8854bfb57ee7
Parent: befe0078ad15563967d8b8321638c75a4f25f438
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Feb 12 10:21:07 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Feb 12 10:21:07 2016 +0100
tests: update test
Upgrade test to count with much faster dmeventd work thanks
to low_watter_mark support.
Fix some wrong tests.
---
test/shell/thin-autoumount-dmeventd.sh | 47 +++++++++++++++++++++-----------
1 files changed, 31 insertions(+), 16 deletions(-)
diff --git a/test/shell/thin-autoumount-dmeventd.sh b/test/shell/thin-autoumount-dmeventd.sh
index 781a27e..6b7c7c1 100644
--- a/test/shell/thin-autoumount-dmeventd.sh
+++ b/test/shell/thin-autoumount-dmeventd.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright (C) 2012 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2016 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions
@@ -15,9 +15,9 @@ SKIP_WITH_LVMPOLLD=1
export LVM_TEST_THIN_REPAIR_CMD=${LVM_TEST_THIN_REPAIR_CMD-/bin/false}
-is_dir_mounted_()
+is_lv_opened_()
{
- cat /proc/mounts | sed 's:\\040: :g' | grep "$1"
+ test $(get lv_field "$1" lv_device_open --binary) = "1"
}
. lib/inittest
@@ -31,6 +31,7 @@ aux have_thin 1 0 0 || skip
aux prepare_dmeventd
+# Use autoextend percent 0 - so extension fails and triggers umount...
aux lvmconf "activation/thin_pool_autoextend_percent = 0" \
"activation/thin_pool_autoextend_threshold = 70"
@@ -51,24 +52,38 @@ mkdir "$mntdir" "$mntusedir"
mount "$DM_DEV_DIR/mapper/$vg-$lv1" "$mntdir"
mount "$DM_DEV_DIR/mapper/$vg-$lv2" "$mntusedir"
-is_dir_mounted_ "$mntdir"
+# Check both LVs are opened (~mounted)
+is_lv_opened_ "$vg/$lv1"
+is_lv_opened_ "$vg/$lv2"
-# fill above 70%
-dd if=/dev/zero of="$mntdir/file$$" bs=1M count=6
touch "$mntusedir/file$$"
-tail -f "$mntusedir/file$$" &
-PID_TAIL=$!
sync
-lvs -a $vg
-sleep 12 # dmeventd only checks every 10 seconds :(
-lvs -a $vg
-# both dirs should be unmounted
-not is_dir_mounted "$mntdir"
-not is_dir_mounted "$mntusedir"
+# Running 'keeper' process sleep holds the block device still in use
+sleep 60 < "$mntusedir/file$$" &
+PID_SLEEP=$!
-# running tail keeps the block device still in use
-kill $PID_TAIL
+# Fill pool above 70%
+dd if=/dev/zero of="$mntdir/file$$" bs=1M count=6 conv=fdatasync
lvs -a $vg
+# Could loop here for a few secs so dmeventd can do some work
+# In the worst case check only happens every 10 seconds :(
+# With low water mark it should react way faster
+for i in $(seq 1 12) ; do
+ is_lv_opened_ "$vg/$lv1" || break
+ test $i -lt 12 || die "$mntdir should have been unmounted by dmeventd!"
+ sleep 1
+done
+
+is_lv_opened_ "$vg/$lv2" || \
+ die "$mntusedir is not mounted here (sleep already expired??) "
+
+# Kill device holding process
+kill $PID_SLEEP
+wait
+
+is_lv_opened_ "$vg/$lv2" && \
+ { mount; die "$mntusedir should have been unmounted by dmeventd!" }
+
vgremove -f $vg
8 years, 2 months
master - gcc: better code for older compiler
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=befe0078ad1556...
Commit: befe0078ad15563967d8b8321638c75a4f25f438
Parent: ba111e7f4a9481b2b419bd0f402dd0926ac1b0e9
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Feb 12 10:17:39 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Feb 12 10:17:39 2016 +0100
gcc: better code for older compiler
Address this gcc warning:
metadata/lv.c:243: warning: initialized field overwritten
metadata/lv.c:243: warning: (near initialization for 'status.seg_status')
Present with e.g.: gcc version 4.3.2 (Debian 4.3.2-1.1)
---
lib/metadata/lv.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/metadata/lv.c b/lib/metadata/lv.c
index c4e3437..526284e 100644
--- a/lib/metadata/lv.c
+++ b/lib/metadata/lv.c
@@ -238,8 +238,10 @@ char *lvseg_kernel_discards_dup(struct dm_pool *mem, const struct lv_segment *se
{
char *ret = NULL;
struct lv_with_info_and_seg_status status = {
- .seg_status.type = SEG_STATUS_NONE,
- .seg_status.seg = seg
+ .seg_status = {
+ .type = SEG_STATUS_NONE,
+ .seg = seg
+ },
};
if (!lv_is_thin_pool(seg->lv))
8 years, 2 months
master - tests: check for automated dmeventd resize
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ba111e7f4a9481...
Commit: ba111e7f4a9481b2b419bd0f402dd0926ac1b0e9
Parent: 53058e523411d7ef09d9a934a48764fa9ad22b72
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Feb 11 18:05:58 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Feb 11 18:38:40 2016 +0100
tests: check for automated dmeventd resize
Watermark support should handle relatively quickly data LV resizes.
So check if it does what is expected.
---
test/shell/lvextend-thin-data-dmeventd.sh | 62 +++++++++++++++++++++++++++++
1 files changed, 62 insertions(+), 0 deletions(-)
diff --git a/test/shell/lvextend-thin-data-dmeventd.sh b/test/shell/lvextend-thin-data-dmeventd.sh
new file mode 100644
index 0000000..03bd23d
--- /dev/null
+++ b/test/shell/lvextend-thin-data-dmeventd.sh
@@ -0,0 +1,62 @@
+#!/bin/sh
+# Copyright (C) 2016 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# Test autoextension of thin data volume
+
+SKIP_WITH_LVMPOLLD=1
+
+export LVM_TEST_THIN_REPAIR_CMD=${LVM_TEST_THIN_REPAIR_CMD-/bin/false}
+
+. lib/inittest
+
+# As we check for 'instant' reaction
+# retry only few times
+test_equal_() {
+ for i in $(seq 1 4) ; do
+ test "$(get lv_field $vg/pool data_percent)" = "$1" || return
+ sleep 1
+ done
+}
+
+aux have_thin 1 10 0 || skip
+
+aux prepare_dmeventd
+
+aux lvmconf "activation/thin_pool_autoextend_percent = 10" \
+ "activation/thin_pool_autoextend_threshold = 75"
+
+aux prepare_pvs 3 256
+
+vgcreate -s 256K $vg $(cat DEVICES)
+
+lvcreate -L1M -c 64k -T $vg/pool
+lvcreate -V1M $vg/pool -n $lv1
+
+# Fill exactly 75%
+dd if=/dev/zero of="$DM_DEV_DIR/mapper/$vg-$lv1" bs=786432c count=1 conv=fdatasync
+
+# when everything calcs correctly thin-pool should be exactly 75% full now
+# and the size should not have changed
+pre="75.00"
+test_equal_ $pre || die "Data percentage has changed!"
+
+
+# Now triger allocation of 1 extra pool chunk
+dd if=/dev/zero of="$DM_DEV_DIR/mapper/$vg-$lv1" bs=1c count=1 seek=786433 conv=fdatasync
+
+lvs -a -o+chunksize $vg
+dmsetup table
+dmsetup status
+
+# If the watermark works well - dmeventd should have already resized data LV
+test_equal_ $pre && die "Data percentage has NOT changed!"
+
+vgremove -f $vg
8 years, 2 months
master - debug: cut_and_paste type in message
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=53058e523411d7...
Commit: 53058e523411d7ef09d9a934a48764fa9ad22b72
Parent: cc23fdbd13a616010e54fa0491f5de9cee340fec
Author: M.H. Tsai <mingnus(a)gmail.com>
AuthorDate: Wed Jan 27 19:11:03 2016 +0800
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Feb 11 18:38:40 2016 +0100
debug: cut_and_paste type in message
Typo in debug message.
---
lib/activate/activate.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/activate/activate.c b/lib/activate/activate.c
index 61651bf..a7ac608 100644
--- a/lib/activate/activate.c
+++ b/lib/activate/activate.c
@@ -1160,7 +1160,7 @@ int lv_thin_pool_transaction_id(const struct logical_volume *lv,
if (!lv_info(lv->vg->cmd, lv, 1, NULL, 0, 0))
return 0;
- log_debug_activation("Checking thin percent for LV %s.",
+ log_debug_activation("Checking thin-pool percent for LV %s.",
display_lvname(lv));
if (!(dm = dev_manager_create(lv->vg->cmd, lv->vg->name, 1)))
8 years, 2 months
master - cleanup: update messages
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=cc23fdbd13a616...
Commit: cc23fdbd13a616010e54fa0491f5de9cee340fec
Parent: 5a32d2c1d95e5cdd1849fc979353a81edf972878
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Feb 8 13:08:54 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Feb 11 18:38:40 2016 +0100
cleanup: update messages
---
lib/metadata/lv_manip.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index d5105e1..d99d347 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -4224,7 +4224,8 @@ static int _request_confirmation(const struct volume_group *vg,
if (lp->resizefs) {
if (!info.exists) {
log_error("Logical volume %s must be activated "
- "before resizing filesystem", lp->lv_name);
+ "before resizing filesystem.",
+ display_lvname(lv));
return 0;
}
return 1;
@@ -4233,7 +4234,7 @@ static int _request_confirmation(const struct volume_group *vg,
if (!info.exists)
return 1;
- log_warn("WARNING: Reducing active%s logical volume to %s",
+ log_warn("WARNING: Reducing active%s logical volume to %s.",
info.open_count ? " and open" : "",
display_size(vg->cmd, (uint64_t) lp->extents * vg->extent_size));
@@ -4241,8 +4242,9 @@ static int _request_confirmation(const struct volume_group *vg,
if (!lp->ac_force) {
if (yes_no_prompt("Do you really want to reduce %s? [y/n]: ",
- lp->lv_name) == 'n') {
- log_error("Logical volume %s NOT reduced", lp->lv_name);
+ display_lvname(lv)) == 'n') {
+ log_error("Logical volume %s NOT reduced",
+ display_lvname(lv));
return 0;
}
if (sigint_caught())
@@ -4315,13 +4317,13 @@ static int _adjust_amount(dm_percent_t percent, int policy_threshold, int *polic
{
if (!(DM_PERCENT_0 < percent && percent <= DM_PERCENT_100) ||
percent <= (policy_threshold * DM_PERCENT_1))
- return 0;
+ return 0; /* nothing to do */
/*
* Evaluate the minimal amount needed to get bellow threshold.
* Keep using DM_PERCENT_1 units for better precision.
* Round-up to needed percentage value
*/
- percent = (percent/policy_threshold + (DM_PERCENT_1 - 1) / 100) / (DM_PERCENT_1 / 100) - 100;
+ percent = (percent / policy_threshold + (DM_PERCENT_1 - 1) / 100) / (DM_PERCENT_1 / 100) - 100;
/* Use it if current policy amount is smaller */
if (*policy_amount < percent)
8 years, 2 months