Commit ba1d0d72 authored by Changpeng Liu's avatar Changpeng Liu Committed by Tomasz Zawadzki
Browse files

nvmf: set sgroup for spdk_nvmf_request_exec_fabrics() API



When using spdk_nvmf_request_exec_fabrics() to connect one IO
queue, the qpair->ctrlr is null before this function, and the
qpair->ctrlr will be set to associate controller after the
connect, so it will check the sgroup->io_outstanding count,
then we can hit the assertion.

Change-Id: I747cbfd0541cd12286dab549cd02245aac54f2db
Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2062


Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
parent 7a9c2d2a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2981,6 +2981,8 @@ spdk_nvmf_request_exec_fabrics(struct spdk_nvmf_request *req)

	if (qpair->ctrlr) {
		sgroup = &qpair->group->sgroups[qpair->ctrlr->subsys->id];
	} else {
		sgroup = nvmf_subsystem_pg_from_connect_cmd(req);
	}

	_nvmf_request_exec(req, sgroup);