+5
−0
+100
−0
Loading
Add an internal API nvmf_subsystem_set_ana_state() to change the ANA state of the subsystem listener whose trid matches. ANA optimized state, ANA non-optimized state, and ANA inaccessible state are supported. ANA change state is not used and ANA persistent loss state is not supported. After changing the ANA state of the subsystem listener, on each poll group, controllers, whose the subsystem listener match, send ANA change notice. Initiators query ANA log page anyway if they receive ANA change notification. False positive notification should be avoided but is acceptable. To avoid any concurrency conflict, simply compare ctrlr->listener and the passed listener. It may be better to execute nvmf_subsystem_set_ana_state() on the subsystem thread but currently the RPC thread adds and removes a listener to and from the subsystem, respectively, and the subsystem has been suspended while executing nvmf_subsystem_set_ana_state(). Hence we keep this as a future enhancement. Signed-off-by:Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: If1910b79dd33d904114e258ae2c5e868947cdc52 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4079 Community-CI: Broadcom CI Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Ben Walker <benjamin.walker@intel.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com> Reviewed-by:
Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>