+16
−1
Loading
We need sgroup->queued to be ready immediately, since it is possible that a CONNECT could come in after the subsystem has been added but before it has been fully activated. So do the TAILQ_INIT on all sgroups when the poll group is first created. This allows us to safely queue CONNECT commands on the sgroup if it comes in while we are waiting to ACTIVATE. Note that previously, if a subsystem was removed from some index and replaced with another in that same index, any queued requests would have just been leaked since we didn't check the TAILQ before the TAILQ_INIT. So instead of just removing the original TAILQ_INIT, replace it with a check that will print an ERRLOG, free those queued requests, and assert. It should never be possible for this to happen but the checks will help debug it if it were ever to occur. Fixes issue #3316. Signed-off-by:Jim Harris <jim.harris@samsung.com> Change-Id: I401c4ef31feb9521c15daf5ebc7e2cb97da446a3 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22474 Reviewed-by:
Peng Lian <peng.lian@smartx.com> Community-CI: Mellanox Build Bot Reviewed-by:
Shuhei Matsumoto <smatsumoto@nvidia.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Tomasz Zawadzki <tomasz.zawadzki@intel.com>