Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1420670
| From | Bob Liu <bob.liu@oracle.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] drivers: virtio_blk: notify blk-core when hw-queue number changes |
| Date | 2016-06-13 12:00 +0200 |
| Message-ID | <rJwP0-4vK-29@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
A guest might be migrated to other hosts with different num_queues, the blk-core should aware of that else the reference of &vblk->vqs[qid] may be wrong. Signed-off-by: Bob Liu <bob.liu@oracle.com> --- drivers/block/virtio_blk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 42758b5..c169238 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -819,6 +819,9 @@ static int virtblk_restore(struct virtio_device *vdev) if (ret) return ret; + if (vblk->num_vqs != vblk->tag_set.nr_hw_queues) + blk_mq_update_nr_hw_queues(&vblk->tag_set, vblk->num_vqs); + virtio_device_ready(vdev); blk_mq_start_stopped_hw_queues(vblk->disk->queue, true); -- 2.7.4
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] drivers: virtio_blk: notify blk-core when hw-queue number changes Bob Liu <bob.liu@oracle.com> - 2016-06-13 12:00 +0200
csiph-web