v2_03_10 annotated tag has been created
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=468e7b688eaf36fea7f...
Commit: 468e7b688eaf36fea7fef7368637038eb932e833
Parent: 0000000000000000000000000000000000000000
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: 2020-08-09 15:18 +0000
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: 2020-08-09 15:18 +0000
annotated tag: v2_03_10 has been created
at 468e7b688eaf36fea7fef7368637038eb932e833 (tag)
tagging 4d9f0606beb0acb329794909560433c08b50875d (commit)
replaces v2_03_09
Release 2.03.10
- Add integrity with raid capability.
- Add writecache and integrity support to lvmdbusd.
- Zero pool metadata on allocation (disable with allocation/zero_metadata=0).
- Failure in zeroing or wiping will fail command (bypass with -Zn, -Wn).
- Bug fixes.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAABAgAGBQJfMBPHAAoJELkRJDHlCQOf7bcP/igJb47fdwn31R4XNnshLAPr
fA34LKQGvhCSqSB2PM6a2aDwCMqw5WOi5cxVPIdvBpJDd93VGWJcNUxtzsOSkG2Q
x+8HNUTchJpcg9OKxfAi0ViqCe+lCioq9CXCx5V/1cWav8tl2NzcU2+8j2KQ/Z5P
68E6Kg2zZ6P925pQPER2aArx+fkk866JxgjHTMy9GoNeBttR/iLeOs+q2hi3ernj
GbwCAWUT5jaJTlxhUyBJcUz9ir3+ptJpozo5e2d9c6WcLkWL7zzKNWhT1kbMyaT6
+C9RaTOgWRSFaSKZ3/jNEmxkZWJx/WZuS+QP0Gsoax91vRCChHUCc/LMA6wxHYie
yVEXZdk4v0w76UzgISWMb0XWo2koU7sQaNE4BMwwTdx7qKFfqEGPo6RvuSSZFz+A
mWwBMZG5zHZB6j3ZoSeS4L54qjSoTaznCLSEZJE2hZ/geQ6GB86ADBV/Hb7SsJnf
MaItv2BHc5aGd6jn6DKicc+RcmRLjnwkeqOxCaUWKv7wcGMFNUrvqauU2ebIMH3X
dvGJtQ0afJT7Ak6d7Eyb5jEkYbJ8XjMMMoi2sKr8Ss45e+KYVnJ1qagsSfm7SaWg
BjtvKz50fQocLraU5lTo4HVsJrn1gNSiGSMDOGddWkiNvbU11HN1zPvTDUez5PCj
CtDiyyM3jYqZezlXEipk
=KXaN
-----END PGP SIGNATURE-----
David Teigland (50):
move pv_list code into lib
Allow dm-integrity to be used for raid images
WHATS_NEW: integrity with raid
vgrename: fix error value when name exists
lvmcache_get_mda: remove unused function
pass cmd struct through more functions
lvmcache: rework handling of VGs with duplicate vgnames
use refresh_filters only where needed
remove vg_read_error
lvmlockd: replace lock adopt info source
lvmlockd: use 4K sector size when any dev is 4K
devs: add some checks for a dev with no path name
hints: free hint structs on exit
lvmcache: free vginfo lock_type
lvconvert: error when using existing cachevol
pvck: dump headers_only to skip metadata text
tests: integrity wait for sync
integrity: skip calling add when removing images
Revert "pvck: dump headers_only to skip metadata text"
improve info about vgck updatemetadata
writecache: remove from an active lv
writecache: show error in lv_health_status and lv_attr
writecache: cachesettings in lvchange and lvs
writecache: attach while active using fs block size
writecache: add settings cleaner and max_age
tests: writecache-blocksize
fix bad result from _cache_min_metadata_size
writecache: allow snapshot of LV with writecache
writecache: activate to check block size
tests: writecache tests
fix libblkid BLOCK_SIZE check
integrity: fix block size check when inactive
tests: expand integrity-blocksize
tests: fix typo in writecache-blocksize
improve get_fs_block_size string to number
tests: integrity and block size
integrity: avoid increasing logical block size of active LV
integrity: wait for raid sync to complete
lvconvert: single step cachevol creation and attachment
lvcreate: new cache or writecache lv with single command
tests: cachevol-cachedevice
man: lvmcache info about cachedevice usage
integrity: add initial size to metadata size
writecache: skip fs block size check in test mode
devices: detect md ddf and imsm superblocks
devices: simplify md superblock checking code
lvmdbusd: recognize lv attr letter g for integrity
integrity: allow type option to be set when changing mirrors
cachevol: generate a unique name when creating
cachevol: add LV type restrictions to command defs
Heinz Mauelshagen (5):
lv{resize,extend,reduce}: reject size change on 2-legged raid5*
lv{resize,extend,reduce}: also check for 2-legged raid4
lvconvert: fix conversion to 'mirrored' mirror log with larger regionsize
lvconvert: preset raid1 in case of striped conversions
lvconvert: display warning if raid1 LV image count does not change
Marian Csontos (10):
post-release
spec: Enable integrity
build: make generate
tests: Use python single liner to generate data
test: Use printf to generate data
test: Warn and exit on problematic integrity device behavior
tests: Adapt RAID test to changes
build: make generate
WHATS_NEW
pre-release
Maxim Plotnikov (1):
Fix scripts/lvmlocks.service.in using nonexistent --lock-opt autowait
Peter Rajnoha (2):
blkdeactivate: add support for VDO in blkdeactivate script
blkdeactivate: add missing VDO_AVAILABLE check in deactivate_vdo
Tony Asleson (1):
WHATS_NEW: Add writecache lvmdbusd
Vojtech Trefny (2):
lvmdbusd: Add support for LVM writecache
lvmdbusd: Bump LVM DBus API version
Zdenek Kabelac (24):
lvconvert: no validation for thin-pools not used by lvm2
test: repair of thin-pool used by foreign apps
WHATS_NEWS: update
cov: check for deactivation failure
cov: check strdup for NULL
cov: lvconvert: missing check for function failure
pvck: set dump on one call
list: use container_of
tests: add wait on udev processing
tests: also udev wait on clean-up path
bcache: support longer writes
wipe_lv: make error a fatal event
pool: zero metadata
cov: use 64bit arithmetic
cov: remove unused header
cov: avoid double call of free_hints() on error path
man: update cache page
make: make generate
tests: failure of zeroing fails command
tests: check pool metadata are zeroed
wipe_lv: always zero at least 4K
lvconvert: more support for yes conversion
raid: no wiping when zeroing raid metadata device
debug: missing stacktrace
Zhao Heming (1):
Change dev->bcache_fd default value from 0 to -1
3 years, 8 months
v2_03_10 tag - deleted
by Marian Csontos
tag: v2_03_10 - deleted with refnum:
tag v2_03_10
Release 2.03.10
- Add integrity with raid capability.
- Add writecache and integrity support to lvmdbusd.
- Zero pool metadata on allocation (disable with allocation/zero_metadata=0).
- Failure in zeroing or wiping will fail command (bypass with -Zn, -Wn).
- Bug fixes.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAABAgAGBQJfMA7qAAoJELkRJDHlCQOf9oMQAMbyK53xgJ6iz65LwiZgdeS7
4G5Z7ITBs7A1xBZLGNtzkAavaRTi/dyH8Ib2HdW4wh86b7C0Lvn0lhuaWgl4DbzU
qi0Rf+G280i0G2yDjmuhlVjLZDlpDAclJXdlHZD5Wrblqn2Ovqwwe3ZcY+iUuvwo
0N5UE0JpOiC74eLstn3vf/HqJSTbP79ezG8HPUba1sQQJBC+XQdsc1I1FENLOxIx
/RORvDzrswNfbYBalgCye5DxZLxRPdh9H5Y3LsKTDpdA6WIRpcwCWRLibgp+l7FL
1oO6qQkUhcM0P4TabvN9Ev7Kx+WihFwlGkeOl5PXQgak+AvjhejToCyDB8SB32Df
zm4Fr96tdmRnsmQ1EEcayP7jnzCPJuzW6kpR3CI8hW2QJcRI73UIzBURLpGHpu89
SgT1b4H765MQIeEH108PbqRJe9u22BgSzQZJ4XBH0Jk3ImePpI6MKWjYNXNnz+F3
Od9Yfn+GffcmgECxXrOJE5NHxsTRD3UVoSH2PWNSaUf0xb6bNh1ESKU5k0yf/y9K
xanU0VzBNHeQdEhtp2M2skoyywJP24NRQvMwNzzxhJUZ9g18oV76zySVJmsAPksi
v4IVFmJzTvXRv25IDF3rf3XNxXw6s+qQGTELfC48jHCiEVZrZqOZBtWBFRmEPDxA
U2SlwUXoXpzPt+992FI+
=DUfj
-----END PGP SIGNATURE-----
f540a18fd7f5f65599a6c85c0bd3ba84e54f1cc8 Merge master up to commit be61bd6ff5c6
3 years, 8 months
v2_03_10 annotated tag has been created
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1b70d52b67f2577ff55...
Commit: 1b70d52b67f2577ff5563dfb2076385d7959a6dc
Parent: 0000000000000000000000000000000000000000
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: 2020-08-09 14:57 +0000
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: 2020-08-09 14:57 +0000
annotated tag: v2_03_10 has been created
at 1b70d52b67f2577ff5563dfb2076385d7959a6dc (tag)
tagging f540a18fd7f5f65599a6c85c0bd3ba84e54f1cc8 (commit)
replaces v2_03_09
Release 2.03.10
- Add integrity with raid capability.
- Add writecache and integrity support to lvmdbusd.
- Zero pool metadata on allocation (disable with allocation/zero_metadata=0).
- Failure in zeroing or wiping will fail command (bypass with -Zn, -Wn).
- Bug fixes.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAABAgAGBQJfMA7qAAoJELkRJDHlCQOf9oMQAMbyK53xgJ6iz65LwiZgdeS7
4G5Z7ITBs7A1xBZLGNtzkAavaRTi/dyH8Ib2HdW4wh86b7C0Lvn0lhuaWgl4DbzU
qi0Rf+G280i0G2yDjmuhlVjLZDlpDAclJXdlHZD5Wrblqn2Ovqwwe3ZcY+iUuvwo
0N5UE0JpOiC74eLstn3vf/HqJSTbP79ezG8HPUba1sQQJBC+XQdsc1I1FENLOxIx
/RORvDzrswNfbYBalgCye5DxZLxRPdh9H5Y3LsKTDpdA6WIRpcwCWRLibgp+l7FL
1oO6qQkUhcM0P4TabvN9Ev7Kx+WihFwlGkeOl5PXQgak+AvjhejToCyDB8SB32Df
zm4Fr96tdmRnsmQ1EEcayP7jnzCPJuzW6kpR3CI8hW2QJcRI73UIzBURLpGHpu89
SgT1b4H765MQIeEH108PbqRJe9u22BgSzQZJ4XBH0Jk3ImePpI6MKWjYNXNnz+F3
Od9Yfn+GffcmgECxXrOJE5NHxsTRD3UVoSH2PWNSaUf0xb6bNh1ESKU5k0yf/y9K
xanU0VzBNHeQdEhtp2M2skoyywJP24NRQvMwNzzxhJUZ9g18oV76zySVJmsAPksi
v4IVFmJzTvXRv25IDF3rf3XNxXw6s+qQGTELfC48jHCiEVZrZqOZBtWBFRmEPDxA
U2SlwUXoXpzPt+992FI+
=DUfj
-----END PGP SIGNATURE-----
David Teigland (3):
move pv_list code into lib
Allow dm-integrity to be used for raid images
WHATS_NEW: integrity with raid
Marian Csontos (7):
lvm2-rhel8
lvm2: set default preferred_names
lvm2: test: skip-problematic-tests
test: warn only on unexpected pass of a known bug
build: make generate
Merge master up to commit 53803821de16
Merge master up to commit be61bd6ff5c6
Maxim Plotnikov (1):
Fix scripts/lvmlocks.service.in using nonexistent --lock-opt autowait
Peter Rajnoha (1):
blkdeactivate: add support for VDO in blkdeactivate script
Zdenek Kabelac (3):
lvconvert: no validation for thin-pools not used by lvm2
test: repair of thin-pool used by foreign apps
WHATS_NEWS: update
3 years, 8 months
master - post-release
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=231cdd0efbe73c7a2a4...
Commit: 231cdd0efbe73c7a2a4c69969df7e0f5b63f7f2c
Parent: 4d9f0606beb0acb329794909560433c08b50875d
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Sun Aug 9 16:16:39 2020 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Sun Aug 9 16:17:15 2020 +0200
post-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 4 ++++
WHATS_NEW_DM | 3 +++
4 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/VERSION b/VERSION
index c314d60ac..a6ba8f65a 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.03.10(2) (2020-08-09)
+2.03.11(2)-git (2020-08-09)
diff --git a/VERSION_DM b/VERSION_DM
index 698a0500f..f44bc5f06 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.173 (2020-08-09)
+1.02.175-git (2020-08-09)
diff --git a/WHATS_NEW b/WHATS_NEW
index c735f3466..05d9c0ac9 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,3 +1,6 @@
+Version 2.03.11 -
+==================================
+
Version 2.03.10 - 09th August 2020
==================================
Add writecache and integrity support to lvmdbusd.
@@ -8,6 +11,7 @@ Version 2.03.10 - 09th August 2020
Fix conversion to 'mirrored' mirror log with larger regionsize.
Zero pool metadata on allocation (disable with allocation/zero_metadata=0).
Failure in zeroing or wiping will fail command (bypass with -Zn, -Wn).
+ Add lvcreate of new cache or writecache lv with single command.
Fix running out of free buffers for async writing for larger writes.
Add integrity with raid capability.
Fix support for lvconvert --repair used by foreign apps (i.e. Docker).
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 299997d10..2600ca308 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,3 +1,6 @@
+Version 1.02.175 -
+===================================
+
Version 1.02.173 - 09th August 2020
===================================
Add support for VDO in blkdeactivate script.
3 years, 8 months
master - pre-release
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=4d9f0606beb0acb3297...
Commit: 4d9f0606beb0acb329794909560433c08b50875d
Parent: c1d136fea3d127d8ecd5c30208c919490a58ff59
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Sun Aug 9 16:15:31 2020 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Sun Aug 9 16:17:15 2020 +0200
pre-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 2 +-
WHATS_NEW_DM | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/VERSION b/VERSION
index 0fc8da873..c314d60ac 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.03.10(2)-git (2020-03-26)
+2.03.10(2) (2020-08-09)
diff --git a/VERSION_DM b/VERSION_DM
index c6a11602b..698a0500f 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.173-git (2020-03-26)
+1.02.173 (2020-08-09)
diff --git a/WHATS_NEW b/WHATS_NEW
index ac99e970d..c735f3466 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,4 +1,4 @@
-Version 2.03.10 -
+Version 2.03.10 - 09th August 2020
==================================
Add writecache and integrity support to lvmdbusd.
Generate unique cachevol name when default required from lvcreate.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 3ec9c3c15..299997d10 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,5 @@
-Version 1.02.173 -
-==================================
+Version 1.02.173 - 09th August 2020
+===================================
Add support for VDO in blkdeactivate script.
Version 1.02.171 - 26th March 2020
3 years, 8 months
master - WHATS_NEW
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c1d136fea3d127d8ecd...
Commit: c1d136fea3d127d8ecd5c30208c919490a58ff59
Parent: 9f8c331760c08d4da0bb03c4fce4946b0236c0ac
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Sun Aug 9 16:15:13 2020 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Sun Aug 9 16:17:15 2020 +0200
WHATS_NEW
---
WHATS_NEW | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 87779c3e7..ac99e970d 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,6 +1,9 @@
Version 2.03.10 -
-=================================
- Add writecache support to lvmdbusd.
+==================================
+ Add writecache and integrity support to lvmdbusd.
+ Generate unique cachevol name when default required from lvcreate.
+ Converting RAID1 volume to one with same number of legs now succeeds with a
+ warning.
Fix conversion to raid from striped lagging type.
Fix conversion to 'mirrored' mirror log with larger regionsize.
Zero pool metadata on allocation (disable with allocation/zero_metadata=0).
3 years, 8 months
master - build: make generate
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9f8c331760c08d4da0b...
Commit: 9f8c331760c08d4da0bb03c4fce4946b0236c0ac
Parent: 4f44841045ec9420a4bb9a141fab55cb95260b45
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Sun Aug 9 15:20:22 2020 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Sun Aug 9 15:20:22 2020 +0200
build: make generate
---
include/configure.h.in | 6 +++---
man/lvconvert.8_pregen | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/configure.h.in b/include/configure.h.in
index 57736cc3b..540cee7cf 100644
--- a/include/configure.h.in
+++ b/include/configure.h.in
@@ -531,6 +531,9 @@
/* Define to 1 if the system has the `__builtin_clzll' built-in function */
#undef HAVE___BUILTIN_CLZLL
+/* Define to 1 to include built-in support for integrity. */
+#undef INTEGRITY_INTERNAL
+
/* Internalization package */
#undef INTL_PACKAGE
@@ -678,9 +681,6 @@
/* Define to 1 to include built-in support for writecache. */
#undef WRITECACHE_INTERNAL
-/* Define to 1 to include built-in support for integrity. */
-#undef INTEGRITY_INTERNAL
-
/* Define to get access to GNU/Linux extension */
#undef _GNU_SOURCE
diff --git a/man/lvconvert.8_pregen b/man/lvconvert.8_pregen
index 37b0a47d2..b3902a51c 100644
--- a/man/lvconvert.8_pregen
+++ b/man/lvconvert.8_pregen
@@ -749,7 +749,7 @@ Attach a cache to an LV, converts the LV to type cache.
Add a writecache to an LV, using a specified cache device.
.br
.P
-\fBlvconvert\fP \fB--type\fP \fBwritecache\fP \fB--cachedevice\fP \fIPV\fP \fILV\fP
+\fBlvconvert\fP \fB--type\fP \fBwritecache\fP \fB--cachedevice\fP \fIPV\fP \fILV\fP\fI_linear_striped_raid\fP
.br
.RS 4
.ad l
@@ -768,7 +768,7 @@ Add a writecache to an LV, using a specified cache device.
Add a cache to an LV, using a specified cache device.
.br
.P
-\fBlvconvert\fP \fB--type\fP \fBcache\fP \fB--cachedevice\fP \fIPV\fP \fILV\fP
+\fBlvconvert\fP \fB--type\fP \fBcache\fP \fB--cachedevice\fP \fIPV\fP \fILV\fP\fI_linear_striped_thinpool_raid\fP
.br
.RS 4
.ad l
3 years, 8 months
master - WHATS_NEW: Add writecache lvmdbusd
by Tony Asleson
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=4f44841045ec9420a4b...
Commit: 4f44841045ec9420a4bb9a141fab55cb95260b45
Parent: d4d060acd5e35ca052dd4ba0743732ed4fb46f86
Author: Tony Asleson <tasleson(a)redhat.com>
AuthorDate: Thu Aug 6 15:42:49 2020 -0500
Committer: Tony Asleson <tasleson(a)redhat.com>
CommitterDate: Thu Aug 6 15:42:49 2020 -0500
WHATS_NEW: Add writecache lvmdbusd
---
WHATS_NEW | 1 +
1 file changed, 1 insertion(+)
diff --git a/WHATS_NEW b/WHATS_NEW
index 562b1765b..87779c3e7 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.03.10 -
=================================
+ Add writecache support to lvmdbusd.
Fix conversion to raid from striped lagging type.
Fix conversion to 'mirrored' mirror log with larger regionsize.
Zero pool metadata on allocation (disable with allocation/zero_metadata=0).
3 years, 8 months
master - lvmdbusd: Bump LVM DBus API version
by Tony Asleson
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d4d060acd5e35ca052d...
Commit: d4d060acd5e35ca052dd4ba0743732ed4fb46f86
Parent: 8f1068c02d06e9104c47db0131617c8f98d31718
Author: Vojtech Trefny <vtrefny(a)redhat.com>
AuthorDate: Wed Jul 1 13:27:47 2020 +0200
Committer: Tony Asleson <tasleson(a)redhat.com>
CommitterDate: Thu Aug 6 13:54:45 2020 -0500
lvmdbusd: Bump LVM DBus API version
So users can check for writecache support.
---
daemons/lvmdbusd/manager.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/daemons/lvmdbusd/manager.py b/daemons/lvmdbusd/manager.py
index 2857e9a10..573a3966f 100644
--- a/daemons/lvmdbusd/manager.py
+++ b/daemons/lvmdbusd/manager.py
@@ -27,7 +27,7 @@ class Manager(AutomatedProperties):
@property
def Version(self):
- return dbus.String('1.0.0')
+ return dbus.String('1.1.0')
@staticmethod
def handle_execute(rc, out, err):
3 years, 8 months
master - lvmdbusd: Add support for LVM writecache
by Tony Asleson
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=8f1068c02d06e9104c4...
Commit: 8f1068c02d06e9104c47db0131617c8f98d31718
Parent: e12bdd591a1e60f055baee6cf5e9a144ea245a33
Author: Vojtech Trefny <vtrefny(a)redhat.com>
AuthorDate: Wed Jul 1 13:27:46 2020 +0200
Committer: Tony Asleson <tasleson(a)redhat.com>
CommitterDate: Thu Aug 6 13:54:34 2020 -0500
lvmdbusd: Add support for LVM writecache
---
daemons/lvmdbusd/cmdhandler.py | 9 +++++++++
daemons/lvmdbusd/lv.py | 43 ++++++++++++++++++++++++++++++++++++++++++
test/dbus/lvmdbustest.py | 30 +++++++++++++++++++++++++++++
3 files changed, 82 insertions(+)
diff --git a/daemons/lvmdbusd/cmdhandler.py b/daemons/lvmdbusd/cmdhandler.py
index 7d2f4c4ba..1c15b7888 100644
--- a/daemons/lvmdbusd/cmdhandler.py
+++ b/daemons/lvmdbusd/cmdhandler.py
@@ -453,6 +453,15 @@ def lv_cache_lv(cache_pool_full_name, lv_full_name, cache_options):
return call(cmd)
+def lv_writecache_lv(cache_lv_full_name, lv_full_name, cache_options):
+ # lvconvert --type writecache --cachevol VG/CacheLV VG/OriginLV
+ cmd = ['lvconvert']
+ cmd.extend(options_to_cli_args(cache_options))
+ cmd.extend(['-y', '--type', 'writecache', '--cachevol',
+ cache_lv_full_name, lv_full_name])
+ return call(cmd)
+
+
def lv_detach_cache(lv_full_name, detach_options, destroy_cache):
cmd = ['lvconvert']
if destroy_cache:
diff --git a/daemons/lvmdbusd/lv.py b/daemons/lvmdbusd/lv.py
index 5c4728073..edfdd0d30 100644
--- a/daemons/lvmdbusd/lv.py
+++ b/daemons/lvmdbusd/lv.py
@@ -743,6 +743,49 @@ class Lv(LvCommon):
cb, cbe, return_tuple=False)
cfg.worker_q.put(r)
+ @staticmethod
+ def _writecache_lv(lv_uuid, lv_name, lv_object_path, cache_options):
+ # Make sure we have a dbus object representing it
+ dbo = LvCommon.validate_dbus_object(lv_uuid, lv_name)
+
+ # Make sure we have dbus object representing lv to cache
+ lv_to_cache = cfg.om.get_object_by_path(lv_object_path)
+
+ if lv_to_cache:
+ fcn = lv_to_cache.lv_full_name()
+ rc, out, err = cmdhandler.lv_writecache_lv(
+ dbo.lv_full_name(), fcn, cache_options)
+ if rc == 0:
+ # When we cache an LV, the cache pool and the lv that is getting
+ # cached need to be removed from the object manager and
+ # re-created as their interfaces have changed!
+ mt_remove_dbus_objects((dbo, lv_to_cache))
+ cfg.load()
+
+ lv_converted = cfg.om.get_object_path_by_lvm_id(fcn)
+ else:
+ raise dbus.exceptions.DBusException(
+ LV_INTERFACE,
+ 'Exit code %s, stderr = %s' % (str(rc), err))
+ else:
+ raise dbus.exceptions.DBusException(
+ LV_INTERFACE, 'LV to cache with object path %s not present!' %
+ lv_object_path)
+ return lv_converted
+
+ @dbus.service.method(
+ dbus_interface=LV_INTERFACE,
+ in_signature='oia{sv}',
+ out_signature='(oo)',
+ async_callbacks=('cb', 'cbe'))
+ def WriteCacheLv(self, lv_object, tmo, cache_options, cb, cbe):
+ r = RequestEntry(
+ tmo, Lv._writecache_lv,
+ (self.Uuid, self.lvm_id, lv_object,
+ cache_options), cb, cbe)
+ cfg.worker_q.put(r)
+
+
# noinspection PyPep8Naming
@utils.dbus_property(VDO_POOL_INTERFACE, 'OperatingMode', 's')
@utils.dbus_property(VDO_POOL_INTERFACE, 'CompressionState', 's')
diff --git a/test/dbus/lvmdbustest.py b/test/dbus/lvmdbustest.py
index 8753e65d0..efa1afb26 100755
--- a/test/dbus/lvmdbustest.py
+++ b/test/dbus/lvmdbustest.py
@@ -1558,6 +1558,36 @@ class TestDbusService(unittest.TestCase):
cached_lv.Lv.Rename(dbus.String(new_name), dbus.Int32(g_tmo), EOD))
verify_cache_lv_count()
+ def test_writecache_lv(self):
+ vg = self._vg_create().Vg
+ data_lv = self._create_lv(size=mib(16), vg=vg)
+ cache_lv = self._create_lv(size=mib(16), vg=vg)
+
+ # both LVs need to be inactive
+ self.handle_return(data_lv.Lv.Deactivate(
+ dbus.UInt64(0), dbus.Int32(g_tmo), EOD))
+ data_lv.update()
+ self.handle_return(cache_lv.Lv.Deactivate(
+ dbus.UInt64(0), dbus.Int32(g_tmo), EOD))
+ cache_lv.update()
+
+ cached_lv_path = self.handle_return(
+ cache_lv.Lv.WriteCacheLv(
+ dbus.ObjectPath(data_lv.object_path),
+ dbus.Int32(g_tmo),
+ EOD))
+
+ intf = (LV_COMMON_INT, LV_INT, CACHE_LV_INT)
+ cached_lv = ClientProxy(self.bus, cached_lv_path, interfaces=intf)
+ self.assertEqual(cached_lv.LvCommon.SegType, ["writecache"])
+
+ uncached_lv_path = self.handle_return(
+ cached_lv.CachedLv.DetachCachePool(
+ dbus.Boolean(True),
+ dbus.Int32(g_tmo),
+ EOD))
+ self.assertTrue('/com/redhat/lvmdbus1/Lv' in uncached_lv_path)
+
def test_vg_change(self):
vg_proxy = self._vg_create()
3 years, 8 months