Loading
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>