mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
virtio_blk: quiesce/unquiesce live IO when entering PM states
Without it its not guaranteed that no .queue_rq is inflight. Reviewed-by: Ming Lei <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Cc: [email protected] Cc: Jason Wang <[email protected]> Signed-off-by: Sagi Grimberg <[email protected]>
This commit is contained in:
parent
436c15ab65
commit
9b3e990584
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue