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: Jiewei Ke <jiewei@smartx.com> Change-Id: I2faf61d344eb6de7efb2fde3cb1013cf0efd3c2e Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5097 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
b7f7bbd16b
commit
012bd3b942
@ -1233,6 +1233,7 @@ poll_group_update_subsystem(struct spdk_nvmf_poll_group *group,
|
|||||||
TAILQ_FOREACH(ctrlr, &subsystem->ctrlrs, link) {
|
TAILQ_FOREACH(ctrlr, &subsystem->ctrlrs, link) {
|
||||||
if (ctrlr->admin_qpair->group == group) {
|
if (ctrlr->admin_qpair->group == group) {
|
||||||
nvmf_ctrlr_async_event_ns_notice(ctrlr);
|
nvmf_ctrlr_async_event_ns_notice(ctrlr);
|
||||||
|
nvmf_ctrlr_async_event_ana_change_notice(ctrlr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user