Spdk/lib/bdev
Dariusz Stojaczyk 7755bed389 virtio: split device initialization to separate functions
Previously we used to manually set
vdev->max_queues and called virtio_dev_restart
to go through all virtio init states, negotiate
features and allocate virtqueues. This is,
however, insufficient for Virtio-Blk, where we
e.g. need to check against negotiated multiqueue
flag before deciding how many queues we can use
(reading num_queues field from device config is
forbidden unless VIRTIO_BLK_F_MQ is negotiated).

This patch refactors queue-num related code
and also removes various restrictions. If device
supports less queues than requested, a warning
will be printed during initialization, but
the device will now continue to init normally.

The queue-num negotiation for virtio-user should
be eventually moved to upper layers, but that is
not necessary for now.

Change-Id: I418b56fa62c17b547243422ea077f0d76555bd13
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/393087
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-12-27 15:13:03 -05:00
..
aio bdev_aio: Remove use of perror() for open/close failure 2017-12-15 15:22:53 -05:00
error bdev: unregister all bdevs in spdk_bdev_finish() 2017-12-21 13:29:29 -05:00
gpt bdev: unregister all bdevs in spdk_bdev_finish() 2017-12-21 13:29:29 -05:00
lvol lvol: don't return lvs_bdev if it's being destroyed 2017-12-21 13:30:44 -05:00
malloc bdev: unregister all bdevs in spdk_bdev_finish() 2017-12-21 13:29:29 -05:00
null bdev/null: complete requests asynchronously 2017-12-21 10:42:47 -05:00
nvme bdev: unregister all bdevs in spdk_bdev_finish() 2017-12-21 13:29:29 -05:00
pmem bdev: unregister all bdevs in spdk_bdev_finish() 2017-12-21 13:29:29 -05:00
rbd bdev: unregister all bdevs in spdk_bdev_finish() 2017-12-21 13:29:29 -05:00
rpc bdev: add callback to spdk bdev unregister and bdev destruct 2017-10-26 17:23:58 -04:00
split bdev: unregister all bdevs in spdk_bdev_finish() 2017-12-21 13:29:29 -05:00
virtio virtio: split device initialization to separate functions 2017-12-27 15:13:03 -05:00
bdev.c bdev: add per-thread spdk_bdev_io cache 2017-12-21 16:22:23 -05:00
Makefile bdev_virtio: added --without-virtio configure flag 2017-10-19 19:06:12 -04:00
scsi_nvme.c nvme_spec: remove SGL Sub Type Invalid status code 2017-09-22 17:11:53 -04:00
vtune.c bdev: #include VTune file to control warnings 2017-06-08 12:44:25 -04:00