OSDN Git Service

vhost: do not assert() on vhost_ops failure
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 26 Jul 2016 21:15:05 +0000 (01:15 +0400)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 28 Jul 2016 21:33:47 +0000 (00:33 +0300)
commit162bba7fa84182e5dc07f94db9744fc80109592a
tree92cf2a04fe3daea260aeeb4c8d62658be5c35e92
parenta06db3ec720a570089b16125d3bca470e7bb34b8
vhost: do not assert() on vhost_ops failure

Calling a vhost operation may fail, for example with disconnected
vhost-user backend, but qemu shouldn't abort in this case.

Log an error instead, except on error and cleanup code paths where it
can be mostly ignored.

Let's use a VHOST_OPS_DEBUG macro to easily disable those messages once
disconnected backend stabilizes.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/vhost.c