Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b3e9905 authored by Sagi Grimberg's avatar Sagi Grimberg
Browse files

virtio_blk: quiesce/unquiesce live IO when entering PM states



Without it its not guaranteed that no .queue_rq is inflight.

Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Cc: virtio-dev@lists.oasis-open.org
Cc: Jason Wang <jasowang@redhat.com>
Signed-off-by: default avatarSagi Grimberg <sagi@grimberg.me>
parent 436c15ab
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -840,7 +840,7 @@ static int virtblk_freeze(struct virtio_device *vdev)
	/* Make sure no work handler is accessing the device. */
	flush_work(&vblk->config_work);

	blk_mq_stop_hw_queues(vblk->disk->queue);
	blk_mq_quiesce_queue(vblk->disk->queue);

	vdev->config->del_vqs(vdev);
	return 0;
@@ -857,7 +857,7 @@ static int virtblk_restore(struct virtio_device *vdev)

	virtio_device_ready(vdev);

	blk_mq_start_stopped_hw_queues(vblk->disk->queue, true);
	blk_mq_unquiesce_queue(vblk->disk->queue);
	return 0;
}
#endif