+21
−23
Loading
Send all of the initialization ioctls from the SPDK thread running spdk_nbd_start(), rather than in the pthread spawned to handle the blocking NBD_DO_IT ioctl. This allows the parameter to the pthread to be a single value (dev_fd), rather than a pointer to the whole spdk_nbd_disk, which fixes a race on shutdown where the main thread is freeing the spdk_nbd_disk while the kernel thread is accessing nbd->dev_fd to send the cleanup ioctls. Change-Id: Ibe5ca4abac97ac567b294da1f8a92f12eece45b8 Signed-off-by:Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/391021 Reviewed-by:
Jim Harris <james.r.harris@intel.com> Tested-by:
SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by:
Ben Walker <benjamin.walker@intel.com>