core-admin/qubes
Marek Marczykowski-Górecki b65fdf9700
storage: convert lvm driver to async version
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
2018-10-23 16:53:35 +02:00
..
api storage: allow import_data and import_data_end be coroutines 2018-10-23 16:53:35 +02:00
ext ext/services: mechanism for advertising supported services 2018-10-23 16:47:39 +02:00
qmemman qmemman: fix early crash 2018-01-18 17:36:37 +01:00
storage storage: convert lvm driver to async version 2018-10-23 16:53:35 +02:00
tests storage: convert lvm driver to async version 2018-10-23 16:53:35 +02:00
tools app: uncouple pool setup from loading initial configuration 2018-09-11 23:50:25 +00:00
vm qubesvm: improve error message about same-pool requirement 2018-10-18 00:03:05 +02:00
__init__.py Fix issues found by pylint 2.0 2018-07-15 23:51:15 +02:00
app.py Add default_qrexec_timeout to qubes-prefs 2018-09-16 18:42:48 +00:00
backup.py Fix issues found by pylint 2.0 2018-07-15 23:51:15 +02:00
config.py app: create /var/lib/qubes as file-reflink if supported 2018-09-11 23:50:26 +00:00
core2migration.py Make pylint happy 2017-12-21 18:19:10 +01:00
devices.py Update documentation for device-attach event 2018-09-19 05:44:02 +02:00
dochelpers.py Fix issues found by pylint 2.0 2018-07-15 23:51:15 +02:00
events.py Fix issues found by pylint 2.0 2018-07-15 23:51:15 +02:00
exc.py Change license to LGPL v2.1+ 2017-10-12 00:11:50 +02:00
firewall.py Fix issues found by pylint 2.0 2018-07-15 23:51:15 +02:00
log.py Change license to LGPL v2.1+ 2017-10-12 00:11:50 +02:00
rngdoc.py Fix issues found by pylint 2.0 2018-07-15 23:51:15 +02:00
tarwriter.py Change license to LGPL v2.1+ 2017-10-12 00:11:50 +02:00
utils.py Fix issues found by pylint 2.0 2018-07-15 23:51:15 +02:00