summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2019-11-19 10:27:02 -0600
committerDavid Teigland <teigland@redhat.com>2019-11-19 10:56:12 -0600
commit7474440d3b540d20eb4f997efeb31b881cc6ac8e (patch)
treeddc021004a7e0433bdf4a643a9fb9dfbb1b517e2
parentf88f7c0fdcdfbefa37df6adb36a637526bd7e93b (diff)
downloadlvm2-7474440d3b540d20eb4f997efeb31b881cc6ac8e.tar.gz
lvs: disable scanning optimization
The scanning optimization can produce warnings from 'lvs' when run concurrently with commands modifying LVs, so disable the optimization until it can be improved. Without the scanning optimization, lvs will always read all PVs twice: 1. read metadata from all PVs, saving it in memory 2. for each VG 3. lock VG 4. reread metadata from all PVs in VG, replacing metadata saved from step 1 5. run command on VG 6. unlock VG The optimization would usually cause step 4 to be skipped, and PVs would be read only once. Running the command in step 5 using metadata that was not read under the VG lock is usually fine, except for the fact that lvs attempts to validate the metadata by comparing it to current dm state. If other commands are modifying dm state while lvs is running, lvs may see differences between metadata from step 1 and dm state checked during step 5, and print warnings. (A better fix may be to detect the concurrent change and fall back to rereading metadata in step 4 only when needed.)
-rw-r--r--tools/commands.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/commands.h b/tools/commands.h
index c1670ae66..77cf1fac9 100644
--- a/tools/commands.h
+++ b/tools/commands.h
@@ -99,7 +99,7 @@ xx(lvresize,
xx(lvs,
"Display information about logical volumes",
- PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | LOCKD_VG_SH | CAN_USE_ONE_SCAN | ALLOW_HINTS)
+ PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | LOCKD_VG_SH | ALLOW_HINTS)
xx(lvscan,
"List all logical volumes in all volume groups",