Skip to content

Commit d806d2e

Browse files
committed
nvme/private.h: document controller attribute scopes
The controller attributes have a different scope across reconfiguration; some are immutable, some persist across reconfiguration, and some will be reset when calling nvme_reconfigure_ctrl(). Signed-off-by: Hannes Reinecke <[email protected]>
1 parent bfddbe8 commit d806d2e

1 file changed

Lines changed: 15 additions & 10 deletions

File tree

src/nvme/private.h

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,22 @@ struct nvme_ctrl {
7575
struct list_head paths;
7676
struct list_head namespaces;
7777
struct nvme_subsystem *s;
78+
struct nvme_fabrics_config cfg;
79+
80+
/* Immutable attributes */
81+
char *transport;
82+
char *subsysnqn;
83+
char *traddr;
84+
char *trsvcid;
85+
86+
/* persistent across reconfiguration */
87+
char *dhchap_key;
88+
char *dhchap_ctrl_key;
89+
char *keyring;
90+
char *tls_key_identity;
91+
char *tls_key;
7892

93+
/* reset during reconfiguration */
7994
int fd;
8095
char *name;
8196
char *sysfs_dir;
@@ -87,15 +102,6 @@ struct nvme_ctrl {
87102
char *queue_count;
88103
char *serial;
89104
char *sqsize;
90-
char *transport;
91-
char *subsysnqn;
92-
char *traddr;
93-
char *trsvcid;
94-
char *dhchap_key;
95-
char *dhchap_ctrl_key;
96-
char *keyring;
97-
char *tls_key_identity;
98-
char *tls_key;
99105
char *cntrltype;
100106
char *cntlid;
101107
char *dctype;
@@ -104,7 +110,6 @@ struct nvme_ctrl {
104110
bool unique_discovery_ctrl;
105111
bool discovered;
106112
bool persistent;
107-
struct nvme_fabrics_config cfg;
108113
};
109114

110115
struct nvme_subsystem {

0 commit comments

Comments
 (0)