From 3783fa3dd3d0104e9780bde073f66f1e37f1ce1c Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 5 Jun 2017 14:39:02 +0200 Subject: block: protect tracked_requests and flush_queue with reqs_lock Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Message-Id: <20170605123908.18777-14-pbonzini@redhat.com> Signed-off-by: Fam Zheng --- block.c | 1 + 1 file changed, 1 insertion(+) (limited to 'block.c') diff --git a/block.c b/block.c index 361005cba9..a5cbd4540f 100644 --- a/block.c +++ b/block.c @@ -320,6 +320,7 @@ BlockDriverState *bdrv_new(void) QLIST_INIT(&bs->op_blockers[i]); } notifier_with_return_list_init(&bs->before_write_notifiers); + qemu_co_mutex_init(&bs->reqs_lock); bs->refcnt = 1; bs->aio_context = qemu_get_aio_context(); -- cgit v1.2.3