Spdk/lib/nbd
Daniel Verkamp 6bf92c33e5 nbd: move initialization out of kernel thread
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>
2017-12-11 11:11:25 -05:00
..
Makefile nbd: add nbd stop rpc 2017-12-07 16:23:19 -05:00
nbd_internal.h nbd: add nbd stop rpc 2017-12-07 16:23:19 -05:00
nbd_rpc.c nbd: add get_nbd_disks RPC 2017-12-08 12:32:05 -05:00
nbd.c nbd: move initialization out of kernel thread 2017-12-11 11:11:25 -05:00