nvmf: save hostnqn to controller data structure
When creating a new controller in the NVMe-oF target, hostnqn is a must parameter, so we save the hostnqn to controller data structure, and it can be used to verify the access right of Discovery service. Change-Id: I86a6f50d3209d5bbb8ac85508288173d826ea216 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462439 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: yidong0635 <dongx.yi@intel.com>
This commit is contained in:
parent
f0b7a6e7d1
commit
234eb48bf6
@ -324,6 +324,7 @@ spdk_nvmf_ctrlr_create(struct spdk_nvmf_subsystem *subsystem,
|
||||
1;
|
||||
|
||||
spdk_uuid_copy(&ctrlr->hostid, (struct spdk_uuid *)connect_data->hostid);
|
||||
memcpy(ctrlr->hostnqn, connect_data->hostnqn, sizeof(ctrlr->hostnqn));
|
||||
|
||||
ctrlr->vcprop.cap.raw = 0;
|
||||
ctrlr->vcprop.cap.bits.cqr = 1; /* NVMe-oF specification required */
|
||||
|
@ -286,6 +286,7 @@ struct spdk_nvmf_reservation_log {
|
||||
*/
|
||||
struct spdk_nvmf_ctrlr {
|
||||
uint16_t cntlid;
|
||||
char hostnqn[SPDK_NVMF_NQN_MAX_LEN + 1];
|
||||
struct spdk_nvmf_subsystem *subsys;
|
||||
|
||||
struct {
|
||||
|
Loading…
Reference in New Issue
Block a user