Spdk/lib/bdev/virtio
Dariusz Stojaczyk 5eb213cec7 bdev/virtio/scsi: don't ever allow unregistering the same bdev twice
Consider the following scenario:
 * user deletes a Virtio-SCSI bdev (spdk_bdev_unregister)
 * user deletes entire Virtio-SCSI controller (virtio_scsi_dev_remove)

If there were any descriptors open with asynchronous
remove callback specified, the first bdev unregister
won't delete the bdev and won't notify the Virtio-SCSI
controller in any way. Subsequent Virtio-SCSI controller
deletion might result in unregistering the same bdev
again. This patch makes Virtio-SCSI controller open a
dummy descriptor on each of its bdevs, so that it's
notified of any started bdev_unregister

Change-Id: I9a8c841d08393ef1940c4cebc9dfcb58e9b0ac4a
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/394169
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-16 19:13:32 -05:00
..
bdev_virtio_rpc.c util: add spdk_strerror() wrapper with TLS support 2018-01-04 15:00:09 -05:00
bdev_virtio_scsi.c bdev/virtio/scsi: don't ever allow unregistering the same bdev twice 2018-01-16 19:13:32 -05:00
bdev_virtio.h bdev/virtio: cleanup public API 2017-12-05 23:06:38 -05:00
Makefile build: remove $(ENV_CFLAGS) where not necessary 2018-01-03 12:05:59 -05:00