]> git.baikalelectronics.ru Git - kernel.git/commit
virtio_blk: enable VQs early on restore
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 14 Oct 2014 23:52:32 +0000 (10:22 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 14 Oct 2014 23:55:07 +0000 (10:25 +1030)
commit43eca9cce624aa6c74fbaadc0d79549b413a4d39
tree346383120729b4e6a49271289d617e0c8f487d48
parentfa1438415dbc669f69b96f05d3504fda57f90f8f
virtio_blk: enable VQs early on restore

virtio spec requires drivers to set DRIVER_OK before using VQs.
This is set automatically after restore returns, virtio block violated
this rule on restore by restarting queues, which might in theory
cause the VQ to be used directly within restore.

To fix, call virtio_device_ready before using starting queues.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/block/virtio_blk.c