mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
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.)
This commit is contained in:
parent
f88f7c0fdc
commit
7474440d3b
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user