nvmf: check for null admin_qpair when updating subsystem pg
It is possible for a controller to get added to the subsystem before its admin_qpair has been assigned. We need to account for that when traversing the subsystem's ctrlr list when determining ns and ana_changes that need to be reported for the ctrlr. Found while doing stress testing with connects and subsystem ns add/remove. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Ie54dc6ac202faeaeace054e6599f2dea2f30211e Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8570 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
e8e2b469ec
commit
65ef1f32a6
@ -1315,6 +1315,12 @@ poll_group_update_subsystem(struct spdk_nvmf_poll_group *group,
|
||||
|
||||
if (ns_changed) {
|
||||
TAILQ_FOREACH(ctrlr, &subsystem->ctrlrs, link) {
|
||||
/* It is possible that a ctrlr was added but the admin_qpair hasn't been
|
||||
* assigned yet.
|
||||
*/
|
||||
if (!ctrlr->admin_qpair) {
|
||||
continue;
|
||||
}
|
||||
if (ctrlr->admin_qpair->group == group) {
|
||||
nvmf_ctrlr_async_event_ns_notice(ctrlr);
|
||||
nvmf_ctrlr_async_event_ana_change_notice(ctrlr);
|
||||
|
Loading…
Reference in New Issue
Block a user