stable-2.02 - lvconvert: allow --stripes/--stripesize in 'mirror' conversions
by Heinz Mauelshagen
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e3c8cebd87f9bd75915...
Commit: e3c8cebd87f9bd7591529f3d65783cc6f1fd3f92
Parent: 2f846697fcb16b2e0954a051577bd47c8cf6721c
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Mon Jul 8 19:07:18 2019 +0200
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Mon Jul 8 19:14:11 2019 +0200
lvconvert: allow --stripes/--stripesize in 'mirror' conversions
This allows the creation of a striped mirror leg(s) during upconvert
by adding lvconvert command line options --stripes/--stripesize
for 'mirror' to tools/command-lines.in.
In case multiple mirror legs are being added, all will have the
same requested striped layout.
Resolves: rhbz1720705
---
tools/command-lines.in | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/tools/command-lines.in b/tools/command-lines.in
index a8c06ba..b4a9896 100644
--- a/tools/command-lines.in
+++ b/tools/command-lines.in
@@ -334,13 +334,11 @@ DESC: Convert LV to striped.
RULE: all not lv_is_locked lv_is_pvmove
lvconvert --type mirror LV
-OO: --mirrors SNumber, --regionsize RegionSize, --interval Number, --mirrorlog MirrorLog, OO_LVCONVERT
+OO: --mirrors SNumber, --stripes_long Number, --stripesize SizeKB, --regionsize RegionSize, --interval Number, --mirrorlog MirrorLog, OO_LVCONVERT
OP: PV ...
ID: lvconvert_raid_types
DESC: Convert LV to type mirror (also see type raid1),
-DESC: (also see lvconvert --mirrors).
RULE: all not lv_is_locked lv_is_pvmove
-FLAGS: SECONDARY_SYNTAX
# When LV is already raid, this changes the raid layout
# (changing layout of raid0 and raid1 not allowed.)
4 years, 9 months
stable-2.02 - tests: add settle wait before issue remove
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=2f846697fcb16b2e095...
Commit: 2f846697fcb16b2e0954a051577bd47c8cf6721c
Parent: cff9bff0afc21d9593dd6585bbd375384fdf47be
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Jul 4 16:58:27 2019 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Jul 6 01:24:28 2019 +0200
tests: add settle wait before issue remove
Some older BB with older cryptsetup tool do not 'retry' on remove
and when remove is issued right after 'fsck' - it might be
rejected with:
Device @PREFIX@-tcrypt2 is busy.
Try to use udevadm settle.
---
test/shell/fsadm-crypt.sh | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/test/shell/fsadm-crypt.sh b/test/shell/fsadm-crypt.sh
index 9377e89..4b8fc4e 100644
--- a/test/shell/fsadm-crypt.sh
+++ b/test/shell/fsadm-crypt.sh
@@ -83,6 +83,7 @@ export LVM_BINARY
test ! -d "$mount_dir" && mkdir "$mount_dir"
crypt_close() {
+ aux udev_wait
cryptsetup remove "$1"
if [ "$?" -eq 0 -a -n "$DROP_SYMLINK" ]; then
rm -f "$DM_DEV_DIR/mapper/$1"
4 years, 9 months
stable-2.02 - tests: fsadm-crypt.sh update mkfs parameter
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=cff9bff0afc21d9593d...
Commit: cff9bff0afc21d9593dd6585bbd375384fdf47be
Parent: 143aca25daa2303a9494bace28262e64bd77698d
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue May 21 14:46:01 2019 -0500
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Jul 6 01:24:28 2019 +0200
tests: fsadm-crypt.sh update mkfs parameter
mkfs.xfs was rejecting previously working value
---
test/shell/fsadm-crypt.sh | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/test/shell/fsadm-crypt.sh b/test/shell/fsadm-crypt.sh
index 68fed95..9377e89 100644
--- a/test/shell/fsadm-crypt.sh
+++ b/test/shell/fsadm-crypt.sh
@@ -268,7 +268,7 @@ test_ext3_small_shrink() {
}
test_xfs_resize() {
- mkfs.xfs -l internal,size=1000b -f "$3"
+ mkfs.xfs -l internal,size=1536b -f "$3"
fsadm --lvresize resize $1 30M
# Fails - not enough space for 4M fs
@@ -283,7 +283,7 @@ test_xfs_resize() {
}
test_xfs_small_shrink() {
- mkfs.xfs -l internal,size=1000b -f "$3"
+ mkfs.xfs -l internal,size=1536b -f "$3"
not lvresize -L-1 -r $1
fscheck_xfs "$3"
@@ -347,7 +347,7 @@ test_ext3_inactive() {
test_xfs_inactive() {
crypt_open "$2" $PWD2 "$4"
- mkfs.xfs -l internal,size=1000b -f "$3"
+ mkfs.xfs -l internal,size=1536b -f "$3"
crypt_close "$4"
not fsadm --lvresize resize $1 30M
@@ -428,7 +428,7 @@ test_ext3_plain() {
}
test_xfs_plain() {
- mkfs.xfs -l internal,size=1000b -f "$3"
+ mkfs.xfs -l internal,size=1536b -f "$3"
not fsadm --lvresize resize $1 30M
not lvresize -L+10M -r $1
@@ -494,7 +494,7 @@ test_ext3_detached() {
}
test_xfs_detached() {
- mkfs.xfs -l internal,size=1000b -f "$3"
+ mkfs.xfs -l internal,size=1536b -f "$3"
not fsadm --lvresize resize $1 30M
not lvresize -L+10M -r $1
4 years, 9 months
stable-2.02 - tests: split args
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=143aca25daa2303a949...
Commit: 143aca25daa2303a9494bace28262e64bd77698d
Parent: 1e9c409a3eef3c18f97b70a3d679ea24a2458886
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon May 6 13:02:45 2019 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Jul 6 01:24:28 2019 +0200
tests: split args
Here we want args to be splited into individual strings.
---
test/shell/fsadm-crypt.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/shell/fsadm-crypt.sh b/test/shell/fsadm-crypt.sh
index 9c85edf..68fed95 100644
--- a/test/shell/fsadm-crypt.sh
+++ b/test/shell/fsadm-crypt.sh
@@ -137,7 +137,7 @@ get_crypt_kname() {
# $1 device
# $2 pass
crypt_format() {
- echo "$2" | cryptsetup luksFormat "$FORMAT_PARAMS" "$1"
+ echo "$2" | cryptsetup luksFormat $FORMAT_PARAMS "$1"
}
4 years, 9 months
stable-2.02 - tests: use luks1 for test
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1e9c409a3eef3c18f97...
Commit: 1e9c409a3eef3c18f97b70a3d679ea24a2458886
Parent: e1cc409ae6808cd00b908756b53a4d58338aa5f7
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri May 3 13:11:09 2019 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Jul 6 01:24:28 2019 +0200
tests: use luks1 for test
Since we do not need anywhere luks2 - pick older format
which does not require password for resize to keep
the rest of test unmodified.
---
test/shell/fsadm-crypt.sh | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/test/shell/fsadm-crypt.sh b/test/shell/fsadm-crypt.sh
index d90413d..9c85edf 100644
--- a/test/shell/fsadm-crypt.sh
+++ b/test/shell/fsadm-crypt.sh
@@ -46,7 +46,14 @@ PWD2="mymJeD8ivEhE"
PWD3="ocMakf3fAcQO"
SKIP_DETACHED=
-which cryptsetup || check_cryptsetup=${check_cryptsetup:-cryptsetup}
+if which cryptsetup ; then
+ # use older format luks1 - otherwise the test would need to pass password everywhere...
+ case $(cryptsetup --version) in
+ "cryptsetup 2"*) FORMAT_PARAMS="$FORMAT_PARAMS --type luks1" ;;
+ esac
+else
+ check_cryptsetup=${check_cryptsetup:-cryptsetup}
+fi
which mkfs.ext2 || check_ext2=${check_ext2:-mkfs.ext2}
which mkfs.ext3 || check_ext3=${check_ext3:-mkfs.ext3}
4 years, 9 months
stable-2.02 - tests: raise minsize of xfs
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e1cc409ae6808cd00b9...
Commit: e1cc409ae6808cd00b908756b53a4d58338aa5f7
Parent: 721a172edf1a997b2c849f046b1ac88d6318f6d7
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Nov 13 16:27:33 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Jul 6 01:24:28 2019 +0200
tests: raise minsize of xfs
mkfs.xfs now needs at least ~1600...
---
test/shell/fsadm.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/shell/fsadm.sh b/test/shell/fsadm.sh
index fa9da35..8141da4 100644
--- a/test/shell/fsadm.sh
+++ b/test/shell/fsadm.sh
@@ -143,7 +143,7 @@ if check_missing ext3; then
fi
if check_missing xfs; then
- mkfs.xfs -l internal,size=1000b -f "$dev_vg_lv"
+ mkfs.xfs -l internal,size=2000b -f "$dev_vg_lv"
fsadm --lvresize resize $vg_lv 30M
# Fails - not enough space for 4M fs
4 years, 9 months
stable-2.02 - cov: avoid recursive self-inclusion
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=721a172edf1a997b2c8...
Commit: 721a172edf1a997b2c849f046b1ac88d6318f6d7
Parent: 23478d9d2161d1233d0dde1ca40c81d47292bd87
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Jun 28 13:35:40 2019 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Jul 6 01:24:28 2019 +0200
cov: avoid recursive self-inclusion
Include: toolcontext.h -> dev-type.h -> label.h -> toolcontext.h
Replace with struct predeclaration.
---
lib/label/label.h | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/lib/label/label.h b/lib/label/label.h
index ae6a4f5..42c9946 100644
--- a/lib/label/label.h
+++ b/lib/label/label.h
@@ -19,7 +19,6 @@
#include "uuid.h"
#include "device.h"
#include "bcache.h"
-#include "toolcontext.h"
#define LABEL_ID "LABELONE"
#define LABEL_SIZE SECTOR_SIZE /* Think very carefully before changing this */
@@ -27,6 +26,9 @@
#define LABEL_SCAN_SIZE (LABEL_SCAN_SECTORS << SECTOR_SHIFT)
struct labeller;
+struct dev_filter;
+struct cmd_context;
+struct logical_volume;
void allow_reads_with_lvmetad(void);
4 years, 9 months
stable-2.02 - cov: release iterator on error path
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=23478d9d2161d1233d0...
Commit: 23478d9d2161d1233d0dde1ca40c81d47292bd87
Parent: b0e1019add988b91fb41355566a34a3b2e182569
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Jun 28 13:26:11 2019 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Jul 6 01:24:28 2019 +0200
cov: release iterator on error path
Another missed release on error path.
---
lib/label/label.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/lib/label/label.c b/lib/label/label.c
index a535bd4..bc31a7c 100644
--- a/lib/label/label.c
+++ b/lib/label/label.c
@@ -912,7 +912,7 @@ int label_scan(struct cmd_context *cmd)
if (!scan_bcache) {
if (!_setup_bcache(dm_list_size(&all_devs)))
- return 0;
+ return_0;
}
_scan_list(cmd, cmd->full_filter, &all_devs, NULL);
@@ -987,8 +987,11 @@ int label_scan_pvscan_all(struct cmd_context *cmd, struct dm_list *scan_devs)
}
while ((dev = dev_iter_get(iter))) {
- if (!(devl = dm_zalloc(sizeof(*devl))))
+ if (!(devl = dm_zalloc(sizeof(*devl)))) {
+ log_error("Failed to allocated device list.");
+ dev_iter_destroy(iter);
return 0;
+ }
devl->dev = dev;
dm_list_add(&all_devs, &devl->list);
@@ -1013,7 +1016,7 @@ int label_scan_pvscan_all(struct cmd_context *cmd, struct dm_list *scan_devs)
if (!scan_bcache) {
if (!_setup_bcache(dm_list_size(&all_devs)))
- return 0;
+ return_0;
}
_scan_list(cmd, cmd->lvmetad_filter, &all_devs, NULL);
4 years, 9 months
stable-2.02 - gcc: clean uninitialized var warning
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b0e1019add988b91fb4...
Commit: b0e1019add988b91fb41355566a34a3b2e182569
Parent: 9aedf68c32f5ba7217b37e466546b5abb4f33f76
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Jun 25 22:49:24 2019 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Jul 6 01:24:28 2019 +0200
gcc: clean uninitialized var warning
Some older gcc versions shows this (FP) warning:
label/label.c:360: warning: �����sector�������� may be used uninitialized in this function
---
lib/label/label.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/label/label.c b/lib/label/label.c
index d6212b1..a535bd4 100644
--- a/lib/label/label.c
+++ b/lib/label/label.c
@@ -357,7 +357,7 @@ static int _process_block(struct cmd_context *cmd, struct dev_filter *f,
char label_buf[LABEL_SIZE] __attribute__((aligned(8)));
struct label *label = NULL;
struct labeller *labeller;
- uint64_t sector;
+ uint64_t sector = 0;
int ret = 0;
int pass;
4 years, 9 months
stable-2.02 - gcc: cleanup warning of shawhing a global dclr
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9aedf68c32f5ba7217b...
Commit: 9aedf68c32f5ba7217b37e466546b5abb4f33f76
Parent: ea036ecfd3980b88589e513e9b61efc215bce774
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Jun 25 22:47:27 2019 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Jul 6 01:24:28 2019 +0200
gcc: cleanup warning of shawhing a global dclr
misc/lvm-globals.c:76: warning: declaration of �����use_aio�������� shadows a global declaration
misc/lvm-globals.h:63: warning: shadowed declaration is here
---
lib/misc/lvm-globals.c | 4 ++--
lib/misc/lvm-globals.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/misc/lvm-globals.c b/lib/misc/lvm-globals.c
index 3bd5cac..35faf83 100644
--- a/lib/misc/lvm-globals.c
+++ b/lib/misc/lvm-globals.c
@@ -73,9 +73,9 @@ void init_test(int level)
_test = level;
}
-void init_use_aio(int use_aio)
+void init_use_aio(int use)
{
- _use_aio = use_aio;
+ _use_aio = use;
}
void init_md_filtering(int level)
diff --git a/lib/misc/lvm-globals.h b/lib/misc/lvm-globals.h
index 3007cc5..27d1919 100644
--- a/lib/misc/lvm-globals.h
+++ b/lib/misc/lvm-globals.h
@@ -25,7 +25,7 @@ enum dev_ext_e;
void init_verbose(int level);
void init_silent(int silent);
void init_test(int level);
-void init_use_aio(int use_aio);
+void init_use_aio(int use);
void init_md_filtering(int level);
void init_internal_filtering(int level);
void init_fwraid_filtering(int level);
4 years, 9 months