numam-spdk/lib/bdev
Dariusz Stojaczyk b326e51219 bdev/virtio_blk: defer bdev destruct completion
Even after the bdev is removed, the underlying virtio
device may be still alive for some time. The user may
then try to recreate the virtio bdev and could technically
initialize a second simultaneous connection to a vhost
target. It does not cause any technical problems, but the
target may reject such connection if it reached a connection
cap or doesn't support more than one connection per target
(like SPDK vhost does as of today).

Since the fix is straightforward, here it is.

Note:
Virtio SCSI is already safe, because it uses a separate
completion callback to indicate virtio device destruction.

Change-Id: I2989780ef9b13c19d0432224ff4602a14be48315
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/420576
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-07-31 01:13:07 +00:00
..
aio bdev/aio: unregister io_device when aio bdev is deleted 2018-07-26 04:52:41 +00:00
error bdev: split examine into two parts 2018-07-06 21:12:53 +00:00
gpt bdev: split examine into two parts 2018-07-06 21:12:53 +00:00
iscsi bdev/iscsi: unregister io_device on bdev destruction 2018-07-27 18:58:53 +00:00
lvol lvol: remove destruct_req from lvol store 2018-07-26 21:55:36 +00:00
malloc Clean up some incorrect Copyright statements 2018-07-30 16:29:38 +00:00
null bdev/null: free global resources on module finish 2018-07-30 15:38:07 +00:00
nvme Clean up some incorrect Copyright statements 2018-07-30 16:29:38 +00:00
passthru bdev: split examine into two parts 2018-07-06 21:12:53 +00:00
pmem bdev: add delete_pmem_bdev call 2018-07-02 22:53:18 +00:00
raid bdev/raid: Factor out add raid bdev config operation 2018-07-30 15:44:27 +00:00
rbd bdev/rbd: change the poller to timer poller 2018-07-03 16:40:18 +00:00
rpc bdev: add extra parameters to iostat rpc. 2018-07-12 23:27:27 +00:00
split bdev: split examine into two parts 2018-07-06 21:12:53 +00:00
virtio bdev/virtio_blk: defer bdev destruct completion 2018-07-31 01:13:07 +00:00
bdev.c Clean up some incorrect Copyright statements 2018-07-30 16:29:38 +00:00
Makefile bdev: add raid bdev module 2018-07-16 20:50:40 +00:00
part.c bdev: remove public usage of bdev_part_base.ref 2018-07-05 19:12:53 +00:00
scsi_nvme.c bdev: move error union to internal spdk_bdev_io struct 2018-06-26 20:04:07 +00:00
vtune.c bdev: disable new GCC 7 warning in VTune code 2018-03-19 15:58:15 -04:00