nvmf: add reservation information to each subsystem's poll group
Change-Id: Idcbc3053daf756c818ae3715b4ba0cbd91ed3d44 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446212 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
2099401e94
commit
d11aa87320
@ -947,6 +947,14 @@ poll_group_update_subsystem(struct spdk_nvmf_poll_group *group,
|
|||||||
} else {
|
} else {
|
||||||
/* A namespace was present before and didn't change. */
|
/* A namespace was present before and didn't change. */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ns == NULL) {
|
||||||
|
memset(&sgroup->ns_info[i], 0, sizeof(struct spdk_nvmf_subsystem_pg_ns_info));
|
||||||
|
} else if (ns->rtype && ns->holder) {
|
||||||
|
sgroup->ns_info[i].crkey = ns->crkey;
|
||||||
|
sgroup->ns_info[i].rtype = ns->rtype;
|
||||||
|
sgroup->ns_info[i].hostid = ns->holder->hostid;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -114,6 +114,12 @@ struct spdk_nvmf_transport_poll_group {
|
|||||||
|
|
||||||
struct spdk_nvmf_subsystem_pg_ns_info {
|
struct spdk_nvmf_subsystem_pg_ns_info {
|
||||||
struct spdk_io_channel *channel;
|
struct spdk_io_channel *channel;
|
||||||
|
/* current reservation key, no reservation if the value is 0 */
|
||||||
|
uint64_t crkey;
|
||||||
|
/* reservation type */
|
||||||
|
enum spdk_nvme_reservation_type rtype;
|
||||||
|
/* Host ID which holds the reservation */
|
||||||
|
struct spdk_uuid hostid;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct spdk_nvmf_subsystem_poll_group {
|
struct spdk_nvmf_subsystem_poll_group {
|
||||||
|
Loading…
Reference in New Issue
Block a user