summaryrefslogtreecommitdiff
path: root/lib/locking
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2021-12-15 11:45:22 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2021-12-20 16:13:28 +0100
commit04fbffb116eaf5fb1b10785df92966d0083b270f (patch)
treea413bc19386ae583d649d6559120c44a777dbefa /lib/locking
parent0d67bc96fd15b9f3110bdc824749805c8392b04a (diff)
downloadlvm2-04fbffb116eaf5fb1b10785df92966d0083b270f.tar.gz
label: cache dm device list
Since we check for present DM devices - cache result for futher use of checking presence of such device. lvm2 uses cache result for label scan, but also when it tries to activate or deactivate LV - however only simple target 'striped' is reasonably supported. Use disable_dm_devs to be able to control when lv_info() get cache or uncached results. TODO: support more type, however this is getting very complicated.
Diffstat (limited to 'lib/locking')
-rw-r--r--lib/locking/locking.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/locking/locking.c b/lib/locking/locking.c
index c69f08c09..a8153a693 100644
--- a/lib/locking/locking.c
+++ b/lib/locking/locking.c
@@ -330,6 +330,7 @@ int vg_write_lock_held(void)
int sync_local_dev_names(struct cmd_context* cmd)
{
+ dm_device_list_destroy(&cmd->cache_dm_devs);
memlock_unlock(cmd);
fs_unlock();
return 1;