Commit 012bd3b9 authored by Jiewei Ke's avatar Jiewei Ke Committed by Tomasz Zawadzki
Browse files

lib/nvmf: Notify ANA change when namespace change happens



When ANA is enabled, if a new namespace is hot-added to the subsystem on
the target side, the Linux host will expect to receive an ANA change
notification after the namespace change one. Without the knowledge of
the namespace's ANA state, the host will not register the associated
block device, so users cannot see the nvme device.

In this patch, ANA change is notified right after namespace change, so
host will get ANA log, update the namespace's ANA state and then
register the block device if it is alive.

Signed-off-by: default avatarJiewei Ke <jiewei@smartx.com>
Change-Id: I2faf61d344eb6de7efb2fde3cb1013cf0efd3c2e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5097


Community-CI: Broadcom CI
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent b7f7bbd1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1233,6 +1233,7 @@ poll_group_update_subsystem(struct spdk_nvmf_poll_group *group,
		TAILQ_FOREACH(ctrlr, &subsystem->ctrlrs, link) {
			if (ctrlr->admin_qpair->group == group) {
				nvmf_ctrlr_async_event_ns_notice(ctrlr);
				nvmf_ctrlr_async_event_ana_change_notice(ctrlr);
			}
		}
	}