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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2062
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Changpeng Liu 2020-04-28 11:07:17 -04:00 committed by Tomasz Zawadzki
parent 7a9c2d2aef
commit ba1d0d7220

View File

@ -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);