master - Add BSD 2-Clause License
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=aa464aa2f6b438092a5...
Commit: aa464aa2f6b438092a50ca20f149557550c7147b
Parent: 9cd05d1f1eef6ceb2dd0b18f792730f711334578
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Fri Jul 27 17:08:19 2018 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Fri Jul 27 17:09:46 2018 +0200
Add BSD 2-Clause License
This is required by C++ test harness.
---
COPYING.BSD | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/COPYING.BSD b/COPYING.BSD
new file mode 100644
index 0000000..20322c9
--- /dev/null
+++ b/COPYING.BSD
@@ -0,0 +1,25 @@
+BSD 2-Clause License
+
+Copyright (c) 2014, Red Hat, Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5 years, 4 months
master - test: Check flavour is used and exists
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9cd05d1f1eef6ceb2dd...
Commit: 9cd05d1f1eef6ceb2dd0b18f792730f711334578
Parent: 7f49d463d6c362a472d3ba721f91558602901a33
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Thu Jul 26 15:01:50 2018 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Thu Jul 26 15:01:50 2018 +0200
test: Check flavour is used and exists
---
test/lib/inittest.sh | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/test/lib/inittest.sh b/test/lib/inittest.sh
index c48ea13..967fc1f 100644
--- a/test/lib/inittest.sh
+++ b/test/lib/inittest.sh
@@ -25,6 +25,8 @@ TESTNAME=${0##*/}
PS4='#${BASH_SOURCE[0]##*/}:${LINENO}+ '
export TESTNAME PS4
+LVM_TEST_FLAVOUR=${LVM_TEST_FLAVOUR-}
+
LVM_TEST_BACKING_DEVICE=${LVM_TEST_BACKING_DEVICE-}
LVM_TEST_DEVDIR=${LVM_TEST_DEVDIR-}
LVM_TEST_NODEBUG=${LVM_TEST_NODEBUG-}
@@ -49,9 +51,9 @@ SKIP_WITH_LVMPOLLD=${SKIP_WITH_LVMPOLLD-}
SKIP_WITH_LVMLOCKD=${SKIP_WITH_LVMLOCKD-}
SKIP_ROOT_DM_CHECK=${SKIP_ROOT_DM_CHECK-}
-if test -n "$LVM_TEST_FLAVOUR"; then
- . "lib/flavour-$LVM_TEST_FLAVOUR"
-fi
+test -n "$LVM_TEST_FLAVOUR" || { echo "NOTE: Empty flavour">&2; initskip; }
+test -f "lib/flavour-$LVM_TEST_FLAVOUR" || { echo "NOTE: Flavour '$LVM_TEST_FLAVOUR' does not exist">&2; initskip; }
+. "lib/flavour-$LVM_TEST_FLAVOUR"
test -n "$SKIP_WITHOUT_CLVMD" && test "$LVM_TEST_LOCKING" -ne 3 && initskip
test -n "$SKIP_WITH_CLVMD" && test "$LVM_TEST_LOCKING" = 3 && initskip
5 years, 4 months
master - test: Remove excessive comma resulting in empty flavour
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=7f49d463d6c362a472d...
Commit: 7f49d463d6c362a472d3ba721f91558602901a33
Parent: a004bb07f14baeed158ac9ea571cf5a6882c436f
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Thu Jul 26 14:56:08 2018 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Thu Jul 26 14:56:08 2018 +0200
test: Remove excessive comma resulting in empty flavour
---
test/Makefile.in | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/Makefile.in b/test/Makefile.in
index 5185322..a9bb083 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -123,12 +123,12 @@ help:
check: .tests-stamp
VERBOSE=$(VERBOSE) ./lib/runner \
--testdir . --outdir $(LVM_TEST_RESULTS) \
- --flavours ndev-vanilla,$(LVMETAD_NDEV_FLAVOUR)$(LVMPOLLD_NDEV_FLAVOUR) --only $(T) --skip $(S)
+ --flavours ndev-vanilla$(LVMPOLLD_NDEV_FLAVOUR) --only $(T) --skip $(S)
check_system: .tests-stamp
VERBOSE=$(VERBOSE) ./lib/runner \
--testdir . --outdir $(LVM_TEST_RESULTS) \
- --flavours udev-vanilla,$(LVMETAD_UDEV_FLAVOUR)$(LVMPOLLD_UDEV_FLAVOUR)$(LVMLOCKD_UDEV_FLAVOUR) --only $(T) --skip $(S)
+ --flavours udev-vanilla$(LVMPOLLD_UDEV_FLAVOUR)$(LVMLOCKD_UDEV_FLAVOUR) --only $(T) --skip $(S)
check_local: .tests-stamp
VERBOSE=$(VERBOSE) ./lib/runner \
5 years, 4 months
master - lvconvert: reject conversions on raid1 split trackchanges LVs
by Heinz Mauelshagen
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a004bb07f14baeed158...
Commit: a004bb07f14baeed158ac9ea571cf5a6882c436f
Parent: 8b0729af0fd357e66e95834e92913ea2a42d4e93
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Thu Jul 26 01:47:39 2018 +0200
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Thu Jul 26 02:05:54 2018 +0200
lvconvert: reject conversions on raid1 split trackchanges LVs
Prohibit, because the tracking can't continue and
further conversions may fail with bogus error messages.
Resolves: rhbz1579072
---
WHATS_NEW | 1 +
test/shell/lvconvert-raid1-split-trackchanges.sh | 7 +++++++
tools/lvconvert.c | 6 ++++++
3 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 4502b52..2c5b5d3 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 3.0.0
=============
+ lvconvert: reject conversions on raid1 LVs with split tracked SubLVs
lvconvert: reject conversions on raid1 split tracked SubLVs
Add basic creation support for VDO target.
Never send any discard ioctl with test mode.
diff --git a/test/shell/lvconvert-raid1-split-trackchanges.sh b/test/shell/lvconvert-raid1-split-trackchanges.sh
index e25a632..718c254 100644
--- a/test/shell/lvconvert-raid1-split-trackchanges.sh
+++ b/test/shell/lvconvert-raid1-split-trackchanges.sh
@@ -27,6 +27,13 @@ vgcreate $SHARED -s 512k "$vg" "${DEVICES[@]}"
lvcreate -y --ty raid1 -m 2 -n $lv1 -l 1 $vg
lvconvert -y --splitmirrors 1 --trackchanges $vg/$lv1
+not lvconvert -y --ty linear $vg/$lv1
+not lvconvert -y --ty striped -i 3 $vg/$lv1
+not lvconvert -y --ty mirror $vg/$lv1
+not lvconvert -y --ty raid4 $vg/$lv1
+not lvconvert -y --ty raid5 $vg/$lv1
+not lvconvert -y --ty raid6 $vg/$lv1
+not lvconvert -y --ty raid10 $vg/$lv1
not lvconvert -y --ty striped -m 1 $vg/${lv1}_rimage_2
not lvconvert -y --ty raid1 -m 1 $vg/${lv1}_rimage_2
not lvconvert -y --ty mirror -m 1 $vg/${lv1}_rimage_2
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index a5382ef..dbc5ab0 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -1161,6 +1161,12 @@ static int _raid_split_image_conversion(struct logical_volume *lv)
{
const char *s;
+ if (lv_is_raid_with_tracking(lv)) {
+ log_error("Conversion of tracking raid1 LV %s is not supported.",
+ display_lvname(lv));
+ return 1;
+ }
+
if (lv_is_raid_image(lv) &&
(s = strstr(lv->name, "_rimage_"))) {
size_t len = s - lv->name;
5 years, 4 months
master - lvconvert: reject conversions on raid1 split trackchanges SubLVs
by Heinz Mauelshagen
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=8b0729af0fd357e66e9...
Commit: 8b0729af0fd357e66e95834e92913ea2a42d4e93
Parent: 2f43f0393e9d7b85578895aa2e31314a4565e47d
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Thu Jul 26 01:00:11 2018 +0200
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Thu Jul 26 02:05:49 2018 +0200
lvconvert: reject conversions on raid1 split trackchanges SubLVs
Prohibit conversions of raid1 split trackchanges SubLVs
because they will fail to get merged back into the RaidLV.
Resolves: rhbz1579438
---
WHATS_NEW | 1 +
test/shell/lvconvert-raid1-split-trackchanges.sh | 36 +++++++++++++++++
tools/lvconvert.c | 45 ++++++++++++++++++++++
3 files changed, 82 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 407cb7e..4502b52 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 3.0.0
=============
+ lvconvert: reject conversions on raid1 split tracked SubLVs
Add basic creation support for VDO target.
Never send any discard ioctl with test mode.
Fix thin-pool alloc which needs same PV for data and metadata.
diff --git a/test/shell/lvconvert-raid1-split-trackchanges.sh b/test/shell/lvconvert-raid1-split-trackchanges.sh
new file mode 100644
index 0000000..e25a632
--- /dev/null
+++ b/test/shell/lvconvert-raid1-split-trackchanges.sh
@@ -0,0 +1,36 @@
+#!/usr/bin/env bash
+
+# Copyright (C) 2018 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
+
+# rhbz1579072/rhbz1579438
+
+aux have_raid 1 3 0 || skip
+
+# 8 PVs needed for RAID10 testing (4-stripes/2-mirror)
+aux prepare_pvs 4 2
+get_devs
+vgcreate $SHARED -s 512k "$vg" "${DEVICES[@]}"
+
+lvcreate -y --ty raid1 -m 2 -n $lv1 -l 1 $vg
+lvconvert -y --splitmirrors 1 --trackchanges $vg/$lv1
+
+not lvconvert -y --ty striped -m 1 $vg/${lv1}_rimage_2
+not lvconvert -y --ty raid1 -m 1 $vg/${lv1}_rimage_2
+not lvconvert -y --ty mirror -m 1 $vg/${lv1}_rimage_2
+not lvconvert -y --ty cache-pool $vg/${lv1}_rimage_2
+not lvconvert -y --ty thin-pool $vg/${lv1}_rimage_2
+
+vgremove -ff $vg
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 4871f7f..a5382ef 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -1156,6 +1156,36 @@ static int _lvconvert_validate_thin(struct logical_volume *lv,
return 0;
}
+/* Check for raid1 split trackchanges image to reject conversions on it. */
+static int _raid_split_image_conversion(struct logical_volume *lv)
+{
+ const char *s;
+
+ if (lv_is_raid_image(lv) &&
+ (s = strstr(lv->name, "_rimage_"))) {
+ size_t len = s - lv->name;
+ char raidlv_name[len + 1];
+ const struct logical_volume *tmp_lv;
+
+ strncpy(raidlv_name, lv->name, len);
+ raidlv_name[len] = '\0';
+
+ if (!(tmp_lv = find_lv(lv->vg, raidlv_name))) {
+ log_error(INTERNAL_ERROR "Failed to find RaidLV of RAID subvolume %s.",
+ display_lvname(lv));
+ return 1;
+ }
+
+ if (lv_is_raid_with_tracking(tmp_lv)) {
+ log_error("Conversion of tracked raid1 subvolume %s is not supported.",
+ display_lvname(lv));
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
/*
* _lvconvert_mirrors
*
@@ -1171,6 +1201,9 @@ static int _lvconvert_mirrors(struct cmd_context *cmd,
uint32_t new_mimage_count = 0;
uint32_t new_log_count = 0;
+ if (_raid_split_image_conversion(lv))
+ return 0;
+
if ((lp->corelog || lp->mirrorlog) && *lp->type_str && strcmp(lp->type_str, SEG_TYPE_NAME_MIRROR)) {
log_error("--corelog and --mirrorlog are only compatible with mirror devices.");
return 0;
@@ -1287,6 +1320,9 @@ static int _lvconvert_raid(struct logical_volume *lv, struct lvconvert_params *l
struct cmd_context *cmd = lv->vg->cmd;
struct lv_segment *seg = first_seg(lv);
+ if (_raid_split_image_conversion(lv))
+ return 0;
+
if (_linear_type_requested(lp->type_str)) {
if (arg_is_set(cmd, mirrors_ARG) && (arg_uint_value(cmd, mirrors_ARG, 0) != 0)) {
log_error("Cannot specify mirrors with linear type.");
@@ -2561,6 +2597,9 @@ static int _lvconvert_to_thin_with_external(struct cmd_context *cmd,
.virtual_extents = lv->le_count,
};
+ if (_raid_split_image_conversion(lv))
+ return 0;
+
if (lv == thinpool_lv) {
log_error("Can't use same LV %s for thin pool and thin volume.",
display_lvname(thinpool_lv));
@@ -2870,6 +2909,9 @@ static int _lvconvert_to_pool(struct cmd_context *cmd,
struct id lockd_meta_id;
const char *str_seg_type = to_cachepool ? SEG_TYPE_NAME_CACHE_POOL : SEG_TYPE_NAME_THIN_POOL;
+ if (_raid_split_image_conversion(lv))
+ return 0;
+
if (lv_is_thin_pool(lv) || lv_is_cache_pool(lv)) {
log_error(INTERNAL_ERROR "LV %s is already a pool.", display_lvname(lv));
return 0;
@@ -3321,6 +3363,9 @@ static int _lvconvert_to_cache_vol(struct cmd_context *cmd,
struct dm_config_tree *policy_settings = NULL;
int r = 0;
+ if (_raid_split_image_conversion(lv))
+ return 0;
+
/* If LV is inactive here, ensure it's not active elsewhere. */
if (!lockd_lv(cmd, lv, "ex", 0))
return_0;
5 years, 4 months
master - lvconvert: reject split trackchanges conversions
by Heinz Mauelshagen
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=67b3a44a74352d9eb9b...
Commit: 67b3a44a74352d9eb9bf435aeef631dfc3b874ab
Parent: 2f43f0393e9d7b85578895aa2e31314a4565e47d
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Thu Jul 26 01:00:11 2018 +0200
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Thu Jul 26 01:34:55 2018 +0200
lvconvert: reject split trackchanges conversions
Prohibit conversions of raid1 split trackchanges SubLVs
because they will fail to get merged back into the RaidLV.
Resolves: rhbz1579072
Resolves: rhbz1579438
---
WHATS_NEW | 1 +
test/shell/lvconvert-raid1-split-trackchanges.sh | 36 +++++++++++++++++
tools/lvconvert.c | 45 ++++++++++++++++++++++
3 files changed, 82 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 407cb7e..4502b52 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 3.0.0
=============
+ lvconvert: reject conversions on raid1 split tracked SubLVs
Add basic creation support for VDO target.
Never send any discard ioctl with test mode.
Fix thin-pool alloc which needs same PV for data and metadata.
diff --git a/test/shell/lvconvert-raid1-split-trackchanges.sh b/test/shell/lvconvert-raid1-split-trackchanges.sh
new file mode 100644
index 0000000..e25a632
--- /dev/null
+++ b/test/shell/lvconvert-raid1-split-trackchanges.sh
@@ -0,0 +1,36 @@
+#!/usr/bin/env bash
+
+# Copyright (C) 2018 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
+
+# rhbz1579072/rhbz1579438
+
+aux have_raid 1 3 0 || skip
+
+# 8 PVs needed for RAID10 testing (4-stripes/2-mirror)
+aux prepare_pvs 4 2
+get_devs
+vgcreate $SHARED -s 512k "$vg" "${DEVICES[@]}"
+
+lvcreate -y --ty raid1 -m 2 -n $lv1 -l 1 $vg
+lvconvert -y --splitmirrors 1 --trackchanges $vg/$lv1
+
+not lvconvert -y --ty striped -m 1 $vg/${lv1}_rimage_2
+not lvconvert -y --ty raid1 -m 1 $vg/${lv1}_rimage_2
+not lvconvert -y --ty mirror -m 1 $vg/${lv1}_rimage_2
+not lvconvert -y --ty cache-pool $vg/${lv1}_rimage_2
+not lvconvert -y --ty thin-pool $vg/${lv1}_rimage_2
+
+vgremove -ff $vg
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 4871f7f..a5382ef 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -1156,6 +1156,36 @@ static int _lvconvert_validate_thin(struct logical_volume *lv,
return 0;
}
+/* Check for raid1 split trackchanges image to reject conversions on it. */
+static int _raid_split_image_conversion(struct logical_volume *lv)
+{
+ const char *s;
+
+ if (lv_is_raid_image(lv) &&
+ (s = strstr(lv->name, "_rimage_"))) {
+ size_t len = s - lv->name;
+ char raidlv_name[len + 1];
+ const struct logical_volume *tmp_lv;
+
+ strncpy(raidlv_name, lv->name, len);
+ raidlv_name[len] = '\0';
+
+ if (!(tmp_lv = find_lv(lv->vg, raidlv_name))) {
+ log_error(INTERNAL_ERROR "Failed to find RaidLV of RAID subvolume %s.",
+ display_lvname(lv));
+ return 1;
+ }
+
+ if (lv_is_raid_with_tracking(tmp_lv)) {
+ log_error("Conversion of tracked raid1 subvolume %s is not supported.",
+ display_lvname(lv));
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
/*
* _lvconvert_mirrors
*
@@ -1171,6 +1201,9 @@ static int _lvconvert_mirrors(struct cmd_context *cmd,
uint32_t new_mimage_count = 0;
uint32_t new_log_count = 0;
+ if (_raid_split_image_conversion(lv))
+ return 0;
+
if ((lp->corelog || lp->mirrorlog) && *lp->type_str && strcmp(lp->type_str, SEG_TYPE_NAME_MIRROR)) {
log_error("--corelog and --mirrorlog are only compatible with mirror devices.");
return 0;
@@ -1287,6 +1320,9 @@ static int _lvconvert_raid(struct logical_volume *lv, struct lvconvert_params *l
struct cmd_context *cmd = lv->vg->cmd;
struct lv_segment *seg = first_seg(lv);
+ if (_raid_split_image_conversion(lv))
+ return 0;
+
if (_linear_type_requested(lp->type_str)) {
if (arg_is_set(cmd, mirrors_ARG) && (arg_uint_value(cmd, mirrors_ARG, 0) != 0)) {
log_error("Cannot specify mirrors with linear type.");
@@ -2561,6 +2597,9 @@ static int _lvconvert_to_thin_with_external(struct cmd_context *cmd,
.virtual_extents = lv->le_count,
};
+ if (_raid_split_image_conversion(lv))
+ return 0;
+
if (lv == thinpool_lv) {
log_error("Can't use same LV %s for thin pool and thin volume.",
display_lvname(thinpool_lv));
@@ -2870,6 +2909,9 @@ static int _lvconvert_to_pool(struct cmd_context *cmd,
struct id lockd_meta_id;
const char *str_seg_type = to_cachepool ? SEG_TYPE_NAME_CACHE_POOL : SEG_TYPE_NAME_THIN_POOL;
+ if (_raid_split_image_conversion(lv))
+ return 0;
+
if (lv_is_thin_pool(lv) || lv_is_cache_pool(lv)) {
log_error(INTERNAL_ERROR "LV %s is already a pool.", display_lvname(lv));
return 0;
@@ -3321,6 +3363,9 @@ static int _lvconvert_to_cache_vol(struct cmd_context *cmd,
struct dm_config_tree *policy_settings = NULL;
int r = 0;
+ if (_raid_split_image_conversion(lv))
+ return 0;
+
/* If LV is inactive here, ensure it's not active elsewhere. */
if (!lockd_lv(cmd, lv, "ex", 0))
return_0;
5 years, 4 months
master - test: new lvcreate-raid1-error-read.sh
by Heinz Mauelshagen
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=2f43f0393e9d7b85578...
Commit: 2f43f0393e9d7b85578895aa2e31314a4565e47d
Parent: 706606627f9b1ca75bb49466ae9aee04d858c2d9
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Tue Jul 24 20:38:22 2018 +0200
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Tue Jul 24 20:41:26 2018 +0200
test: new lvcreate-raid1-error-read.sh
Test for MD RAID kernel bug in read_balance() preventing
reads of failed sectors to get rescheduled to another leg.
---
test/shell/lvcreate-raid1-read-error.sh | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/test/shell/lvcreate-raid1-read-error.sh b/test/shell/lvcreate-raid1-read-error.sh
new file mode 100644
index 0000000..6907758
--- /dev/null
+++ b/test/shell/lvcreate-raid1-read-error.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+# Copyright (C) 2018 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_LVMLOCKD=1
+SKIP_WITH_LVMPOLLD=1
+
+. lib/inittest
+
+# Test for MD raid1 kernel bug causing read
+# errors on failing first leg sectors.
+
+# Create VG with 2 PVs
+aux prepare_vg 2 2
+
+# Create 2-legged raid1 LV
+lvcreate --yes --type raid1 --mirrors 1 --extents 1 --name $lv $vg
+aux wait_for_sync $vg $lv
+
+aux error_dev "$dev1" 20:500
+
+dd if=$DM_DEV_DIR/$vg/$lv iflag=direct,fullblock of=/dev/zero bs=128K count=1
+
+vgremove --force $vg
5 years, 4 months
master - spec: Fix conditional
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=706606627f9b1ca75bb...
Commit: 706606627f9b1ca75bb49466ae9aee04d858c2d9
Parent: 5ff18f51b9d004075b7185218afa6e7a74a88277
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Tue Jul 24 16:22:23 2018 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Tue Jul 24 16:22:23 2018 +0200
spec: Fix conditional
---
spec/packages.inc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/spec/packages.inc b/spec/packages.inc
index 702288c..38f90ec 100644
--- a/spec/packages.inc
+++ b/spec/packages.inc
@@ -165,7 +165,7 @@ fi
%{_sysconfdir}/lvm/profile/cache-mq.profile
%{_sysconfdir}/lvm/profile/cache-smq.profile
%{_sysconfdir}/lvm/profile/lvmdbusd.profile
-%if %{enable_vdo}
+%if %{have_with vdo}
%{_sysconfdir}/lvm/profile/vdo-small.profile
%endif
%dir %{_sysconfdir}/lvm/backup
@@ -240,7 +240,7 @@ This package contains shared lvm2 libraries for applications.
%{_libdir}/libdevmapper-event-lvm2mirror.so
%{_libdir}/libdevmapper-event-lvm2snapshot.so
%{_libdir}/libdevmapper-event-lvm2raid.so
-%if %{enable_vdo}
+%if %{have_with vdo}
%{_libdir}/device-mapper/libdevmapper-event-lvm2vdo.so
%{_libdir}/libdevmapper-event-lvm2vdo.so
%endif
5 years, 4 months
master - build: Update configure
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=5ff18f51b9d004075b7...
Commit: 5ff18f51b9d004075b7185218afa6e7a74a88277
Parent: 279f3bfdc00883a9ff3ea11fd7c6cc5455a58519
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Tue Jul 24 16:17:42 2018 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Tue Jul 24 16:17:42 2018 +0200
build: Update configure
---
configure | 80 ++----------------------------------------------------------
1 files changed, 3 insertions(+), 77 deletions(-)
diff --git a/configure b/configure
index a96de76..4ad2d4d 100755
--- a/configure
+++ b/configure
@@ -638,7 +638,6 @@ interface
CMIRRORD_PIDFILE
LVMLOCKD_PIDFILE
LVMPOLLD_PIDFILE
-LVMETAD_PIDFILE
DMEVENTD_PIDFILE
WRITE_INSTALL
VDO_LIB
@@ -718,7 +717,6 @@ DLM_CFLAGS
DEVMAPPER
DEFAULT_USE_LVMLOCKD
DEFAULT_USE_LVMPOLLD
-DEFAULT_USE_LVMETAD
DEFAULT_USE_BLKID_WIPING
DEFAULT_SYS_LOCK_DIR
DEFAULT_SYS_DIR
@@ -749,7 +747,6 @@ BUILD_LOCKDDLM
BUILD_LOCKDSANLOCK
BUILD_LVMLOCKD
BUILD_LVMPOLLD
-BUILD_LVMETAD
BUILD_LVMDBUSD
BUILD_DMEVENTD
BUILD_CMIRRORD
@@ -932,14 +929,11 @@ with_optimisation
enable_profiling
enable_valgrind_pool
enable_devmapper
-enable_lvmetad
enable_lvmpolld
enable_lvmlockd_sanlock
enable_lvmlockd_dlm
enable_use_lvmlockd
with_lvmlockd_pidfile
-enable_use_lvmetad
-with_lvmetad_pidfile
enable_use_lvmpolld
with_lvmpolld_pidfile
enable_dmfilemapd
@@ -1646,13 +1640,11 @@ Optional Features:
--enable-profiling gather gcov profiling data
--enable-valgrind-pool enable valgrind awareness of pools
--disable-devmapper disable LVM2 device-mapper interaction
- --enable-lvmetad enable the LVM Metadata Daemon
--enable-lvmpolld enable the LVM Polling Daemon
--enable-lvmlockd-sanlock
enable the LVM lock daemon using sanlock
--enable-lvmlockd-dlm enable the LVM lock daemon using dlm
--disable-use-lvmlockd disable usage of LVM lock daemon
- --disable-use-lvmetad disable usage of LVM Metadata Daemon
--disable-use-lvmpolld disable usage of LVM Poll Daemon
--enable-dmfilemapd enable the dmstats filemap daemon
--enable-notify-dbus enable LVM notification using dbus
@@ -1729,8 +1721,6 @@ Optional Packages:
--with-optimisation=OPT C optimisation flag [OPT=-O2]
--with-lvmlockd-pidfile=PATH
lvmlockd pidfile [PID_DIR/lvmlockd.pid]
- --with-lvmetad-pidfile=PATH
- lvmetad pidfile [PID_DIR/lvmetad.pid]
--with-lvmpolld-pidfile=PATH
lvmpolld pidfile [PID_DIR/lvmpolld.pid]
--with-localedir=DIR locale-dependent data [DATAROOTDIR/locale]
@@ -3086,7 +3076,6 @@ case "$host_os" in
LDDEPS="$LDDEPS .export.sym"
LIB_SUFFIX=so
DEVMAPPER=yes
- BUILD_LVMETAD=no
BUILD_LVMPOLLD=no
LOCKDSANLOCK=no
LOCKDDLM=no
@@ -10739,18 +10728,6 @@ $as_echo "#define DEVMAPPER_SUPPORT 1" >>confdefs.h
fi
################################################################################
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build LVMetaD" >&5
-$as_echo_n "checking whether to build LVMetaD... " >&6; }
-# Check whether --enable-lvmetad was given.
-if test "${enable_lvmetad+set}" = set; then :
- enableval=$enable_lvmetad; LVMETAD=$enableval
-fi
-
-test -n "$LVMETAD" && BUILD_LVMETAD=$LVMETAD
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LVMETAD" >&5
-$as_echo "$BUILD_LVMETAD" >&6; }
-
-################################################################################
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build lvmpolld" >&5
$as_echo_n "checking whether to build lvmpolld... " >&6; }
# Check whether --enable-lvmpolld was given.
@@ -10956,17 +10933,10 @@ if test "$BUILD_LVMLOCKD" = yes; then
if test "$LVMPOLLD" = no; then :
as_fn_error $? "cannot build lvmlockd with --disable-lvmpolld." "$LINENO" 5
fi
- if test "$LVMETAD" = no; then :
- as_fn_error $? "cannot build lvmlockd with --disable-lvmetad." "$LINENO" 5
-fi
if test "$BUILD_LVMPOLLD" = no; then :
BUILD_LVMPOLLD=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Enabling lvmpolld - required by lvmlockd." >&5
$as_echo "$as_me: WARNING: Enabling lvmpolld - required by lvmlockd." >&2;}
fi
- if test "$BUILD_LVMETAD" = no; then :
- BUILD_LVMETAD=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Enabling lvmetad - required by lvmlockd." >&5
-$as_echo "$as_me: WARNING: Enabling lvmetad - required by lvmlockd." >&2;}
-fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking defaults for use_lvmlockd" >&5
$as_echo_n "checking defaults for use_lvmlockd... " >&6; }
# Check whether --enable-use_lvmlockd was given.
@@ -11008,48 +10978,6 @@ _ACEOF
################################################################################
-if test "$BUILD_LVMETAD" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking defaults for use_lvmetad" >&5
-$as_echo_n "checking defaults for use_lvmetad... " >&6; }
- # Check whether --enable-use_lvmetad was given.
-if test "${enable_use_lvmetad+set}" = set; then :
- enableval=$enable_use_lvmetad; case ${enableval} in
- yes) DEFAULT_USE_LVMETAD=1 ;;
- *) DEFAULT_USE_LVMETAD=0 ;;
- esac
-else
- DEFAULT_USE_LVMETAD=1
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_USE_LVMETAD" >&5
-$as_echo "$DEFAULT_USE_LVMETAD" >&6; }
-
-$as_echo "#define LVMETAD_SUPPORT 1" >>confdefs.h
-
-
-
-# Check whether --with-lvmetad-pidfile was given.
-if test "${with_lvmetad_pidfile+set}" = set; then :
- withval=$with_lvmetad_pidfile; LVMETAD_PIDFILE=$withval
-else
- LVMETAD_PIDFILE="$DEFAULT_PID_DIR/lvmetad.pid"
-fi
-
-
-cat >>confdefs.h <<_ACEOF
-#define LVMETAD_PIDFILE "$LVMETAD_PIDFILE"
-_ACEOF
-
-else
- DEFAULT_USE_LVMETAD=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define DEFAULT_USE_LVMETAD $DEFAULT_USE_LVMETAD
-_ACEOF
-
-
-################################################################################
if test "$BUILD_LVMPOLLD" = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking defaults for use_lvmpolld" >&5
$as_echo_n "checking defaults for use_lvmpolld... " >&6; }
@@ -13838,8 +13766,10 @@ _ACEOF
+
+
################################################################################
-ac_config_files="$ac_config_files Makefile make.tmpl libdm/make.tmpl daemons/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/dmeventd/plugins/vdo/Makefile daemons/lvmdbusd/Makefile daemons/lvmdbusd/lvmdbusd daemons/lvmdbusd/lvmdb.py daemons/lvmdbusd/lvm_shell_proxy.py daemons/lvmdbusd/path.py daemons/lvmetad/Makefile daemons/lvmpolld/Makefile daemons/lvmlockd/Makefile conf/Makefile conf/example.conf conf/lvmlocal.conf conf/command_profile_template.profile conf/metadata_profile_template.profile include/Makefile lib/Makefile include/lvm-version.h libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/dm-tools/Makefile libdm/libdevmapper.pc man/Makefile po/Mak
efile scripts/blkdeactivate.sh scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/cmirrord_init_red_hat scripts/com.redhat.lvmdbus1.service scripts/dm_event_systemd_red_hat.service scripts/dm_event_systemd_red_hat.socket scripts/lvm2_cmirrord_systemd_red_hat.service scripts/lvm2_lvmdbusd_systemd_red_hat.service scripts/lvm2_lvmetad_init_red_hat scripts/lvm2_lvmetad_systemd_red_hat.service scripts/lvm2_lvmetad_systemd_red_hat.socket scripts/lvm2_lvmpolld_init_red_hat scripts/lvm2_lvmpolld_systemd_red_hat.service scripts/lvm2_lvmpolld_systemd_red_hat.socket scripts/lvm2_lvmlockd_systemd_red_hat.service scripts/lvm2_monitoring_init_red_hat scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_pvscan_systemd_red_hat@.service scripts/lvm2_tmpfiles_red_hat.conf scripts/lvmdump.sh scripts/Makefile test/Makefile tools/Makefile udev/Makefile"
+ac_config_files="$ac_config_files Makefile make.tmpl libdm/make.tmpl daemons/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/dmeventd/plugins/vdo/Makefile daemons/lvmdbusd/Makefile daemons/lvmdbusd/lvmdbusd daemons/lvmdbusd/lvmdb.py daemons/lvmdbusd/lvm_shell_proxy.py daemons/lvmdbusd/path.py daemons/lvmpolld/Makefile daemons/lvmlockd/Makefile conf/Makefile conf/example.conf conf/lvmlocal.conf conf/command_profile_template.profile conf/metadata_profile_template.profile include/Makefile lib/Makefile include/lvm-version.h libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/dm-tools/Makefile libdm/libdevmapper.pc man/Makefile po/Makefile scripts/blkdeactiva
te.sh scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/cmirrord_init_red_hat scripts/com.redhat.lvmdbus1.service scripts/dm_event_systemd_red_hat.service scripts/dm_event_systemd_red_hat.socket scripts/lvm2_cmirrord_systemd_red_hat.service scripts/lvm2_lvmdbusd_systemd_red_hat.service scripts/lvm2_lvmpolld_init_red_hat scripts/lvm2_lvmpolld_systemd_red_hat.service scripts/lvm2_lvmpolld_systemd_red_hat.socket scripts/lvm2_lvmlockd_systemd_red_hat.service scripts/lvm2_monitoring_init_red_hat scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_pvscan_systemd_red_hat@.service scripts/lvm2_tmpfiles_red_hat.conf scripts/lvmdump.sh scripts/Makefile test/Makefile tools/Makefile udev/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -14553,7 +14483,6 @@ do
"daemons/lvmdbusd/lvmdb.py") CONFIG_FILES="$CONFIG_FILES daemons/lvmdbusd/lvmdb.py" ;;
"daemons/lvmdbusd/lvm_shell_proxy.py") CONFIG_FILES="$CONFIG_FILES daemons/lvmdbusd/lvm_shell_proxy.py" ;;
"daemons/lvmdbusd/path.py") CONFIG_FILES="$CONFIG_FILES daemons/lvmdbusd/path.py" ;;
- "daemons/lvmetad/Makefile") CONFIG_FILES="$CONFIG_FILES daemons/lvmetad/Makefile" ;;
"daemons/lvmpolld/Makefile") CONFIG_FILES="$CONFIG_FILES daemons/lvmpolld/Makefile" ;;
"daemons/lvmlockd/Makefile") CONFIG_FILES="$CONFIG_FILES daemons/lvmlockd/Makefile" ;;
"conf/Makefile") CONFIG_FILES="$CONFIG_FILES conf/Makefile" ;;
@@ -14581,9 +14510,6 @@ do
"scripts/dm_event_systemd_red_hat.socket") CONFIG_FILES="$CONFIG_FILES scripts/dm_event_systemd_red_hat.socket" ;;
"scripts/lvm2_cmirrord_systemd_red_hat.service") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_cmirrord_systemd_red_hat.service" ;;
"scripts/lvm2_lvmdbusd_systemd_red_hat.service") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_lvmdbusd_systemd_red_hat.service" ;;
- "scripts/lvm2_lvmetad_init_red_hat") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_lvmetad_init_red_hat" ;;
- "scripts/lvm2_lvmetad_systemd_red_hat.service") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_lvmetad_systemd_red_hat.service" ;;
- "scripts/lvm2_lvmetad_systemd_red_hat.socket") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_lvmetad_systemd_red_hat.socket" ;;
"scripts/lvm2_lvmpolld_init_red_hat") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_lvmpolld_init_red_hat" ;;
"scripts/lvm2_lvmpolld_systemd_red_hat.service") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_lvmpolld_systemd_red_hat.service" ;;
"scripts/lvm2_lvmpolld_systemd_red_hat.socket") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_lvmpolld_systemd_red_hat.socket" ;;
5 years, 4 months
master - spec: Add vdo files
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=279f3bfdc00883a9ff3...
Commit: 279f3bfdc00883a9ff3ea11fd7c6cc5455a58519
Parent: 97506a7e2ac4cd4e9a6fd77e4a49a45fd565c3e5
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Tue Jul 24 15:37:15 2018 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Tue Jul 24 15:41:30 2018 +0200
spec: Add vdo files
---
spec/packages.inc | 7 +++++++
spec/source.inc | 2 ++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/spec/packages.inc b/spec/packages.inc
index ba9bd47..702288c 100644
--- a/spec/packages.inc
+++ b/spec/packages.inc
@@ -165,6 +165,9 @@ fi
%{_sysconfdir}/lvm/profile/cache-mq.profile
%{_sysconfdir}/lvm/profile/cache-smq.profile
%{_sysconfdir}/lvm/profile/lvmdbusd.profile
+%if %{enable_vdo}
+ %{_sysconfdir}/lvm/profile/vdo-small.profile
+%endif
%dir %{_sysconfdir}/lvm/backup
%dir %{_sysconfdir}/lvm/cache
%dir %{_sysconfdir}/lvm/archive
@@ -237,6 +240,10 @@ This package contains shared lvm2 libraries for applications.
%{_libdir}/libdevmapper-event-lvm2mirror.so
%{_libdir}/libdevmapper-event-lvm2snapshot.so
%{_libdir}/libdevmapper-event-lvm2raid.so
+%if %{enable_vdo}
+%{_libdir}/device-mapper/libdevmapper-event-lvm2vdo.so
+%{_libdir}/libdevmapper-event-lvm2vdo.so
+%endif
##############################################################################
diff --git a/spec/source.inc b/spec/source.inc
index 05eb9c2..4561e8a 100644
--- a/spec/source.inc
+++ b/spec/source.inc
@@ -37,6 +37,8 @@
%with thin_check %{_sbindir}/thin_check
%with thin_repair %{_sbindir}/thin_repair
%with thin_dump %{_sbindir}/thin_dump
+%with vdo internal
+%with vdo-format %{_bindir}/vdoformat
%global buildreq_udev systemd-devel
%global req_udev udev >= 181-1
5 years, 4 months