b65fdf9700
LVM operations can take significant amount of time. This is especially visible when stopping a VM (`vm.storage.stop()`) - in that time the whole qubesd freeze for about 2 seconds. Fix this by making all the ThinVolume methods a coroutines (where supported). Each public coroutine is also wrapped with locking on volume._lock to avoid concurrency-related problems. This all also require changing internal helper functions to coroutines. There are two functions that still needs to be called from non-coroutine call sites: - init_cache/reset_cache (initial cache fill, ThinPool.setup()) - qubes_lvm (ThinVolume.export() So, those two functions need to live in two variants. Extract its common code to separate functions to reduce code duplications. Fixes QubesOS/qubes-issues#4283 |
||
---|---|---|
.. | ||
api | ||
ext | ||
qmemman | ||
storage | ||
tests | ||
tools | ||
vm | ||
__init__.py | ||
app.py | ||
backup.py | ||
config.py | ||
core2migration.py | ||
devices.py | ||
dochelpers.py | ||
events.py | ||
exc.py | ||
firewall.py | ||
log.py | ||
rngdoc.py | ||
tarwriter.py | ||
utils.py |