block: count bdrv_co_rw_vmstate() requests
commitdc88a467ec7214c3086094033daf2aba554337b1
authorStefan Hajnoczi <stefanha@redhat.com>
Mon, 22 May 2017 13:57:01 +0000 (22 14:57 +0100)
committerKevin Wolf <kwolf@redhat.com>
Mon, 26 Jun 2017 12:51:13 +0000 (26 14:51 +0200)
treefdf50888939286f3c8b67d851ff2a41f104ed839
parent24575bfa8c05041db097d203c5506814db0fa110
block: count bdrv_co_rw_vmstate() requests

Call bdrv_inc/dec_in_flight() for vmstate reads/writes.  This seems
unnecessary at first glance because vmstate reads/writes are done
synchronously while the guest is stopped.  But we need the bdrv_wakeup()
in bdrv_dec_in_flight() so the main loop sees request completion.
Besides, it's cleaner to count vmstate reads/writes like ordinary
read/write requests.

The bdrv_wakeup() partially fixes a 'savevm' hang with -object iothread.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/io.c