main - devices file: fail if --devicesfile filename doesn't exist
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=bfe072e4388b530cbf5...
Commit: bfe072e4388b530cbf5369be8a8f1305220198bf
Parent: 9dfa6f38793f6b5f7de2a4148ab2f7790e3c39da
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri May 27 14:27:03 2022 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri May 27 14:27:03 2022 -0500
devices file: fail if --devicesfile filename doesn't exist
A typo of the filename after --devicesfile should result in a
command error rather than the command falling back to using no
devices file at all. Exception is vgcreate|pvcreate which
create a new devices file if the file name doesn't exist.
---
lib/device/dev-cache.c | 9 +++++++++
test/shell/devicesfile-basic.sh | 4 ++++
2 files changed, 13 insertions(+)
diff --git a/lib/device/dev-cache.c b/lib/device/dev-cache.c
index 3aaf6a2e5..ed9c726c9 100644
--- a/lib/device/dev-cache.c
+++ b/lib/device/dev-cache.c
@@ -1863,6 +1863,15 @@ int setup_devices(struct cmd_context *cmd)
file_exists = devices_file_exists(cmd);
+ /*
+ * Fail if user specifies a file name that doesn't exist and
+ * the command is not creating a new devices file.
+ */
+ if (!file_exists && !cmd->create_edit_devices_file && cmd->devicesfile && strlen(cmd->devicesfile)) {
+ log_error("Devices file not found: %s", cmd->devices_file_path);
+ return 0;
+ }
+
/*
* Removing the devices file is another way of disabling the use of
* a devices file, unless the command creates the devices file.
diff --git a/test/shell/devicesfile-basic.sh b/test/shell/devicesfile-basic.sh
index 9c3455c76..77fe265a0 100644
--- a/test/shell/devicesfile-basic.sh
+++ b/test/shell/devicesfile-basic.sh
@@ -104,6 +104,10 @@ not ls "$DFDIR/system.devices"
vgs --devicesfile test.devices $vg1
not vgs --devicesfile test.devices $vg2
+# misspelled override name fails
+not vgs --devicesfile doesnotexist $vg1
+not vgs --devicesfile doesnotexist $vg2
+
# devicesfile and devices cannot be used together
not vgs --devicesfile test.devices --devices "$dev1","$dev1" $vg1
1 year, 6 months
main - devices file: move clean up after command is run
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9dfa6f38793f6b5f7de...
Commit: 9dfa6f38793f6b5f7de2a4148ab2f7790e3c39da
Parent: a30013ff4f5981afd7778597172e0e834ca99cd4
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri May 27 12:38:43 2022 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri May 27 12:38:43 2022 -0500
devices file: move clean up after command is run
devices_file_exit wasn't being called between lvm_shell
commands, so the file lock wouldn't be released.
---
lib/commands/toolcontext.c | 2 --
tools/lvmcmdline.c | 1 +
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
index 4cb81bf94..2666d7b42 100644
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
@@ -1905,7 +1905,6 @@ int refresh_toolcontext(struct cmd_context *cmd)
_destroy_segtypes(&cmd->segtypes);
_destroy_formats(cmd, &cmd->formats);
- devices_file_exit(cmd);
if (!dev_cache_exit())
stack;
_destroy_dev_types(cmd);
@@ -2034,7 +2033,6 @@ void destroy_toolcontext(struct cmd_context *cmd)
_destroy_segtypes(&cmd->segtypes);
_destroy_formats(cmd, &cmd->formats);
_destroy_filters(cmd);
- devices_file_exit(cmd);
dev_cache_exit();
_destroy_dev_types(cmd);
_destroy_tags(cmd);
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index 1e3547ed7..b052d698f 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -3305,6 +3305,7 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv)
hints_exit(cmd);
lvmcache_destroy(cmd, 1, 1);
label_scan_destroy(cmd);
+ devices_file_exit(cmd);
if ((config_string_cft = remove_config_tree_by_source(cmd, CONFIG_STRING)))
dm_config_destroy(config_string_cft);
1 year, 6 months
v2_03_16 annotated tag has been created
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=82b36d78165764dda7d...
Commit: 82b36d78165764dda7d44d104737a95054348a02
Parent: 0000000000000000000000000000000000000000
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: 2022-05-18 16:21 +0000
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: 2022-05-18 16:21 +0000
annotated tag: v2_03_16 has been created
at 82b36d78165764dda7d44d104737a95054348a02 (tag)
tagging 6d1e894a867681af7a811ed63bc435f3aa55fec8 (commit)
replaces v2_03_15
Release 2.03.16
Mostly bug fixes and minor improvements.
-----BEGIN PGP SIGNATURE-----
iQJIBAABCAAyFiEE1QGkeEQK4v0TChvouREkMeUJA58FAmKFHY4UHG1jc29udG9z
QHJlZGhhdC5jb20ACgkQuREkMeUJA5+hpA//cpgNtNuGOD1cqIS9i6JkPNwJy4TI
HbCMqJDQqQjeOGIj/8GTnMYwvbSAgZrRL+fITvrVu24EBj7yzRvFhn0+zr6WlTAF
5MHMiRkWPzf/dZjhSMNV5XGlC1anuUBqIkRmtO5BGowPnm5ve/OH5dhGiOPdzI9m
riIWX9ZnXhjKwkXA+ovpczYbkABoahL4Of2WxReiPEAWnXBzCO2X7TQWrvZxbEzk
4s5aewphB14oEY8xnJAbt9M+te+gWk+IKmN8dCWURcPSj5zMkjW/iuDMKJee7e9o
rsYGeZJrXQCz20HfjGdtnKJMEYbEslKYOiayGBQeKLf+AIwuSOxG1zv7mSuE9MtA
HnMDwRik9S2YkpmntdTRKzjJTC2QzbAdgZ+ywdL7Xq/qTPc4rrOYfTVMSbylo28j
LZRb4hOcIeqCRv0j4Y4sazyDw1GfGcW5TrDQ/4ddWDyU+FNjCoC4BQbHdr9dxYiO
9SnAgMtbOJ25A9MnjRiq0+8+YJ4rIKo+Kp72a+v3SZI5Q+S17PiWIKtKMfWMkylb
pRaAOGLo717uqEk8pMFCgCiGhuclXZUwFWNzWbJ7c1EE6xGMZP5DJjsWxPAiPhWu
t6b1R6XrfcxwXHEbzWPjKGCpHTjgKJNaxN8HrZtvqpBQhdJ0vq/w7q/Abl3Dj5cH
jwQ85DHUtcVrfno=
=GbW6
-----END PGP SIGNATURE-----
David Teigland (31):
tests: udev-pvscan-vgchange fix service wait
devices file: do not clear PVID of unread devices
tests: skip vgchange-pvs-online.sh on rhel5
man lvmcache: add more writecache cachesettings info
man: update cachesettings option description
man lvmcache: mention writecache memory usage
writecache: display block size from lvs
devices: simplify dev_cache_get_by_devt
devices: drop incorrect paths from aliases list
devices: initial use of existing option
devices: fix dev_name assumptions
devices: use dev-cache aliases handling from label scan functions
devices: only close PVs on LVs when scan_lvs is enabled
writecache: check memory usage
pvscan: don't use udev for external device info
vgchange monitor: don't use udev info
Move nolocking warning to man page
fix args entry for nolocking
devices file: warn about missing multipath entry
lvmdevices update: correct multipath entries
change messages about filtered devices
pvscan: warn about /dev/sda excluded by devices file
vgimportdevices: fix incorrect deviceidtype usage
lvmdevices: --deldev using device id
filter: remove unused EAGAIN case and flag
filters: remove unused internal filter
lvmlockd: return error from vgcreate init_vg_sanlock
devices file: remove extraneous unlock in vgchange -u
tests: devicesfile-edit.sh fix loop file name
filter-mpath: use multipath blacklist
improve description of devices option
Marian Csontos (3):
post-release
make: generate
pre-release
Peter Rajnoha (1):
toollib: fix segfault when handling selection with historical LVs
Zdenek Kabelac (11):
asan: fix some reports from libasan
make: generate
dev_manager: fix dm_task_get_device_list
dev_manager: failing status is not internal error
clang: add extra check
clang: possible better compilation with musl c
dev_manager: do not query for open_count
dev_manager: use list info for preset devs
thin: fix message processing on thin-pool extension
vdo: support --vdosettings
make: generate
1 year, 6 months
main - post-release
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a30013ff4f5981afd77...
Commit: a30013ff4f5981afd7778597172e0e834ca99cd4
Parent: 6d1e894a867681af7a811ed63bc435f3aa55fec8
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Wed May 18 18:18:14 2022 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Wed May 18 18:18:14 2022 +0200
post-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 3 +++
WHATS_NEW_DM | 3 +++
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/VERSION b/VERSION
index 5b09a281e..7f1382bbe 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.03.16(2) (2022-05-18)
+2.03.17(2)-git (2022-05-18)
diff --git a/VERSION_DM b/VERSION_DM
index c31ec0a43..35b742cd4 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.185 (2022-05-18)
+1.02.187-git (2022-05-18)
diff --git a/WHATS_NEW b/WHATS_NEW
index 3a5e39c09..844f69084 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,3 +1,6 @@
+Version 2.03.17 -
+===============================
+
Version 2.03.16 - 18th May 2022
===============================
Fix segfault when handling selection with historical LVs.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 9cb770879..bf83f5387 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,3 +1,6 @@
+Version 1.02.187 -
+================================
+
Version 1.02.185 - 18th May 2022
================================
1 year, 6 months
main - pre-release
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=6d1e894a867681af7a8...
Commit: 6d1e894a867681af7a811ed63bc435f3aa55fec8
Parent: 9aa3ea1c9859aa6a1d8b9ac918fa47ae24927735
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Wed May 18 18:17:06 2022 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Wed May 18 18:17:06 2022 +0200
pre-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 10 ++++++++--
WHATS_NEW_DM | 4 ++--
4 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/VERSION b/VERSION
index fba090956..5b09a281e 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.03.16(2)-git (2022-02-07)
+2.03.16(2) (2022-05-18)
diff --git a/VERSION_DM b/VERSION_DM
index d122183b2..c31ec0a43 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.185-git (2022-02-07)
+1.02.185 (2022-05-18)
diff --git a/WHATS_NEW b/WHATS_NEW
index db8265a78..3a5e39c09 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,7 +1,13 @@
-Version 2.03.16 -
-====================================
+Version 2.03.16 - 18th May 2022
+===============================
Fix segfault when handling selection with historical LVs.
Add support --vdosettings with lvcreate, lvconvert, lvchange.
+ Filtering multipath devices respects blacklist setting from multipath
+ configuration.
+ lvmdevices support for removing by device id using --deviceidtype and
+ --deldev.
+ Display writecache block size with lvs -o writecache_block_size.
+ Improve cachesettings description in man lvmcache.
Fix lossing of delete message on thin-pool extension.
Version 2.03.15 - 07th February 2022
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index c63436221..9cb770879 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,5 @@
-Version 1.02.185 -
-=====================================
+Version 1.02.185 - 18th May 2022
+================================
Version 1.02.183 - 07th February 2022
=====================================
1 year, 6 months
main - make: generate
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9aa3ea1c9859aa6a1d8...
Commit: 9aa3ea1c9859aa6a1d8b9ac918fa47ae24927735
Parent: 7ec0726ce331a4dc1ab5dc5e1b9ae503e5d758da
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Wed May 18 18:15:30 2022 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Wed May 18 18:15:30 2022 +0200
make: generate
---
man/lvchange.8_pregen | 5 +++--
man/lvconvert.8_pregen | 5 +++--
man/lvcreate.8_pregen | 5 +++--
man/lvdisplay.8_pregen | 5 +++--
man/lvextend.8_pregen | 5 +++--
man/lvm-fullreport.8_pregen | 5 +++--
man/lvm-lvpoll.8_pregen | 5 +++--
man/lvmconfig.8_pregen | 5 +++--
man/lvmdevices.8_pregen | 5 +++--
man/lvmdiskscan.8_pregen | 5 +++--
man/lvreduce.8_pregen | 5 +++--
man/lvremove.8_pregen | 5 +++--
man/lvrename.8_pregen | 5 +++--
man/lvresize.8_pregen | 5 +++--
man/lvs.8_pregen | 5 +++--
man/lvscan.8_pregen | 5 +++--
man/pvchange.8_pregen | 5 +++--
man/pvck.8_pregen | 5 +++--
man/pvcreate.8_pregen | 5 +++--
man/pvdisplay.8_pregen | 5 +++--
man/pvmove.8_pregen | 5 +++--
man/pvremove.8_pregen | 5 +++--
man/pvresize.8_pregen | 5 +++--
man/pvs.8_pregen | 5 +++--
man/pvscan.8_pregen | 5 +++--
man/vgcfgbackup.8_pregen | 5 +++--
man/vgcfgrestore.8_pregen | 5 +++--
man/vgchange.8_pregen | 5 +++--
man/vgck.8_pregen | 5 +++--
man/vgconvert.8_pregen | 5 +++--
man/vgcreate.8_pregen | 5 +++--
man/vgdisplay.8_pregen | 5 +++--
man/vgexport.8_pregen | 5 +++--
man/vgextend.8_pregen | 5 +++--
man/vgimport.8_pregen | 5 +++--
man/vgimportclone.8_pregen | 5 +++--
man/vgimportdevices.8_pregen | 5 +++--
man/vgmerge.8_pregen | 5 +++--
man/vgmknodes.8_pregen | 5 +++--
man/vgreduce.8_pregen | 5 +++--
man/vgremove.8_pregen | 5 +++--
man/vgrename.8_pregen | 5 +++--
man/vgs.8_pregen | 5 +++--
man/vgscan.8_pregen | 5 +++--
man/vgsplit.8_pregen | 5 +++--
45 files changed, 135 insertions(+), 90 deletions(-)
diff --git a/man/lvchange.8_pregen b/man/lvchange.8_pregen
index babeb1b29..e46a3b9b2 100644
--- a/man/lvchange.8_pregen
+++ b/man/lvchange.8_pregen
@@ -614,8 +614,9 @@ See \fBlvm.conf\fP(5) for more information about profiles.
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/lvconvert.8_pregen b/man/lvconvert.8_pregen
index 156ae00ce..22de7467f 100644
--- a/man/lvconvert.8_pregen
+++ b/man/lvconvert.8_pregen
@@ -1136,8 +1136,9 @@ See \fBlvmvdo\fP(7) for more information about VDO usage.
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/lvcreate.8_pregen b/man/lvcreate.8_pregen
index a454d175f..efca91c19 100644
--- a/man/lvcreate.8_pregen
+++ b/man/lvcreate.8_pregen
@@ -1008,8 +1008,9 @@ See \fBlvmvdo\fP(7) for more information about VDO usage.
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/lvdisplay.8_pregen b/man/lvdisplay.8_pregen
index 03235ef1a..b89d188de 100644
--- a/man/lvdisplay.8_pregen
+++ b/man/lvdisplay.8_pregen
@@ -186,8 +186,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/lvextend.8_pregen b/man/lvextend.8_pregen
index 8bc2c2523..445afc25e 100644
--- a/man/lvextend.8_pregen
+++ b/man/lvextend.8_pregen
@@ -328,8 +328,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/lvm-fullreport.8_pregen b/man/lvm-fullreport.8_pregen
index 115f50d4a..4bcfba4f8 100644
--- a/man/lvm-fullreport.8_pregen
+++ b/man/lvm-fullreport.8_pregen
@@ -169,8 +169,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/lvm-lvpoll.8_pregen b/man/lvm-lvpoll.8_pregen
index 43696c1b7..bfdfafab8 100644
--- a/man/lvm-lvpoll.8_pregen
+++ b/man/lvm-lvpoll.8_pregen
@@ -115,8 +115,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/lvmconfig.8_pregen b/man/lvmconfig.8_pregen
index bab5d6056..a29255cf4 100644
--- a/man/lvmconfig.8_pregen
+++ b/man/lvmconfig.8_pregen
@@ -156,8 +156,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/lvmdevices.8_pregen b/man/lvmdevices.8_pregen
index 90d3af455..86fe7e015 100644
--- a/man/lvmdevices.8_pregen
+++ b/man/lvmdevices.8_pregen
@@ -370,8 +370,9 @@ then it will override the default type that lvm would use.
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/lvmdiskscan.8_pregen b/man/lvmdiskscan.8_pregen
index 0d5fdc741..4db9c2021 100644
--- a/man/lvmdiskscan.8_pregen
+++ b/man/lvmdiskscan.8_pregen
@@ -102,8 +102,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/lvreduce.8_pregen b/man/lvreduce.8_pregen
index 6c55ae158..e8953bc8f 100644
--- a/man/lvreduce.8_pregen
+++ b/man/lvreduce.8_pregen
@@ -130,8 +130,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/lvremove.8_pregen b/man/lvremove.8_pregen
index 5b471f0e5..f47181213 100644
--- a/man/lvremove.8_pregen
+++ b/man/lvremove.8_pregen
@@ -136,8 +136,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/lvrename.8_pregen b/man/lvrename.8_pregen
index 9624611d1..278e8e989 100644
--- a/man/lvrename.8_pregen
+++ b/man/lvrename.8_pregen
@@ -120,8 +120,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/lvresize.8_pregen b/man/lvresize.8_pregen
index bacad4f46..625fed0a1 100644
--- a/man/lvresize.8_pregen
+++ b/man/lvresize.8_pregen
@@ -286,8 +286,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/lvs.8_pregen b/man/lvs.8_pregen
index 8540816d3..d055851f5 100644
--- a/man/lvs.8_pregen
+++ b/man/lvs.8_pregen
@@ -172,8 +172,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/lvscan.8_pregen b/man/lvscan.8_pregen
index 20a51ae99..012479618 100644
--- a/man/lvscan.8_pregen
+++ b/man/lvscan.8_pregen
@@ -119,8 +119,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/pvchange.8_pregen b/man/pvchange.8_pregen
index 1ace1b6b4..57d1570c4 100644
--- a/man/pvchange.8_pregen
+++ b/man/pvchange.8_pregen
@@ -179,8 +179,9 @@ multiple tags at once. See \fBlvm\fP(8) for information about tags.
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/pvck.8_pregen b/man/pvck.8_pregen
index 3f60ff818..156e3b789 100644
--- a/man/pvck.8_pregen
+++ b/man/pvck.8_pregen
@@ -351,8 +351,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/pvcreate.8_pregen b/man/pvcreate.8_pregen
index 043f067f7..67b5c27d0 100644
--- a/man/pvcreate.8_pregen
+++ b/man/pvcreate.8_pregen
@@ -229,8 +229,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/pvdisplay.8_pregen b/man/pvdisplay.8_pregen
index 4c681c955..23d41b29b 100644
--- a/man/pvdisplay.8_pregen
+++ b/man/pvdisplay.8_pregen
@@ -183,8 +183,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/pvmove.8_pregen b/man/pvmove.8_pregen
index ea300bb9d..28b0ea4e8 100644
--- a/man/pvmove.8_pregen
+++ b/man/pvmove.8_pregen
@@ -206,8 +206,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/pvremove.8_pregen b/man/pvremove.8_pregen
index ce01d3398..a086724b8 100644
--- a/man/pvremove.8_pregen
+++ b/man/pvremove.8_pregen
@@ -103,8 +103,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/pvresize.8_pregen b/man/pvresize.8_pregen
index 85078e18d..708b7d72a 100644
--- a/man/pvresize.8_pregen
+++ b/man/pvresize.8_pregen
@@ -98,8 +98,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/pvs.8_pregen b/man/pvs.8_pregen
index e9f981a9e..485e651a7 100644
--- a/man/pvs.8_pregen
+++ b/man/pvs.8_pregen
@@ -169,8 +169,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/pvscan.8_pregen b/man/pvscan.8_pregen
index 00743a7d4..cb837b8ca 100644
--- a/man/pvscan.8_pregen
+++ b/man/pvscan.8_pregen
@@ -383,8 +383,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/vgcfgbackup.8_pregen b/man/vgcfgbackup.8_pregen
index 0f051b75e..e732a7d43 100644
--- a/man/vgcfgbackup.8_pregen
+++ b/man/vgcfgbackup.8_pregen
@@ -123,8 +123,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/vgcfgrestore.8_pregen b/man/vgcfgrestore.8_pregen
index 67e8ae8e8..d9d4a2a76 100644
--- a/man/vgcfgrestore.8_pregen
+++ b/man/vgcfgrestore.8_pregen
@@ -208,8 +208,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/vgchange.8_pregen b/man/vgchange.8_pregen
index 1dafeafd0..07626ee1b 100644
--- a/man/vgchange.8_pregen
+++ b/man/vgchange.8_pregen
@@ -568,8 +568,9 @@ See \fBlvm.conf\fP(5) for more information about profiles.
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/vgck.8_pregen b/man/vgck.8_pregen
index 76ef1a284..23bd7ea6d 100644
--- a/man/vgck.8_pregen
+++ b/man/vgck.8_pregen
@@ -114,8 +114,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/vgconvert.8_pregen b/man/vgconvert.8_pregen
index 8fe27ca2e..cdeee39fa 100644
--- a/man/vgconvert.8_pregen
+++ b/man/vgconvert.8_pregen
@@ -124,8 +124,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/vgcreate.8_pregen b/man/vgcreate.8_pregen
index 7b8b81885..d07741ffc 100644
--- a/man/vgcreate.8_pregen
+++ b/man/vgcreate.8_pregen
@@ -206,8 +206,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/vgdisplay.8_pregen b/man/vgdisplay.8_pregen
index 3fd7e55c2..db2e48b01 100644
--- a/man/vgdisplay.8_pregen
+++ b/man/vgdisplay.8_pregen
@@ -180,8 +180,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/vgexport.8_pregen b/man/vgexport.8_pregen
index 3709434bb..25f767bc8 100644
--- a/man/vgexport.8_pregen
+++ b/man/vgexport.8_pregen
@@ -139,8 +139,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/vgextend.8_pregen b/man/vgextend.8_pregen
index 3ea40988a..af5679118 100644
--- a/man/vgextend.8_pregen
+++ b/man/vgextend.8_pregen
@@ -147,8 +147,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/vgimport.8_pregen b/man/vgimport.8_pregen
index 0eb9d627d..fee109849 100644
--- a/man/vgimport.8_pregen
+++ b/man/vgimport.8_pregen
@@ -128,8 +128,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/vgimportclone.8_pregen b/man/vgimportclone.8_pregen
index 151fa9282..87a830807 100644
--- a/man/vgimportclone.8_pregen
+++ b/man/vgimportclone.8_pregen
@@ -113,8 +113,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/vgimportdevices.8_pregen b/man/vgimportdevices.8_pregen
index 3f09499e0..c030c01a5 100644
--- a/man/vgimportdevices.8_pregen
+++ b/man/vgimportdevices.8_pregen
@@ -132,8 +132,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/vgmerge.8_pregen b/man/vgmerge.8_pregen
index 298e30868..b4be7bb24 100644
--- a/man/vgmerge.8_pregen
+++ b/man/vgmerge.8_pregen
@@ -107,8 +107,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/vgmknodes.8_pregen b/man/vgmknodes.8_pregen
index f57440ef3..511d579bd 100644
--- a/man/vgmknodes.8_pregen
+++ b/man/vgmknodes.8_pregen
@@ -108,8 +108,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/vgreduce.8_pregen b/man/vgreduce.8_pregen
index 759160a6c..278aa0fac 100644
--- a/man/vgreduce.8_pregen
+++ b/man/vgreduce.8_pregen
@@ -199,8 +199,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/vgremove.8_pregen b/man/vgremove.8_pregen
index fa601b8cf..9e6051ade 100644
--- a/man/vgremove.8_pregen
+++ b/man/vgremove.8_pregen
@@ -109,8 +109,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/vgrename.8_pregen b/man/vgrename.8_pregen
index 615559bb0..932a51103 100644
--- a/man/vgrename.8_pregen
+++ b/man/vgrename.8_pregen
@@ -133,8 +133,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/vgs.8_pregen b/man/vgs.8_pregen
index 7c4a06d6d..0c89c5b5e 100644
--- a/man/vgs.8_pregen
+++ b/man/vgs.8_pregen
@@ -166,8 +166,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/vgscan.8_pregen b/man/vgscan.8_pregen
index c0a3de185..600c2c978 100644
--- a/man/vgscan.8_pregen
+++ b/man/vgscan.8_pregen
@@ -101,8 +101,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
diff --git a/man/vgsplit.8_pregen b/man/vgsplit.8_pregen
index fb217beed..b128fb8e2 100644
--- a/man/vgsplit.8_pregen
+++ b/man/vgsplit.8_pregen
@@ -175,8 +175,9 @@ messages sent to the log file and/or syslog (if configured).
.HP
\fB--devices\fP \fIPV\fP
.br
-Devices that the command can use. This option can be repeated
-or accepts a comma separated list of devices. This overrides
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
1 year, 6 months
master - toollib: fix segfault when handling selection with historical LVs
by Peter Rajnoha
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=7ec0726ce331a4dc1ab...
Commit: 7ec0726ce331a4dc1ab5dc5e1b9ae503e5d758da
Parent: ff6022d400430df2f51160ce9eec4010ac55696c
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu May 5 11:02:32 2022 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu May 5 11:13:39 2022 +0200
toollib: fix segfault when handling selection with historical LVs
When processing historical LVs inside process_each_lv_in_vg for
selection, we need to use dummy "_historical_lv" for select_match_lv.
This is because a historical LV is not an actual LV, but only a tiny
representation with subset of original properties that we recorded
(name, uuid...).
To use the same processing functions we use for full-fledged non-historical
LVs, we need to use the prefilled "_historical_lv" structure which has all
the other missing properties hard-coded.
---
WHATS_NEW | 1 +
tools/toollib.c | 7 ++++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index fad32ab08..db8265a78 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.03.16 -
====================================
+ Fix segfault when handling selection with historical LVs.
Add support --vdosettings with lvcreate, lvconvert, lvchange.
Fix lossing of delete message on thin-pool extension.
diff --git a/tools/toollib.c b/tools/toollib.c
index 545407c2f..d77092d89 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -3447,13 +3447,14 @@ int process_each_lv_in_vg(struct cmd_context *cmd, struct volume_group *vg,
process_lv = 1;
}
- process_lv = process_lv && select_match_lv(cmd, handle, vg, lvl->lv) && _select_matches(handle);
+ _historical_lv.this_glv = glvl->glv;
+ _historical_lv.name = glvl->glv->historical->name;
+
+ process_lv = process_lv && select_match_lv(cmd, handle, vg, &_historical_lv) && _select_matches(handle);
if (!process_lv)
continue;
- _historical_lv.this_glv = glvl->glv;
- _historical_lv.name = glvl->glv->historical->name;
log_very_verbose("Processing historical LV %s in VG %s.", glvl->glv->historical->name, vg->name);
ret = process_single_lv(cmd, &_historical_lv, handle);
1 year, 6 months
main - make: generate
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=ff6022d400430df2f51...
Commit: ff6022d400430df2f51160ce9eec4010ac55696c
Parent: 5e060b8fa71dcf7ad2ff2daca8dbfa009f691852
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon May 2 13:16:25 2022 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue May 3 19:09:52 2022 +0200
make: generate
---
man/lvchange.8_pregen | 31 ++++++++++++++++++++++++-------
man/lvconvert.8_pregen | 33 ++++++++++++++++++++++++++-------
man/lvcreate.8_pregen | 35 ++++++++++++++++++++++++++++-------
man/lvdisplay.8_pregen | 3 ++-
man/lvextend.8_pregen | 3 ++-
man/lvm-fullreport.8_pregen | 3 ++-
man/lvm-lvpoll.8_pregen | 3 ++-
man/lvmconfig.8_pregen | 3 ++-
man/lvmdevices.8_pregen | 14 ++++++++++----
man/lvmdiskscan.8_pregen | 3 ++-
man/lvreduce.8_pregen | 3 ++-
man/lvremove.8_pregen | 3 ++-
man/lvrename.8_pregen | 3 ++-
man/lvresize.8_pregen | 3 ++-
man/lvs.8_pregen | 3 ++-
man/lvscan.8_pregen | 3 ++-
man/pvchange.8_pregen | 3 ++-
man/pvck.8_pregen | 3 ++-
man/pvcreate.8_pregen | 3 ++-
man/pvdisplay.8_pregen | 3 ++-
man/pvmove.8_pregen | 3 ++-
man/pvremove.8_pregen | 3 ++-
man/pvresize.8_pregen | 3 ++-
man/pvs.8_pregen | 3 ++-
man/pvscan.8_pregen | 3 ++-
man/vgcfgbackup.8_pregen | 3 ++-
man/vgcfgrestore.8_pregen | 3 ++-
man/vgchange.8_pregen | 3 ++-
man/vgck.8_pregen | 3 ++-
man/vgconvert.8_pregen | 3 ++-
man/vgcreate.8_pregen | 3 ++-
man/vgdisplay.8_pregen | 3 ++-
man/vgexport.8_pregen | 3 ++-
man/vgextend.8_pregen | 3 ++-
man/vgimport.8_pregen | 3 ++-
man/vgimportclone.8_pregen | 3 ++-
man/vgimportdevices.8_pregen | 3 ++-
man/vgmerge.8_pregen | 3 ++-
man/vgmknodes.8_pregen | 3 ++-
man/vgreduce.8_pregen | 3 ++-
man/vgremove.8_pregen | 3 ++-
man/vgrename.8_pregen | 3 ++-
man/vgs.8_pregen | 3 ++-
man/vgscan.8_pregen | 3 ++-
man/vgsplit.8_pregen | 3 ++-
45 files changed, 170 insertions(+), 66 deletions(-)
diff --git a/man/lvchange.8_pregen b/man/lvchange.8_pregen
index b559c89c9..babeb1b29 100644
--- a/man/lvchange.8_pregen
+++ b/man/lvchange.8_pregen
@@ -126,6 +126,8 @@ lvchange \(em Change the attributes of logical volume(s)
\fB--sysinit\fP
.br
\fB-t\fP|\fB--test\fP
+.br
+ \fB--vdosettings\fP \fIString\fP
.br
\fB-v\fP|\fB--verbose\fP
.br
@@ -202,6 +204,8 @@ required, after which the others are optional.
\fB--\fP[\fBraid\fP]\fBminrecoveryrate\fP \fISize\fP[k|UNIT]
.br
\fB--\fP[\fBraid\fP]\fBmaxrecoveryrate\fP \fISize\fP[k|UNIT]
+.br
+ \fB--vdosettings\fP \fIString\fP
.br
\fB--\fP[\fBraid\fP]\fBwritebehind\fP \fINumber\fP
.br
@@ -545,12 +549,13 @@ See \fBlvmcache\fP(7) for more information.
.HP
\fB--cachesettings\fP \fIString\fP
.br
-Specifies tunable values for a cache LV in "Key = Value" form.
-Repeat this option to specify multiple values.
-(The default values should usually be adequate.)
-The special string value \fBdefault\fP switches
-settings back to their default kernel values and removes
-them from the list of settings stored in LVM metadata.
+Specifies tunable kernel options for dm-cache or dm-writecache LVs.
+Use the form 'option=value' or 'option1=value option2=value', or
+repeat --cachesettings for each option being set.
+These settings override the default kernel behaviors which are
+usually adequate. To remove cachesettings and revert to the default
+kernel behaviors, use --cachesettings 'default' for dm-cache or
+an empty string --cachesettings '' for dm-writecache.
See \fBlvmcache\fP(7) for more information.
.
.HP
@@ -752,7 +757,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--noudevsync\fP
@@ -927,6 +933,17 @@ error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
+\fB--vdosettings\fP \fIString\fP
+.br
+Specifies tunable VDO options for VDO LVs.
+Use the form 'option=value' or 'option1=value option2=value', or
+repeat --vdosettings for each option being set.
+These settings override the default VDO behaviors.
+To remove vdosettings and revert to the default
+VDO behaviors, use --vdosettings 'default'.
+See \fBlvmvdo\fP(7) for more information.
+.
+.HP
\fB-v\fP|\fB--verbose\fP ...
.br
Set verbose level. Repeat from 1 to 4 times to increase the detail
diff --git a/man/lvconvert.8_pregen b/man/lvconvert.8_pregen
index 679519303..156ae00ce 100644
--- a/man/lvconvert.8_pregen
+++ b/man/lvconvert.8_pregen
@@ -155,6 +155,8 @@ lvconvert \(em Change logical volume layout
\fB--usepolicies\fP
.br
\fB--vdopool\fP \fILV\fP
+.br
+ \fB--vdosettings\fP \fIString\fP
.br
\fB-v\fP|\fB--verbose\fP
.br
@@ -742,6 +744,8 @@ Convert LV to type vdopool.
.br
[ \fB--deduplication\fP \fBy\fP|\fBn\fP ]
.br
+[ \fB--vdosettings\fP \fIString\fP ]
+.br
[ COMMON_OPTIONS ]
.ad b
.RE
@@ -1064,12 +1068,13 @@ The name of a cache pool.
.HP
\fB--cachesettings\fP \fIString\fP
.br
-Specifies tunable values for a cache LV in "Key = Value" form.
-Repeat this option to specify multiple values.
-(The default values should usually be adequate.)
-The special string value \fBdefault\fP switches
-settings back to their default kernel values and removes
-them from the list of settings stored in LVM metadata.
+Specifies tunable kernel options for dm-cache or dm-writecache LVs.
+Use the form 'option=value' or 'option1=value option2=value', or
+repeat --cachesettings for each option being set.
+These settings override the default kernel behaviors which are
+usually adequate. To remove cachesettings and revert to the default
+kernel behaviors, use --cachesettings 'default' for dm-cache or
+an empty string --cachesettings '' for dm-writecache.
See \fBlvmcache\fP(7) for more information.
.
.HP
@@ -1303,7 +1308,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--noudevsync\fP
@@ -1535,6 +1541,17 @@ The name of a VDO pool LV.
See \fBlvmvdo\fP(7) for more information about VDO usage.
.
.HP
+\fB--vdosettings\fP \fIString\fP
+.br
+Specifies tunable VDO options for VDO LVs.
+Use the form 'option=value' or 'option1=value option2=value', or
+repeat --vdosettings for each option being set.
+These settings override the default VDO behaviors.
+To remove vdosettings and revert to the default
+VDO behaviors, use --vdosettings 'default'.
+See \fBlvmvdo\fP(7) for more information.
+.
+.HP
\fB-v\fP|\fB--verbose\fP ...
.br
Set verbose level. Repeat from 1 to 4 times to increase the detail
@@ -1808,6 +1825,8 @@ Convert LV to type vdopool.
.br
[ \fB--deduplication\fP \fBy\fP|\fBn\fP ]
.br
+[ \fB--vdosettings\fP \fIString\fP ]
+.br
[ COMMON_OPTIONS ]
.ad b
.RE
diff --git a/man/lvcreate.8_pregen b/man/lvcreate.8_pregen
index 2cccbbe56..a454d175f 100644
--- a/man/lvcreate.8_pregen
+++ b/man/lvcreate.8_pregen
@@ -157,6 +157,8 @@ lvcreate \(em Create a logical volume
\fB--vdo\fP
.br
\fB--vdopool\fP \fILV\fP
+.br
+ \fB--vdosettings\fP \fIString\fP
.br
\fB-v\fP|\fB--verbose\fP
.br
@@ -537,6 +539,8 @@ Create a LV that returns VDO when used.
.br
[ \fB--deduplication\fP \fBy\fP|\fBn\fP ]
.br
+[ \fB--vdosettings\fP \fIString\fP ]
+.br
[ COMMON_OPTIONS ]
.ad b
.RE
@@ -927,12 +931,13 @@ The name of a cache pool.
.HP
\fB--cachesettings\fP \fIString\fP
.br
-Specifies tunable values for a cache LV in "Key = Value" form.
-Repeat this option to specify multiple values.
-(The default values should usually be adequate.)
-The special string value \fBdefault\fP switches
-settings back to their default kernel values and removes
-them from the list of settings stored in LVM metadata.
+Specifies tunable kernel options for dm-cache or dm-writecache LVs.
+Use the form 'option=value' or 'option1=value option2=value', or
+repeat --cachesettings for each option being set.
+These settings override the default kernel behaviors which are
+usually adequate. To remove cachesettings and revert to the default
+kernel behaviors, use --cachesettings 'default' for dm-cache or
+an empty string --cachesettings '' for dm-writecache.
See \fBlvmcache\fP(7) for more information.
.
.HP
@@ -1190,7 +1195,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--nosync\fP
@@ -1438,6 +1444,17 @@ The name of a VDO pool LV.
See \fBlvmvdo\fP(7) for more information about VDO usage.
.
.HP
+\fB--vdosettings\fP \fIString\fP
+.br
+Specifies tunable VDO options for VDO LVs.
+Use the form 'option=value' or 'option1=value option2=value', or
+repeat --vdosettings for each option being set.
+These settings override the default VDO behaviors.
+To remove vdosettings and revert to the default
+VDO behaviors, use --vdosettings 'default'.
+See \fBlvmvdo\fP(7) for more information.
+.
+.HP
\fB-v\fP|\fB--verbose\fP ...
.br
Set verbose level. Repeat from 1 to 4 times to increase the detail
@@ -1966,6 +1983,8 @@ Create a VDO LV with VDO pool.
.br
[ \fB--deduplication\fP \fBy\fP|\fBn\fP ]
.br
+[ \fB--vdosettings\fP \fIString\fP ]
+.br
[ COMMON_OPTIONS ]
.ad b
.RE
@@ -1996,6 +2015,8 @@ Create a VDO LV with VDO pool.
.br
[ \fB--deduplication\fP \fBy\fP|\fBn\fP ]
.br
+[ \fB--vdosettings\fP \fIString\fP ]
+.br
[ COMMON_OPTIONS ]
.ad b
.RE
diff --git a/man/lvdisplay.8_pregen b/man/lvdisplay.8_pregen
index 04aab4c09..03235ef1a 100644
--- a/man/lvdisplay.8_pregen
+++ b/man/lvdisplay.8_pregen
@@ -278,7 +278,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--nosuffix\fP
diff --git a/man/lvextend.8_pregen b/man/lvextend.8_pregen
index be6992e94..8bc2c2523 100644
--- a/man/lvextend.8_pregen
+++ b/man/lvextend.8_pregen
@@ -423,7 +423,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--nosync\fP
diff --git a/man/lvm-fullreport.8_pregen b/man/lvm-fullreport.8_pregen
index 02b38ef40..115f50d4a 100644
--- a/man/lvm-fullreport.8_pregen
+++ b/man/lvm-fullreport.8_pregen
@@ -254,7 +254,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--nosuffix\fP
diff --git a/man/lvm-lvpoll.8_pregen b/man/lvm-lvpoll.8_pregen
index 7f45f6eb3..43696c1b7 100644
--- a/man/lvm-lvpoll.8_pregen
+++ b/man/lvm-lvpoll.8_pregen
@@ -181,7 +181,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--polloperation\fP \fBpvmove\fP|\fBconvert\fP|\fBmerge\fP|\fBmerge_thin\fP
diff --git a/man/lvmconfig.8_pregen b/man/lvmconfig.8_pregen
index 51946e1ec..bab5d6056 100644
--- a/man/lvmconfig.8_pregen
+++ b/man/lvmconfig.8_pregen
@@ -261,7 +261,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
diff --git a/man/lvmdevices.8_pregen b/man/lvmdevices.8_pregen
index a2391a62b..90d3af455 100644
--- a/man/lvmdevices.8_pregen
+++ b/man/lvmdevices.8_pregen
@@ -24,7 +24,7 @@ lvmdevices \(em Manage the devices file
.br
\fB-d\fP|\fB--debug\fP
.br
- \fB--deldev\fP \fIPV\fP
+ \fB--deldev\fP \fIString\fP
.br
\fB--delpvid\fP \fIString\fP
.br
@@ -152,6 +152,7 @@ is used for dm crypt devices, reported by sysfs.
.IP \[bu] 2
.B md_uuid
is used for md devices, reported by sysfs.
+.IP \[bu] 2
.B lvmlv_uuid
is used if a PV is placed on top of an lvm LV, reported by sysfs.
.IP \[bu] 2
@@ -226,10 +227,12 @@ Add a device to the devices file.
Remove a device from the devices file.
.br
.P
-\fBlvmdevices\fP \fB--deldev\fP \fIPV\fP
+\fBlvmdevices\fP \fB--deldev\fP \fIString\fP|\fIPV\fP
.br
.RS 4
.ad l
+[ \fB--deviceidtype\fP \fIString\fP ]
+.br
[ COMMON_OPTIONS ]
.ad b
.RE
@@ -346,9 +349,11 @@ Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
-\fB--deldev\fP \fIPV\fP
+\fB--deldev\fP \fIString\fP
.br
Remove a device from the devices file.
+When used alone, --deldev specifies a device name.
+When used with --deviceidtype, --deldev specifies a device id.
.
.HP
\fB--delpvid\fP \fIString\fP
@@ -420,7 +425,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
diff --git a/man/lvmdiskscan.8_pregen b/man/lvmdiskscan.8_pregen
index 7fd3d941d..0d5fdc741 100644
--- a/man/lvmdiskscan.8_pregen
+++ b/man/lvmdiskscan.8_pregen
@@ -162,7 +162,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
diff --git a/man/lvreduce.8_pregen b/man/lvreduce.8_pregen
index ea960eb53..6c55ae158 100644
--- a/man/lvreduce.8_pregen
+++ b/man/lvreduce.8_pregen
@@ -220,7 +220,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--noudevsync\fP
diff --git a/man/lvremove.8_pregen b/man/lvremove.8_pregen
index 2bd7997a3..5b471f0e5 100644
--- a/man/lvremove.8_pregen
+++ b/man/lvremove.8_pregen
@@ -204,7 +204,8 @@ metadata/record_lvs_history is enabled.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--noudevsync\fP
diff --git a/man/lvrename.8_pregen b/man/lvrename.8_pregen
index d41a4c241..9624611d1 100644
--- a/man/lvrename.8_pregen
+++ b/man/lvrename.8_pregen
@@ -175,7 +175,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--noudevsync\fP
diff --git a/man/lvresize.8_pregen b/man/lvresize.8_pregen
index f3ea2536c..bacad4f46 100644
--- a/man/lvresize.8_pregen
+++ b/man/lvresize.8_pregen
@@ -376,7 +376,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--nosync\fP
diff --git a/man/lvs.8_pregen b/man/lvs.8_pregen
index 2b2c5f193..8540816d3 100644
--- a/man/lvs.8_pregen
+++ b/man/lvs.8_pregen
@@ -264,7 +264,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--nosuffix\fP
diff --git a/man/lvscan.8_pregen b/man/lvscan.8_pregen
index f459ab35b..20a51ae99 100644
--- a/man/lvscan.8_pregen
+++ b/man/lvscan.8_pregen
@@ -180,7 +180,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
diff --git a/man/pvchange.8_pregen b/man/pvchange.8_pregen
index 4add9ca69..1ace1b6b4 100644
--- a/man/pvchange.8_pregen
+++ b/man/pvchange.8_pregen
@@ -248,7 +248,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
diff --git a/man/pvck.8_pregen b/man/pvck.8_pregen
index 88200f21e..3f60ff818 100644
--- a/man/pvck.8_pregen
+++ b/man/pvck.8_pregen
@@ -435,7 +435,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
diff --git a/man/pvcreate.8_pregen b/man/pvcreate.8_pregen
index a74a5ec2a..043f067f7 100644
--- a/man/pvcreate.8_pregen
+++ b/man/pvcreate.8_pregen
@@ -319,7 +319,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--norestorefile\fP
diff --git a/man/pvdisplay.8_pregen b/man/pvdisplay.8_pregen
index 2f26a8727..4c681c955 100644
--- a/man/pvdisplay.8_pregen
+++ b/man/pvdisplay.8_pregen
@@ -266,7 +266,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--nosuffix\fP
diff --git a/man/pvmove.8_pregen b/man/pvmove.8_pregen
index 0f70497a2..ea300bb9d 100644
--- a/man/pvmove.8_pregen
+++ b/man/pvmove.8_pregen
@@ -271,7 +271,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--noudevsync\fP
diff --git a/man/pvremove.8_pregen b/man/pvremove.8_pregen
index 3d4a86c09..ce01d3398 100644
--- a/man/pvremove.8_pregen
+++ b/man/pvremove.8_pregen
@@ -164,7 +164,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
diff --git a/man/pvresize.8_pregen b/man/pvresize.8_pregen
index 87d87c8ce..85078e18d 100644
--- a/man/pvresize.8_pregen
+++ b/man/pvresize.8_pregen
@@ -153,7 +153,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
diff --git a/man/pvs.8_pregen b/man/pvs.8_pregen
index 32c28e4d1..e9f981a9e 100644
--- a/man/pvs.8_pregen
+++ b/man/pvs.8_pregen
@@ -254,7 +254,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--nosuffix\fP
diff --git a/man/pvscan.8_pregen b/man/pvscan.8_pregen
index 4622e145e..00743a7d4 100644
--- a/man/pvscan.8_pregen
+++ b/man/pvscan.8_pregen
@@ -469,7 +469,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--noudevsync\fP
diff --git a/man/vgcfgbackup.8_pregen b/man/vgcfgbackup.8_pregen
index 5e658093a..0f051b75e 100644
--- a/man/vgcfgbackup.8_pregen
+++ b/man/vgcfgbackup.8_pregen
@@ -197,7 +197,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
diff --git a/man/vgcfgrestore.8_pregen b/man/vgcfgrestore.8_pregen
index 695e05582..67e8ae8e8 100644
--- a/man/vgcfgrestore.8_pregen
+++ b/man/vgcfgrestore.8_pregen
@@ -291,7 +291,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
diff --git a/man/vgchange.8_pregen b/man/vgchange.8_pregen
index 9dbad3faa..1dafeafd0 100644
--- a/man/vgchange.8_pregen
+++ b/man/vgchange.8_pregen
@@ -694,7 +694,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--noudevsync\fP
diff --git a/man/vgck.8_pregen b/man/vgck.8_pregen
index a8fa33f4b..76ef1a284 100644
--- a/man/vgck.8_pregen
+++ b/man/vgck.8_pregen
@@ -169,7 +169,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
diff --git a/man/vgconvert.8_pregen b/man/vgconvert.8_pregen
index 4d54c2b27..8fe27ca2e 100644
--- a/man/vgconvert.8_pregen
+++ b/man/vgconvert.8_pregen
@@ -206,7 +206,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
diff --git a/man/vgcreate.8_pregen b/man/vgcreate.8_pregen
index 9bb8d3868..7b8b81885 100644
--- a/man/vgcreate.8_pregen
+++ b/man/vgcreate.8_pregen
@@ -313,7 +313,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB-s\fP|\fB--physicalextentsize\fP \fISize\fP[m|UNIT]
diff --git a/man/vgdisplay.8_pregen b/man/vgdisplay.8_pregen
index 0a12b3c39..3fd7e55c2 100644
--- a/man/vgdisplay.8_pregen
+++ b/man/vgdisplay.8_pregen
@@ -258,7 +258,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--nosuffix\fP
diff --git a/man/vgexport.8_pregen b/man/vgexport.8_pregen
index a87058946..3709434bb 100644
--- a/man/vgexport.8_pregen
+++ b/man/vgexport.8_pregen
@@ -194,7 +194,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
diff --git a/man/vgextend.8_pregen b/man/vgextend.8_pregen
index 2b2650527..3ea40988a 100644
--- a/man/vgextend.8_pregen
+++ b/man/vgextend.8_pregen
@@ -237,7 +237,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
diff --git a/man/vgimport.8_pregen b/man/vgimport.8_pregen
index 5cd8fab84..0eb9d627d 100644
--- a/man/vgimport.8_pregen
+++ b/man/vgimport.8_pregen
@@ -189,7 +189,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
diff --git a/man/vgimportclone.8_pregen b/man/vgimportclone.8_pregen
index bf0af5841..151fa9282 100644
--- a/man/vgimportclone.8_pregen
+++ b/man/vgimportclone.8_pregen
@@ -179,7 +179,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
diff --git a/man/vgimportdevices.8_pregen b/man/vgimportdevices.8_pregen
index 5897e29ad..3f09499e0 100644
--- a/man/vgimportdevices.8_pregen
+++ b/man/vgimportdevices.8_pregen
@@ -193,7 +193,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
diff --git a/man/vgmerge.8_pregen b/man/vgmerge.8_pregen
index a36e0c7bd..298e30868 100644
--- a/man/vgmerge.8_pregen
+++ b/man/vgmerge.8_pregen
@@ -167,7 +167,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--poolmetadataspare\fP \fBy\fP|\fBn\fP
diff --git a/man/vgmknodes.8_pregen b/man/vgmknodes.8_pregen
index 0a03e1582..f57440ef3 100644
--- a/man/vgmknodes.8_pregen
+++ b/man/vgmknodes.8_pregen
@@ -169,7 +169,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
diff --git a/man/vgreduce.8_pregen b/man/vgreduce.8_pregen
index f3178a618..759160a6c 100644
--- a/man/vgreduce.8_pregen
+++ b/man/vgreduce.8_pregen
@@ -265,7 +265,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
diff --git a/man/vgremove.8_pregen b/man/vgremove.8_pregen
index 779c0f13e..fa601b8cf 100644
--- a/man/vgremove.8_pregen
+++ b/man/vgremove.8_pregen
@@ -170,7 +170,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--noudevsync\fP
diff --git a/man/vgrename.8_pregen b/man/vgrename.8_pregen
index d3e776ca4..615559bb0 100644
--- a/man/vgrename.8_pregen
+++ b/man/vgrename.8_pregen
@@ -194,7 +194,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
diff --git a/man/vgs.8_pregen b/man/vgs.8_pregen
index ee5083a93..7c4a06d6d 100644
--- a/man/vgs.8_pregen
+++ b/man/vgs.8_pregen
@@ -251,7 +251,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--nosuffix\fP
diff --git a/man/vgscan.8_pregen b/man/vgscan.8_pregen
index 824e7f673..c0a3de185 100644
--- a/man/vgscan.8_pregen
+++ b/man/vgscan.8_pregen
@@ -168,7 +168,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--notifydbus\fP
diff --git a/man/vgsplit.8_pregen b/man/vgsplit.8_pregen
index 065c8b52a..fb217beed 100644
--- a/man/vgsplit.8_pregen
+++ b/man/vgsplit.8_pregen
@@ -255,7 +255,8 @@ perform standard hint file invalidation where appropriate.
.HP
\fB--nolocking\fP
.br
-Disable locking.
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
.
.HP
\fB--poolmetadataspare\fP \fBy\fP|\fBn\fP
1 year, 7 months
main - vdo: support --vdosettings
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=5e060b8fa71dcf7ad2f...
Commit: 5e060b8fa71dcf7ad2ff2daca8dbfa009f691852
Parent: dd28460017356d9a1a30a787b5572e9bcbf1c4a4
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Apr 13 15:09:08 2022 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue May 3 19:09:52 2022 +0200
vdo: support --vdosettings
Allow to use --vdosettings with lvcreate,lvconvert,lvchange.
Support settings currenly only configurable via lvm.conf.
With lvchange we require inactivate LV for changes to be applied.
Settings block_map_era_length has supported alias block_map_period.
---
WHATS_NEW | 1 +
device_mapper/vdo/target.h | 6 +-
man/lvmvdo.7_main | 39 ++++++++--
test/shell/lvchange-vdo.sh | 8 ++
test/shell/lvconvert-vdo.sh | 8 +-
test/shell/lvcreate-vdo.sh | 6 +-
tools/args.h | 9 +++
tools/command-lines.in | 6 +-
tools/lvchange.c | 43 ++++++++++-
tools/lvconvert.c | 9 +--
tools/lvcreate.c | 34 +++++----
tools/toollib.c | 177 ++++++++++++++++++++++++++++++++++++++++++++
tools/toollib.h | 6 ++
13 files changed, 313 insertions(+), 39 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 7c93d804d..fad32ab08 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.03.16 -
====================================
+ Add support --vdosettings with lvcreate, lvconvert, lvchange.
Fix lossing of delete message on thin-pool extension.
Version 2.03.15 - 07th February 2022
diff --git a/device_mapper/vdo/target.h b/device_mapper/vdo/target.h
index 51dde3f4d..60c5bff56 100644
--- a/device_mapper/vdo/target.h
+++ b/device_mapper/vdo/target.h
@@ -77,8 +77,10 @@ enum dm_vdo_write_policy {
struct dm_vdo_target_params {
uint32_t minimum_io_size; // in sectors
uint32_t block_map_cache_size_mb;
- uint32_t block_map_era_length; // format period
-
+ union {
+ uint32_t block_map_era_length; // format period
+ uint32_t block_map_period; // supported alias
+ };
uint32_t check_point_frequency;
uint32_t index_memory_size_mb; // format
diff --git a/man/lvmvdo.7_main b/man/lvmvdo.7_main
index 3b77173c4..14bd640b5 100644
--- a/man/lvmvdo.7_main
+++ b/man/lvmvdo.7_main
@@ -132,6 +132,19 @@ that can keep 100% incompressible data there.
# lvconvert --type vdo-pool -n vdo0 -V10G vg/ExistingLV
.fi
.
+.SS \n+[step]. Change the compression and deduplication of a VDOPoolLV
+.
+Disable or enable the compression and deduplication for VDOPoolLV
+(the volume that maintains all VDO LV(s) associated with it).
+.P
+.B lvchange --compression y|n --deduplication y|n VG/VDOPoolLV
+.P
+.I Example
+.nf
+# lvchange --compression n vg/vdopool0
+# lvchange --deduplication y vg/vdopool1
+.fi
+.
.SS \n+[step]. Change the default settings used for creating a VDOPoolLV
.
VDO allows to set a large variety of options. Lots of these settings
@@ -173,17 +186,27 @@ EOF
# lvcreate --vdo -L10G --config 'allocation/vdo_cpu_threads=4' vg/vdopool1
.fi
.
-.SS \n+[step]. Change the compression and deduplication of a VDOPoolLV
-.
-Disable or enable the compression and deduplication for VDOPoolLV
-(the volume that maintains all VDO LV(s) associated with it).
-.P
-.B lvchange --compression y|n --deduplication y|n VG/VDOPoolLV
+.SS \n+[step]. Set or change VDO settings with option --vdosettings
+.
+Use the form 'option=value' or 'option1=value option2=value',
+or repeat --vdosettings for each option being set.
+Options are listed in the Example section above, for the full description see
+.BR lvm.conf (5).
+Options can omit 'vdo_' and 'vdo_use_' prefixes and all its underscores.
+So i.e. vdo_use_metadata_hints=1 and metadatahints=1 are equivalent.
+To change the option for an already existing VDOPoolLV use
+.BR lvchange (8)
+command. However not all option can be changed.
+Only compression and deduplication options can be also changed for an active VDO LV.
+Lowest priority options are specified with configuration file,
+then with --vdosettings and highest are expliction option --compression
+and --deduplication.
.P
.I Example
+.P
.nf
-# lvchange --compression n vg/vdopool0
-# lvchange --deduplication y vg/vdopool1
+# lvcreate --vdo -L10G --vdosettings 'ack_threads=1 hash_zone_threads=2' vg/vdopool0
+# lvchange --vdosettings 'bio_threads=2 deduplication=1' vg/vdopool0
.fi
.
.SS \n+[step]. Checking the usage of VDOPoolLV
diff --git a/test/shell/lvchange-vdo.sh b/test/shell/lvchange-vdo.sh
index 461b7821f..7cc44d6bc 100644
--- a/test/shell/lvchange-vdo.sh
+++ b/test/shell/lvchange-vdo.sh
@@ -48,9 +48,17 @@ check grep_dmsetup status $vg-vdopool-vpool " online online "
lvchange --compression n --deduplication n $vg/vdopool
check grep_dmsetup status $vg-vdopool-vpool " offline offline "
+# --vdosettings needs inactive LV
+not lvchange --vdosettings 'ack_threads=8' $vg/vdopool
lvchange -an $vg/$lv1
+# With inactive vdo-pool changes are applied
+# explicit option --compression has highest priority
+lvchange --vdosettings 'ack_threads=5 compression=0' --compression y $vg/vdopool
+check lv_field $vg/$lv1 vdo_ack_threads "5"
+check lv_field $vg/$lv1 vdo_compression "enabled"
+
# Test activation
lvchange -aly $vg/$lv1
check active $vg $lv1
diff --git a/test/shell/lvconvert-vdo.sh b/test/shell/lvconvert-vdo.sh
index 529f325bd..c42d8f25a 100644
--- a/test/shell/lvconvert-vdo.sh
+++ b/test/shell/lvconvert-vdo.sh
@@ -28,12 +28,12 @@ lvcreate -L5G -n $lv1 $vg
not lvconvert --type vdo-pool $vg/$lv1 |& tee out
grep "WARNING" out
-
-lvconvert -y --type vdo-pool $vg/$lv1
+# Check --vdosettings is also applied to converted vdo-pool
+lvconvert -y --type vdo-pool --vdosettings 'ack_threads=5' $vg/$lv1
+check lv_field $vg/$lv1 vdo_ack_threads "5"
lvremove -f $vg
-
-#
+#
lvcreate -L5G -n $lv1 $vg
lvconvert -y --vdopool $vg/$lv1
lvremove -f $vg
diff --git a/test/shell/lvcreate-vdo.sh b/test/shell/lvcreate-vdo.sh
index 44f8bf094..3e807ac94 100644
--- a/test/shell/lvcreate-vdo.sh
+++ b/test/shell/lvcreate-vdo.sh
@@ -79,8 +79,12 @@ not fsck -n "$DM_DEV_DIR/mapper/$vg-${lv2}"
lvremove -ff $vg
+# Unknown settings does not pass
+# TODO: try to catch this in parser and 'fail'
+not lvcreate --type vdo --vdosettings 'ack_Xthreads=4' -L10G -V1T -ky -n $lv1 $vg
-lvcreate --type vdo -L10G -V1T -ky -n $lv1 $vg
+lvcreate --type vdo --vdosettings 'ack_threads=4' -L10G -V1T -ky -n $lv1 $vg
+check lv_field $vg/$lv1 vdo_ack_threads "4"
lvs -a $vg
lvremove -ff $vg
diff --git a/tools/args.h b/tools/args.h
index 57d2dfc52..baae333e1 100644
--- a/tools/args.h
+++ b/tools/args.h
@@ -912,6 +912,15 @@ arg(vdopool_ARG, '\0', "vdopool", lv_VAL, 0, 0,
"The name of a VDO pool LV.\n"
"See \\fBlvmvdo\\fP(7) for more information about VDO usage.\n")
+arg(vdosettings_ARG, '\0', "vdosettings", string_VAL, ARG_GROUPABLE, 0,
+ "Specifies tunable VDO options for VDO LVs.\n"
+ "Use the form 'option=value' or 'option1=value option2=value', or\n"
+ "repeat --vdosettings for each option being set.\n"
+ "These settings override the default VDO behaviors.\n"
+ "To remove vdosettings and revert to the default\n"
+ "VDO behaviors, use --vdosettings 'default'.\n"
+ "See \\fBlvmvdo\\fP(7) for more information.\n")
+
arg(version_ARG, '\0', "version", 0, 0, 0,
"Display version information.\n")
diff --git a/tools/command-lines.in b/tools/command-lines.in
index ce350e95c..b64fd0dda 100644
--- a/tools/command-lines.in
+++ b/tools/command-lines.in
@@ -243,6 +243,7 @@ OO_LVCHANGE_META: --addtag Tag, --deltag Tag,
--setautoactivation Bool, --errorwhenfull Bool, --discards Discards, --zero Bool,
--cachemode CacheMode, --cachepolicy String, --cachesettings String,
--minrecoveryrate SizeKB, --maxrecoveryrate SizeKB,
+--vdosettings String,
--writebehind Number, --writemostly WriteMostlyPV, --persistent n
# It's unfortunate that activate needs to be optionally allowed here;
@@ -341,7 +342,8 @@ OO_LVCONVERT_CACHE: --cachemetadataformat CacheMetadataFormat,
--cachesettings String, --zero Bool
OO_LVCONVERT_VDO: --metadataprofile String, --readahead Readahead,
---compression Bool, --deduplication Bool, --zero Bool
+--compression Bool, --deduplication Bool, --vdosettings String,
+--zero Bool
OO_LVCONVERT: --alloc Alloc, --background, --force, --noudevsync
@@ -839,7 +841,7 @@ OO_LVCREATE_POOL: --poolmetadatasize SizeMB, --poolmetadataspare Bool, --chunksi
OO_LVCREATE_THINPOOL: --discards Discards, --errorwhenfull Bool
-OO_LVCREATE_VDO: --compression Bool, --deduplication Bool
+OO_LVCREATE_VDO: --compression Bool, --deduplication Bool, --vdosettings String
---
lvcreate --type error --size SizeMB VG
diff --git a/tools/lvchange.c b/tools/lvchange.c
index d9c1bc688..670a4ec3d 100644
--- a/tools/lvchange.c
+++ b/tools/lvchange.c
@@ -755,6 +755,43 @@ out:
return r;
}
+static int _lvchange_vdo(struct cmd_context *cmd,
+ struct logical_volume *lv,
+ uint32_t *mr)
+{
+ struct lv_segment *seg;
+ int updated = 0;
+
+ seg = first_seg(lv);
+
+ // With VDO LV given flip to VDO pool
+ if (seg_is_vdo(seg))
+ seg = first_seg(seg_lv(seg, 0));
+
+ if (!get_vdo_settings(cmd, &seg->vdo_params, &updated))
+ return_0;
+
+ if ((updated & VDO_CHANGE_OFFLINE) &&
+ lv_info(cmd, seg->lv, 1, NULL, 0, 0)) {
+ log_error("Cannot change VDO settings for active VDO pool %s.",
+ display_lvname(seg->lv));
+ // TODO maybe add --force support with prompt here
+ log_print_unless_silent("VDO pool %s with all its LVs needs to be deactivated.",
+ display_lvname(seg->lv));
+ return 0;
+ }
+
+ if (updated) {
+ if (!dm_vdo_validate_target_params(&seg->vdo_params, 0 /* vdo_size */))
+ return_0;
+
+ /* Request caller to commit and reload metadata */
+ *mr |= MR_RELOAD;
+ }
+
+ return 1;
+}
+
static int _lvchange_tag(struct cmd_context *cmd, struct logical_volume *lv,
int arg, uint32_t *mr)
{
@@ -1154,6 +1191,7 @@ static int _option_requires_direct_commit(int opt_enum)
cachemode_ARG,
cachepolicy_ARG,
cachesettings_ARG,
+ vdosettings_ARG,
-1
};
@@ -1354,7 +1392,10 @@ static int _lvchange_properties_single(struct cmd_context *cmd,
docmds++;
doit += _lvchange_cache(cmd, lv, &mr);
break;
-
+ case vdosettings_ARG:
+ docmds++;
+ doit += _lvchange_vdo(cmd, lv, &mr);
+ break;
default:
log_error(INTERNAL_ERROR "Failed to check for option %s",
arg_long_option_name(i));
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 1c4351e9d..76bef806c 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -5454,13 +5454,8 @@ static int _lvconvert_to_vdopool_single(struct cmd_context *cmd,
if (!fill_vdo_target_params(cmd, &vdo_params, &vdo_pool_header_size, vg->profile))
goto_out;
- if (arg_is_set(cmd, compression_ARG))
- vdo_params.use_compression =
- arg_int_value(cmd, compression_ARG, 0);
-
- if (arg_is_set(cmd, deduplication_ARG))
- vdo_params.use_deduplication =
- arg_int_value(cmd, deduplication_ARG, 0);
+ if (!get_vdo_settings(cmd, &vdo_params, NULL))
+ return_0;
if (!activate_lv(cmd, lv)) {
log_error("Cannot activate %s.", display_lvname(lv));
diff --git a/tools/lvcreate.c b/tools/lvcreate.c
index b58fd62bb..20d7e4690 100644
--- a/tools/lvcreate.c
+++ b/tools/lvcreate.c
@@ -698,6 +698,23 @@ static int _read_cache_params(struct cmd_context *cmd,
return 1;
}
+static int _read_vdo_params(struct cmd_context *cmd,
+ struct lvcreate_params *lp)
+{
+ if (!seg_is_vdo(lp))
+ return 1;
+
+ // prefiling settings here
+ if (!fill_vdo_target_params(cmd, &lp->vdo_params, &lp->vdo_pool_header_size, NULL))
+ return_0;
+
+ // override with optional vdo settings
+ if (!get_vdo_settings(cmd, &lp->vdo_params, NULL))
+ return_0;
+
+ return 1;
+}
+
static int _read_activation_params(struct cmd_context *cmd,
struct volume_group *vg,
struct lvcreate_params *lp)
@@ -888,7 +905,8 @@ static int _lvcreate_params(struct cmd_context *cmd,
#define VDO_POOL_ARGS \
vdopool_ARG,\
compression_ARG,\
- deduplication_ARG
+ deduplication_ARG,\
+ vdosettings_ARG
/* Cache and cache-pool segment type */
if (seg_is_cache(lp)) {
@@ -1098,19 +1116,6 @@ static int _lvcreate_params(struct cmd_context *cmd,
zero_ARG,
-1))
return_0;
-
- // FIXME: prefiling here - this is wrong place
- // but will work for this moment
- if (!fill_vdo_target_params(cmd, &lp->vdo_params, &lp->vdo_pool_header_size, NULL))
- return_0;
-
- if (arg_is_set(cmd, compression_ARG))
- lp->vdo_params.use_compression =
- arg_int_value(cmd, compression_ARG, 0);
-
- if (arg_is_set(cmd, deduplication_ARG))
- lp->vdo_params.use_deduplication =
- arg_int_value(cmd, deduplication_ARG, 0);
}
/* Check options shared between more segment types */
@@ -1198,6 +1203,7 @@ static int _lvcreate_params(struct cmd_context *cmd,
&lp->pool_metadata_size, &lp->pool_metadata_spare,
&lp->chunk_size, &lp->discards, &lp->zero_new_blocks)) ||
!_read_cache_params(cmd, lp) ||
+ !_read_vdo_params(cmd, lp) ||
!_read_mirror_and_raid_params(cmd, lp))
return_0;
diff --git a/tools/toollib.c b/tools/toollib.c
index 897adec34..545407c2f 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -1200,6 +1200,183 @@ out:
return ok;
}
+/*
+ * Compare VDO option name, skip any '_' in name
+ * and also allow to use it without vdo_[use_] prefix
+ */
+static int _compare_vdo_option(const char *b1, const char *b2)
+{
+ if (strncasecmp(b1, "vdo", 3) == 0) // skip vdo prefix
+ b1 += 3;
+
+ if ((tolower(*b1) != tolower(*b2)) &&
+ (strncmp(b2, "use_", 4) == 0))
+ b2 += 4; // try again with skipped prefix 'use_'
+
+ while (*b1 && *b2) {
+ if (tolower(*b1) == tolower(*b2)) {
+ ++b1;
+ ++b2;
+ continue; // matching char
+ }
+
+ if (*b1 == '_')
+ ++b1; // skip to next char
+ else if (*b2 == '_')
+ ++b2; // skip to next char
+ else
+ break; // mismatch
+ }
+
+ return (*b1 || *b2) ? 0 : 1;
+}
+
+#define CHECK_AND_SET(var, onoff) \
+ option = #var;\
+ if (_compare_vdo_option(cn->key, option)) {\
+ if (is_lvchange || !cn->v || (cn->v->type != DM_CFG_INT))\
+ goto err;\
+ if (vtp->var != cn->v->v.i) {\
+ vtp->var = cn->v->v.i;\
+ u |= onoff;\
+ }\
+ continue;\
+ }
+
+#define DO_OFFLINE(var) \
+ CHECK_AND_SET(var, VDO_CHANGE_OFFLINE)
+
+#define DO_ONLINE(var) \
+ CHECK_AND_SET(var, VDO_CHANGE_ONLINE)
+
+int get_vdo_settings(struct cmd_context *cmd,
+ struct dm_vdo_target_params *vtp,
+ int *updated)
+{
+ const char *str, *option = NULL;
+ struct arg_value_group_list *group;
+ struct dm_config_tree *result = NULL, *prev = NULL, *current = NULL;
+ struct dm_config_node *cn;
+ int r = 0, u = 0, is_lvchange;
+ int use_compression = vtp->use_compression;
+ int use_deduplication = vtp->use_deduplication;
+ int checked_lvchange;
+
+ if (updated)
+ *updated = 0;
+
+ // Group all --vdosettings
+ dm_list_iterate_items(group, &cmd->arg_value_groups) {
+ if (!grouped_arg_is_set(group->arg_values, vdosettings_ARG))
+ continue;
+
+ if (!(current = dm_config_create()))
+ goto_out;
+ if (prev)
+ current->cascade = prev;
+ prev = current;
+
+ if (!(str = grouped_arg_str_value(group->arg_values,
+ vdosettings_ARG,
+ NULL)))
+ goto_out;
+
+ if (!dm_config_parse_without_dup_node_check(current, str, str + strlen(str)))
+ goto_out;
+ }
+
+ if (current) {
+ if (!(result = dm_config_flatten(current)))
+ goto_out;
+
+ checked_lvchange = !strcmp(cmd->name, "lvchange");
+
+ /* Use all acceptable VDO options */
+ for (cn = result->root; cn; cn = cn->sib) {
+ is_lvchange = 0;
+ DO_OFFLINE(ack_threads);
+ DO_OFFLINE(bio_rotation);
+ DO_OFFLINE(bio_threads);
+ DO_OFFLINE(block_map_cache_size_mb);
+ DO_OFFLINE(block_map_era_length);
+ DO_OFFLINE(block_map_period); // alias for block_map_era_length
+ DO_OFFLINE(cpu_threads);
+ DO_OFFLINE(hash_zone_threads);
+ DO_OFFLINE(logical_threads);
+ DO_OFFLINE(max_discard);
+ DO_OFFLINE(physical_threads);
+
+ // Support also these - even when we have regular opts for them
+ DO_ONLINE(use_compression);
+ DO_ONLINE(use_deduplication);
+
+ // Settings bellow cannot be changed with lvchange command
+ is_lvchange = checked_lvchange;
+
+ DO_OFFLINE(check_point_frequency);
+ DO_OFFLINE(index_memory_size_mb);
+ DO_OFFLINE(minimum_io_size);
+ DO_OFFLINE(slab_size_mb);
+ DO_OFFLINE(use_metadata_hints);
+ DO_OFFLINE(use_sparse_index);
+
+ option = "write_policy";
+ if (_compare_vdo_option(cn->key, option)) {
+ if (is_lvchange || !cn->v || (cn->v->type != DM_CFG_STRING))
+ goto err;
+ if (!set_vdo_write_policy(&vtp->write_policy, cn->v->v.str))
+ goto_out;
+ u |= VDO_CHANGE_OFFLINE;
+ continue;
+ }
+
+ log_error("Unknown VDO setting \"%s\".", cn->key);
+ goto out;
+ }
+ }
+
+ if (arg_is_set(cmd, compression_ARG)) {
+ vtp->use_compression = arg_int_value(cmd, compression_ARG, 0);
+ if (vtp->use_compression != use_compression)
+ u |= VDO_CHANGE_ONLINE;
+ }
+
+ if (arg_is_set(cmd, deduplication_ARG)) {
+ vtp->use_deduplication = arg_int_value(cmd, deduplication_ARG, 0);
+ if (vtp->use_deduplication != use_deduplication)
+ u |= VDO_CHANGE_ONLINE;
+ }
+
+ if (updated) {
+ // validation of updated VDO option
+ if (!dm_vdo_validate_target_params(vtp, 0 /* vdo_size */)) {
+err:
+ if (is_lvchange)
+ log_error("Cannot change VDO setting \"vdo_%s\" in existing VDO pool.",
+ option);
+ else
+ log_error("Invalid argument for VDO setting \"vdo_%s\".",
+ option);
+ goto out;
+ }
+
+ *updated = u;
+ }
+
+ r = 1;
+out:
+ if (result)
+ dm_config_destroy(result);
+
+ while (prev) {
+ current = prev->cascade;
+ dm_config_destroy(prev);
+ prev = current;
+ }
+
+ return r;
+}
+
static int _get_one_writecache_setting(struct cmd_context *cmd, struct writecache_settings *settings,
char *key, char *val, uint32_t *block_size_sectors)
{
diff --git a/tools/toollib.h b/tools/toollib.h
index f3a60fbc4..2b38e4e4f 100644
--- a/tools/toollib.h
+++ b/tools/toollib.h
@@ -217,6 +217,12 @@ int get_cache_params(struct cmd_context *cmd,
const char **name,
struct dm_config_tree **settings);
+#define VDO_CHANGE_ONLINE 1
+#define VDO_CHANGE_OFFLINE 2
+int get_vdo_settings(struct cmd_context *cmd,
+ struct dm_vdo_target_params *vtp,
+ int *updated);
+
int get_writecache_settings(struct cmd_context *cmd, struct writecache_settings *settings,
uint32_t *block_size_sectors);
1 year, 7 months
main - improve description of devices option
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=dd28460017356d9a1a3...
Commit: dd28460017356d9a1a30a787b5572e9bcbf1c4a4
Parent: 494372b4eed0c8f6040e3357939eb7511ac25745
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon May 2 09:46:28 2022 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon May 2 09:47:02 2022 -0500
improve description of devices option
---
tools/args.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/args.h b/tools/args.h
index c4d8fe7ff..57d2dfc52 100644
--- a/tools/args.h
+++ b/tools/args.h
@@ -245,8 +245,9 @@ arg(deviceidtype_ARG, '\0', "deviceidtype", string_VAL, 0, 0,
"then it will override the default type that lvm would use.\n")
arg(devices_ARG, '\0', "devices", pv_VAL, ARG_GROUPABLE, 0,
- "Devices that the command can use. This option can be repeated\n"
- "or accepts a comma separated list of devices. This overrides\n"
+ "Restricts the devices that are visible and accessible to the command.\n"
+ "Devices not listed will appear to be missing. This option can be\n"
+ "repeated, or accepts a comma separated list of devices. This overrides\n"
"the devices file.\n")
arg(devicesfile_ARG, '\0', "devicesfile", string_VAL, 0, 0,
1 year, 7 months