Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a51b6d5e4269ba4a5b335…
Commit: a51b6d5e4269ba4a5b335a3894873c750c2e8384
Parent: 5e4c0701d9d37eaa46468319c4df8f221acd38b3
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Apr 24 23:46:50 2023 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Apr 25 00:12:31 2023 +0200
aux: use unused brd device for testing
When 'brd' device can be removed (is unused AKA not opened),
remove such device and use again for testing.
Let's assume user has no unused brd device left in the system.
When the 'tests' sometimes fail to cleanup devices, with this
change futher cleanup from some next test may evenually release
brd device and make it available for testing.
---
test/lib/aux.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 8b04e1d30..b2660b65c 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -675,6 +675,9 @@ prepare_loop() {
prepare_ramdisk() {
local size=$1
+ # if brd is unused, remove and use for test
+ modprobe -r brd || return 0
+
echo -n "## preparing ramdisk device..."
modprobe brd rd_size=$((size * 1024)) || return
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=8947964f10499cf286985…
Commit: 8947964f10499cf286985da37973cdbcaff9d7f1
Parent: 31cfcf7ce9aab5dd16ba15e48bfe33be849fad4c
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Apr 24 23:58:21 2023 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Apr 25 00:12:31 2023 +0200
wipe_lv: use zeroing ioctl only for large sizes
There is no easy way to detect, whether device supports zeroing,
and kernel also zeroes device when it's not directly supported,
but with extra message:
operation not supported error, dev X, sector Y op 0x9:(WRITE_ZEROES)...
So to avoid generating such message with every 'lvcreate', use for
zeroing of upto 8K just standard write of zeroed page.
(maybe we can go with even larger sizes).
---
lib/metadata/lv_manip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 2a4e0e88a..762a65785 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -8718,7 +8718,7 @@ int wipe_lv(struct logical_volume *lv, struct wipe_params wp)
display_lvname(lv), wp.zero_value);
#ifdef HAVE_BLKZEROOUT
- if (!test_mode() && !wp.zero_value) {
+ if (!test_mode() && !wp.zero_value && (zero_sectors > 16)) {
/* TODO: maybe integrate with bcache_zero_set() */
const uint64_t end = zero_sectors << SECTOR_SHIFT;
uint64_t range[2] = { 0, 1024 * 1024 }; /* zeroing with 1M steps (for better ^C support) */
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=afc02ae6e7234e1190ced…
Commit: afc02ae6e7234e1190cedf5c74ca3d6367efd7d1
Parent: ce8835d4c429bd87da5731e3015d9ddc9e3fb888
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Apr 23 12:49:37 2023 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sun Apr 23 12:49:37 2023 +0200
lvmdbus: preserve PATH envvar
---
daemons/lvmdbusd/lvm_shell_proxy.py.in | 2 ++
1 file changed, 2 insertions(+)
diff --git a/daemons/lvmdbusd/lvm_shell_proxy.py.in b/daemons/lvmdbusd/lvm_shell_proxy.py.in
index b8c8fa565..02a776e1d 100755
--- a/daemons/lvmdbusd/lvm_shell_proxy.py.in
+++ b/daemons/lvmdbusd/lvm_shell_proxy.py.in
@@ -154,6 +154,8 @@ class LVMShellProxy(object):
# If any env variables contain LVM we will propagate them too
for k, v in os.environ.items():
+ if "PATH" in k:
+ local_env[k] = v
if "LVM" in k:
local_env[k] = v