We make a few changes here to enable this: 1) Set IORING_SETUP_SQPOLL on the control ring. Otherwise when UBLK_START_DEV is submitted it will be processed in the context of the system call itself, resulting the kernel block layer submitting reads to the new device which blocks the thread - meaning the system call may never return. 2) Save the cmd_op in each sqe, along with the spdk_ublk_dev pointer. 3) Add a poller to poll the ctrl ring. The poller can get the ublk and cmd_op from the cqe to know which ctrl operation completed and take next steps as necessary. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Ia0e51a4ff74781c85967c54969fbfc67a0d3f115 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16404 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com> Reviewed-by: Michal Berger <michal.berger@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> |
||
---|---|---|
.. | ||
Makefile | ||
spdk_ublk.map | ||
ublk_internal.h | ||
ublk_rpc.c | ||
ublk.c |