Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115965969
D48776.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D48776.diff
View Options
diff --git a/usr.sbin/ctladm/ctladm.c b/usr.sbin/ctladm/ctladm.c
--- a/usr.sbin/ctladm/ctladm.c
+++ b/usr.sbin/ctladm/ctladm.c
@@ -3496,7 +3496,8 @@
char *frontend_type;
char *name;
int pp, vp;
- char *target, *port, *lun_map;
+ char *controller, *target, *port, *lun_map;
+ nvlist_t *host_list;
nvlist_t *init_list;
nvlist_t *lun_list;
nvlist_t *attr_list;
@@ -3550,6 +3551,7 @@
portlist->num_ports++;
portlist->cur_port = cur_port;
+ cur_port->host_list = nvlist_create(0);
cur_port->init_list = nvlist_create(0);
cur_port->lun_list = nvlist_create(0);
cur_port->attr_list = nvlist_create(NV_FLAG_NO_UNIQUE);
@@ -3610,6 +3612,9 @@
} else if (strcmp(name, "target") == 0) {
cur_port->target = str;
str = NULL;
+ } else if (strcmp(name, "subnqn") == 0) {
+ cur_port->controller = str;
+ str = NULL;
} else if (strcmp(name, "port") == 0) {
cur_port->port = str;
str = NULL;
@@ -3620,6 +3625,14 @@
portlist->cur_port = NULL;
} else if (strcmp(name, "ctlportlist") == 0) {
/* Nothing. */
+ } else if (strcmp(name, "host") == 0) {
+ snprintf(idname, sizeof(idname), "%ju", portlist->cur_id);
+ nvlist_move_string(cur_port->host_list, idname, str);
+ error = nvlist_error(cur_port->host_list);
+ if (error != 0)
+ errc(1, error, "%s: can't add host nv pair",
+ __func__);
+ str = NULL;
} else if (strcmp(name, "initiator") == 0) {
snprintf(idname, sizeof(idname), "%ju", portlist->cur_id);
nvlist_move_string(cur_port->init_list, idname, str);
@@ -3771,6 +3784,9 @@
port->port ? port->port : "");
if (init || verbose) {
+ if (port->controller)
+ printf(" Controller: %s\n", port->controller);
+ print_nvlist(port->host_list, " Host %s: %s\n");
if (port->target)
printf(" Target: %s\n", port->target);
print_nvlist(port->init_list, " Initiator %s: %s\n");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 1, 11:55 PM (15 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16390138
Default Alt Text
D48776.diff (1 KB)
Attached To
Mode
D48776: ctladm: Handle connected hosts for NVMeoF ports
Attached
Detach File
Event Timeline
Log In to Comment