search for: vdev_gone

Displaying 15 results from an estimated 15 matches for "vdev_gone".

2013 Nov 21
5
[PATCH v2 RFC 0/3] virtio: add new notify() callback to virtio_driver
Hi, here is an updated patch-set with changes as suggested by Michael Tsirkin. When an active virtio block device is hot-unplugged from a KVM guest, running affected guest user applications are not aware of any errors that occur due to the lost device. This patch-set adds code to avoid further request queueing when a lost block device is detected, resulting in appropriate error info. On System z
2013 Nov 21
5
[PATCH v2 RFC 0/3] virtio: add new notify() callback to virtio_driver
Hi, here is an updated patch-set with changes as suggested by Michael Tsirkin. When an active virtio block device is hot-unplugged from a KVM guest, running affected guest user applications are not aware of any errors that occur due to the lost device. This patch-set adds code to avoid further request queueing when a lost block device is detected, resulting in appropriate error info. On System z
2013 Nov 20
9
[PATCH RFC 0/3] virtio: add new notify() callback to virtio_driver
Hi, when an active virtio block device is hot-unplugged from a KVM guest, running affected guest user applications are not aware of any errors that occur due to the lost device. This patch-set adds code to avoid further request queueing when a lost block device is detected, resulting in appropriate error info. On System z there exists no handshake mechanism between host and guest when a device
2013 Nov 20
9
[PATCH RFC 0/3] virtio: add new notify() callback to virtio_driver
Hi, when an active virtio block device is hot-unplugged from a KVM guest, running affected guest user applications are not aware of any errors that occur due to the lost device. This patch-set adds code to avoid further request queueing when a lost block device is detected, resulting in appropriate error info. On System z there exists no handshake mechanism between host and guest when a device
2013 Nov 21
2
[PATCH v2 RFC 3/3] virtio_ccw: invoke virtio_driver's notify() on CIO_GONE notification
...int event) > { > - /* TODO: Check whether we need special handling here. */ > - return 0; > + int rc; > + struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev); > + > + switch (event) { > + case CIO_GONE: > + rc = notify_virtio_device(&vcdev->vdev, VDEV_GONE); > + break; > + default: > + rc = NOTIFY_DONE; > + break; > + } > + return rc; > } > > static struct ccw_device_id virtio_ids[] = { > -- > 1.8.3.1
2013 Nov 21
2
[PATCH v2 RFC 3/3] virtio_ccw: invoke virtio_driver's notify() on CIO_GONE notification
...int event) > { > - /* TODO: Check whether we need special handling here. */ > - return 0; > + int rc; > + struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev); > + > + switch (event) { > + case CIO_GONE: > + rc = notify_virtio_device(&vcdev->vdev, VDEV_GONE); > + break; > + default: > + rc = NOTIFY_DONE; > + break; > + } > + return rc; > } > > static struct ccw_device_id virtio_ids[] = { > -- > 1.8.3.1
2013 Nov 20
0
[PATCH RFC 1/3] virtio: add notify() callback to virtio_driver
.../linux/virtio.h b/include/linux/virtio.h index f15f6e7..da18e9a 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -110,6 +110,15 @@ int register_virtio_device(struct virtio_device *dev); void unregister_virtio_device(struct virtio_device *dev); /** + * notify event values + * @VDEV_GONE: device gone + */ +enum { + VDEV_GONE = 1, +}; +int notify_virtio_device(struct virtio_device *dev, int event); + +/** * virtio_driver - operations for a virtio I/O driver * @driver: underlying device driver (populate name and owner). * @id_table: the ids serviced by this driver. @@ -129,6 +...
2013 Nov 21
0
[PATCH v2 RFC 1/3] virtio: add notify() callback to virtio_driver
.../linux/virtio.h b/include/linux/virtio.h index f15f6e7..da18e9a 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -110,6 +110,15 @@ int register_virtio_device(struct virtio_device *dev); void unregister_virtio_device(struct virtio_device *dev); /** + * notify event values + * @VDEV_GONE: device gone + */ +enum { + VDEV_GONE = 1, +}; +int notify_virtio_device(struct virtio_device *dev, int event); + +/** * virtio_driver - operations for a virtio I/O driver * @driver: underlying device driver (populate name and owner). * @id_table: the ids serviced by this driver. @@ -129,6 +...
2013 Nov 21
2
[PATCH v2 RFC 3/3] virtio_ccw: invoke virtio_driver's notify() on CIO_GONE notification
...special handling here. */ > >>- return 0; > >>+ int rc; > >>+ struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev); > >>+ > >>+ switch (event) { > >>+ case CIO_GONE: > >>+ rc = notify_virtio_device(&vcdev->vdev, VDEV_GONE); > >>+ break; > >>+ default: > >>+ rc = NOTIFY_DONE; > >>+ break; > >>+ } > >>+ return rc; > >> } > >> > >> static struct ccw_device_id virtio_ids[] = { > >>-- > >>1.8.3.1 > >
2013 Nov 21
2
[PATCH v2 RFC 3/3] virtio_ccw: invoke virtio_driver's notify() on CIO_GONE notification
...special handling here. */ > >>- return 0; > >>+ int rc; > >>+ struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev); > >>+ > >>+ switch (event) { > >>+ case CIO_GONE: > >>+ rc = notify_virtio_device(&vcdev->vdev, VDEV_GONE); > >>+ break; > >>+ default: > >>+ rc = NOTIFY_DONE; > >>+ break; > >>+ } > >>+ return rc; > >> } > >> > >> static struct ccw_device_id virtio_ids[] = { > >>-- > >>1.8.3.1 > >
2013 Nov 20
0
[PATCH RFC 2/3] virtio_blk: add virtblk_notify() as virtio_driver's notify() callback
...io_blk.c +++ b/drivers/block/virtio_blk.c @@ -901,6 +901,19 @@ static void virtblk_remove(struct virtio_device *vdev) ida_simple_remove(&vd_index_ida, index); } +static int virtblk_notify(struct virtio_device *vdev, int event) +{ + struct virtio_blk *vblk = vdev->priv; + + if (event == VDEV_GONE) { + queue_flag_set_unlocked(QUEUE_FLAG_DYING, vblk->disk->queue); + queue_flag_set_unlocked(QUEUE_FLAG_NOMERGES, vblk->disk->queue); + queue_flag_set_unlocked(QUEUE_FLAG_NOXMERGES, + vblk->disk->queue); + } + return NOTIFY_DONE; +} + #ifdef CONFIG_PM static int virtblk_f...
2013 Nov 21
0
[PATCH v2 RFC 2/3] virtio_blk: add virtblk_notify() as virtio_driver's notify() callback
...fine PART_BITS 4 @@ -901,6 +902,21 @@ static void virtblk_remove(struct virtio_device *vdev) ida_simple_remove(&vd_index_ida, index); } +static int virtblk_notify(struct virtio_device *vdev, int event) +{ + struct virtio_blk *vblk = vdev->priv; + unsigned long flags; + + if (event == VDEV_GONE) { + spin_lock_irqsave(vblk->disk->queue->queue_lock, flags); + queue_flag_set(QUEUE_FLAG_DYING, vblk->disk->queue); + queue_flag_set(QUEUE_FLAG_NOMERGES, vblk->disk->queue); + queue_flag_set(QUEUE_FLAG_NOXMERGES, vblk->disk->queue); + spin_unlock_irqrestore(vblk-&gt...
2013 Nov 21
0
[PATCH v2 RFC 3/3] virtio_ccw: invoke virtio_driver's notify() on CIO_GONE notification
...rtio_ccw_cio_notify(struct ccw_device *cdev, int event) { - /* TODO: Check whether we need special handling here. */ - return 0; + int rc; + struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev); + + switch (event) { + case CIO_GONE: + rc = notify_virtio_device(&vcdev->vdev, VDEV_GONE); + break; + default: + rc = NOTIFY_DONE; + break; + } + return rc; } static struct ccw_device_id virtio_ids[] = { -- 1.8.3.1
2013 Nov 21
0
[PATCH v2 RFC 3/3] virtio_ccw: invoke virtio_driver's notify() on CIO_GONE notification
...TODO: Check whether we need special handling here. */ >> - return 0; >> + int rc; >> + struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev); >> + >> + switch (event) { >> + case CIO_GONE: >> + rc = notify_virtio_device(&vcdev->vdev, VDEV_GONE); >> + break; >> + default: >> + rc = NOTIFY_DONE; >> + break; >> + } >> + return rc; >> } >> >> static struct ccw_device_id virtio_ids[] = { >> -- >> 1.8.3.1 >
2013 Nov 27
0
[PATCH v2 RFC 3/3] virtio_ccw: invoke virtio_driver's notify() on CIO_GONE notification
...gt;>>> - return 0; >>>> + int rc; >>>> + struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev); >>>> + >>>> + switch (event) { >>>> + case CIO_GONE: >>>> + rc = notify_virtio_device(&vcdev->vdev, VDEV_GONE); >>>> + break; >>>> + default: >>>> + rc = NOTIFY_DONE; >>>> + break; >>>> + } >>>> + return rc; >>>> } >>>> >>>> static struct ccw_device_id virtio_ids[] = { >>>> -- >...