numam-spdk/lib/bdev/virtio
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
..
bdev_virtio_blk.c bdev/virtio_blk: defer bdev destruct completion 2018-07-31 01:13:07 +00:00
bdev_virtio_rpc.c bdev: add remove_virtio_bdev call 2018-07-26 22:07:50 +00:00
bdev_virtio_scsi.c bdev: add remove_virtio_bdev call 2018-07-26 22:07:50 +00:00
bdev_virtio.h bdev: add remove_virtio_bdev call 2018-07-26 22:07:50 +00:00
Makefile bdev/virtio: added vhost-blk initiator 2018-03-02 13:41:38 -05:00