+34
−19
Loading
The nbd device really becomes ready for use after nbd_start_kernel() sends the NBD_DO_IT ioctl. That thread blocks in the ioctl, but we can at least defer the callback until just before calling the ioctl(). Currently we invoked the callback even before the pthread_create(), which can lead to the RPC getting completed and the nbd disk trying to get used before it's ready. Signed-off-by:Jim Harris <jim.harris@samsung.com> Change-Id: I375cb7fe2632ee06b553c9a4dc0d50903e28f55c Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24817 Community-CI: Mellanox Build Bot Reviewed-by:
Shuhei Matsumoto <smatsumoto@nvidia.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Konrad Sztyber <konrad.sztyber@intel.com>