OSDN Git Service

virtio_ccw: introduce device_lost in virtio_ccw_device
authorHeinz Graalfs <graalfs@linux.vnet.ibm.com>
Mon, 28 Apr 2014 01:54:05 +0000 (11:24 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 28 Apr 2014 02:04:13 +0000 (11:34 +0930)
commite75279c4fb853f42004cbabb6dbf6b23188dc163
tree623a5644aa98b17d49328acb8e260d39f7f43ab2
parente2dcdfe95c0bd67e37db6057edd9c4ee1f1c7b17
virtio_ccw: introduce device_lost in virtio_ccw_device

When a device is lost, the common I/O layer calls the notification
handler with CIO_GONE: In that event, flag device_lost as true.

In case the device had been flagged as lost when the remove/offline callbacks
are called, call the new virtio_break_device() function prior to invoking
device_unregister(). This avoids hangs of I/O triggered via the device
unregistration callbacks.

Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/s390/kvm/virtio_ccw.c