1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-18 10:04:20 +03:00

toollib: fix regression in parsing /dev/mapper/vg-lv

Commit b0dde9e8f026ddd679 introduced regression in parsing
/dev/mapper prefix - and tried to check for '/' one char behind.
This commit is contained in:
Zdenek Kabelac 2014-11-26 17:09:47 +01:00
parent c8890e3ac1
commit 4bfdb01f78
3 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.114 - Version 2.02.114 -
===================================== =====================================
Fix regression when parsing /dev/mapper dir (2.02.112).
Fix missing rounding to 64KB when estimating optimal thin pool chunk size. Fix missing rounding to 64KB when estimating optimal thin pool chunk size.
Fix typo in clvmd initscript causing CLVMD_STOP_TIMEOUT variable to be ignored. Fix typo in clvmd initscript causing CLVMD_STOP_TIMEOUT variable to be ignored.
Fix size in pvresize "Resizing to ..." verbose msg to show proper result size. Fix size in pvresize "Resizing to ..." verbose msg to show proper result size.

View File

@ -68,6 +68,11 @@ test $(lvs --noheadings $vg | wc -l) -eq 2
test $(lvs -a --noheadings $vg | wc -l) -eq 6 test $(lvs -a --noheadings $vg | wc -l) -eq 6
dmsetup ls | grep "$PREFIX" | grep -v "LVMTEST.*pv." dmsetup ls | grep "$PREFIX" | grep -v "LVMTEST.*pv."
# Check we parse /dev/mapper/vg-lv
lvdisplay "$DM_DEV_DIR/mapper/$vg-$lv3"
# Check we parse /dev/vg/lv
lvdisplay "$DM_DEV_DIR/$vg/$lv3"
lvcreate -l2 -s $vg/$lv3 lvcreate -l2 -s $vg/$lv3
lvcreate -l1 -s -n inval $vg/$lv3 lvcreate -l1 -s -n inval $vg/$lv3
lvcreate -l4 -I4 -i2 -n stripe $vg lvcreate -l4 -I4 -i2 -n stripe $vg

View File

@ -130,8 +130,8 @@ const char *skip_dev_dir(struct cmd_context *cmd, const char *vg_name,
vg_name++; vg_name++;
/* Reformat string if /dev/mapper found */ /* Reformat string if /dev/mapper found */
if (!strncmp(vg_name, dmdir, dmdir_len) && vg_name[dmdir_len + 1] == '/') { if (!strncmp(vg_name, dmdir, dmdir_len) && vg_name[dmdir_len] == '/') {
vg_name += devdir_len + 1; vg_name += dmdir_len + 1;
while (*vg_name == '/') while (*vg_name == '/')
vg_name++; vg_name++;