]> git.proxmox.com Git - mirror_qemu.git/blobdiff - blockjob.c
Merge remote-tracking branch 'remotes/rth/tags/pull-axp-20190825' into staging
[mirror_qemu.git] / blockjob.c
index 20b7f557da3e491927b99b113b730e8e70da2ed1..6e32d1a0c0bb79b4413a86ca723d3474b2508abe 100644 (file)
@@ -33,6 +33,7 @@
 #include "qapi/qapi-events-block-core.h"
 #include "qapi/qmp/qerror.h"
 #include "qemu/coroutine.h"
+#include "qemu/main-loop.h"
 #include "qemu/timer.h"
 
 /*
@@ -445,6 +446,9 @@ void *block_job_create(const char *job_id, const BlockJobDriver *driver,
 
     bdrv_op_unblock(bs, BLOCK_OP_TYPE_DATAPLANE, job->blocker);
 
+    /* Disable request queuing in the BlockBackend to avoid deadlocks on drain:
+     * The job reports that it's busy until it reaches a pause point. */
+    blk_set_disable_request_queuing(blk, true);
     blk_set_allow_aio_context_change(blk, true);
 
     /* Only set speed when necessary to avoid NotSupported error */