+5
−0
Loading
There was a bug that bdev_channel_poll_qos() called spdk_for_each_channel() after spdk_io_device_unregister() is called for a bdev. This occurred in the following sequence. - There was a bdev and a channel for it. - QoS was enabled and started. - spdk_bdev_unregister() was called. However, there was a open descriptor. Hence, remove notification was sent and unregistration was pending. - Receiving a event notification, spdk_put_io_channel() and spdk_bdev_close() were called. In spdk_bdev_close(), the existing QoS was unbound and a message was sent to it, and then the pending spdk_io_device_unregister() was finally executed. - If bdev_channel_poll_qos() was executed before the message was processed, bdev_channel_poll_qos() called spdk_bdev_for_each_channel() and hit assert(). The fix is in this case bdev_channel_poll_qos() returned immediately because QoS is not enabled. bdev_qos_destroy() created a new disabled QoS and swapped it with the existing QoS. Fixes issue #3367 Signed-off-by:Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23219 (master) (cherry picked from commit 95df4e0d) Change-Id: I8d4525c9206f7f395ad4ba4a706fed59addc3fe8 Signed-off-by:
Marek Chomnicki <marek.chomnicki@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23277 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-by:
Jim Harris <jim.harris@samsung.com>