virtio: blk: Add freeze, restore handlers to support S4
authorAmit Shah <amit.shah@redhat.com>
Thu, 22 Dec 2011 11:28:30 +0000 (16:58 +0530)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 12 Jan 2012 05:14:45 +0000 (15:44 +1030)
commitf8fb5bc23a50a5398aa31a4e8c6dbbef53d2dec6
treea8f466179ba3afdce265607703ed280231e04e3c
parent6abd6e5a4404056e28be04958a57d0286883161a
virtio: blk: Add freeze, restore handlers to support S4

Delete the vq and flush any pending requests from the block queue on the
freeze callback to prepare for hibernation.

Re-create the vq in the restore callback to resume normal function.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/block/virtio_blk.c