diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2017-06-05 14:39:02 +0200 |
---|---|---|
committer | Fam Zheng <famz@redhat.com> | 2017-06-16 07:55:00 +0800 |
commit | 3783fa3dd3d0104e9780bde073f66f1e37f1ce1c (patch) | |
tree | eee263b38e7576626762e5498b67858e7297e787 /block.c | |
parent | 47fec59941a7182380bc8dde3faf17cfb05b770f (diff) | |
download | qemu-3783fa3dd3d0104e9780bde073f66f1e37f1ce1c.zip qemu-3783fa3dd3d0104e9780bde073f66f1e37f1ce1c.tar.gz qemu-3783fa3dd3d0104e9780bde073f66f1e37f1ce1c.tar.bz2 |
block: protect tracked_requests and flush_queue with reqs_lock
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20170605123908.18777-14-pbonzini@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r-- | block.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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(); |