Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:FrontRunner
nvme-cli.24266
0023-fabrics-support-unique-discovery-subsystem...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0023-fabrics-support-unique-discovery-subsystem-NQN.patch of Package nvme-cli.24266
From: Hannes Reinecke <hare@suse.de> Date: Tue, 24 May 2022 10:30:07 +0200 Subject: fabrics: support unique discovery subsystem NQN Git-commit: 479c60cb212f5d2978075c3c3bf40c98a14c30c7 References: bsc#1199865 bsc#1192761 With TP8013 each discovery subsystem can have a unique subsystem NQN. So a check for the subsystem NQN is not sufficient anymore to figure out if this is a discovery subsystem, one needs to check the 'subsystype' sysfs attribute, too. Signed-off-by: Hannes Reinecke <hare@suse.de> --- fabrics.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) --- a/fabrics.c +++ b/fabrics.c @@ -99,6 +99,7 @@ struct connect_args { char *trsvcid; char *host_traddr; char *host_iface; + char *subsystype; struct connect_args *next; struct connect_args *tail; }; @@ -312,6 +313,13 @@ static bool ctrl_matches_connectargs(cha addr = nvme_get_ctrl_attr(path, "address"); cargs.subsysnqn = nvme_get_ctrl_attr(path, "subsysnqn"); cargs.transport = nvme_get_ctrl_attr(path, "transport"); + cargs.subsystype = nvme_get_ctrl_attr(path, "subsystype"); + if (!cargs.subsystype) { + if (!strcmp(cargs.subsysnqn, NVME_DISC_SUBSYS_NAME)) + cargs.subsystype = strdup("discovery"); + else + cargs.subsystype = strdup("nvm"); + } if (!addr || !cargs.subsysnqn || !cargs.transport) { fprintf(stderr, "nvme_get_ctrl_attr failed\n"); @@ -323,7 +331,7 @@ static bool ctrl_matches_connectargs(cha cargs.host_traddr = parse_conn_arg(addr, ' ', conarg_host_traddr); cargs.host_iface = parse_conn_arg(addr, ' ', conarg_host_iface); - if (!strcmp(cargs.subsysnqn, NVME_DISC_SUBSYS_NAME)) { + if (!strcmp(cargs.subsystype, "discovery")) { char *kato_str = nvme_get_ctrl_attr(path, "kato"), *p; unsigned int kato = 0; @@ -430,6 +438,7 @@ static void free_connect_args(struct con free(cargs->trsvcid); free(cargs->host_traddr); free(cargs->host_iface); + free(cargs->subsystype); free(cargs); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor