virtio_ring: let virtqueue_{kick()/notify()} return a bool
virtqueue_{kick()/notify()} should exploit the new host notification API. If the notify call returned with a negative value the host kick failed (e.g. a kick triggered after a device was hot-unplugged). In this case the virtqueue is set to 'broken' and false is returned, otherwise true. Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:

committed by
Rusty Russell

parent
46f9c2b925
commit
5b1bf7cb67
@@ -51,11 +51,11 @@ int virtqueue_add_sgs(struct virtqueue *vq,
|
||||
void *data,
|
||||
gfp_t gfp);
|
||||
|
||||
void virtqueue_kick(struct virtqueue *vq);
|
||||
bool virtqueue_kick(struct virtqueue *vq);
|
||||
|
||||
bool virtqueue_kick_prepare(struct virtqueue *vq);
|
||||
|
||||
void virtqueue_notify(struct virtqueue *vq);
|
||||
bool virtqueue_notify(struct virtqueue *vq);
|
||||
|
||||
void *virtqueue_get_buf(struct virtqueue *vq, unsigned int *len);
|
||||
|
||||
|
Reference in New Issue
Block a user