Loading drivers/nvme/host/fabrics.c +4 −4 Original line number Original line Diff line number Diff line Loading @@ -58,7 +58,7 @@ static struct nvmf_host *nvmf_host_add(const char *hostnqn) kref_init(&host->ref); kref_init(&host->ref); memcpy(host->nqn, hostnqn, NVMF_NQN_SIZE); memcpy(host->nqn, hostnqn, NVMF_NQN_SIZE); uuid_be_gen(&host->id); uuid_gen(&host->id); list_add_tail(&host->list, &nvmf_hosts); list_add_tail(&host->list, &nvmf_hosts); out_unlock: out_unlock: Loading @@ -75,7 +75,7 @@ static struct nvmf_host *nvmf_host_default(void) return NULL; return NULL; kref_init(&host->ref); kref_init(&host->ref); uuid_be_gen(&host->id); uuid_gen(&host->id); snprintf(host->nqn, NVMF_NQN_SIZE, snprintf(host->nqn, NVMF_NQN_SIZE, "nqn.2014-08.org.nvmexpress:NVMf:uuid:%pUb", &host->id); "nqn.2014-08.org.nvmexpress:NVMf:uuid:%pUb", &host->id); Loading Loading @@ -395,7 +395,7 @@ int nvmf_connect_admin_queue(struct nvme_ctrl *ctrl) if (!data) if (!data) return -ENOMEM; return -ENOMEM; memcpy(&data->hostid, &ctrl->opts->host->id, sizeof(uuid_be)); uuid_copy(&data->hostid, &ctrl->opts->host->id); data->cntlid = cpu_to_le16(0xffff); data->cntlid = cpu_to_le16(0xffff); strncpy(data->subsysnqn, ctrl->opts->subsysnqn, NVMF_NQN_SIZE); strncpy(data->subsysnqn, ctrl->opts->subsysnqn, NVMF_NQN_SIZE); strncpy(data->hostnqn, ctrl->opts->host->nqn, NVMF_NQN_SIZE); strncpy(data->hostnqn, ctrl->opts->host->nqn, NVMF_NQN_SIZE); Loading Loading @@ -454,7 +454,7 @@ int nvmf_connect_io_queue(struct nvme_ctrl *ctrl, u16 qid) if (!data) if (!data) return -ENOMEM; return -ENOMEM; memcpy(&data->hostid, &ctrl->opts->host->id, sizeof(uuid_be)); uuid_copy(&data->hostid, &ctrl->opts->host->id); data->cntlid = cpu_to_le16(ctrl->cntlid); data->cntlid = cpu_to_le16(ctrl->cntlid); strncpy(data->subsysnqn, ctrl->opts->subsysnqn, NVMF_NQN_SIZE); strncpy(data->subsysnqn, ctrl->opts->subsysnqn, NVMF_NQN_SIZE); strncpy(data->hostnqn, ctrl->opts->host->nqn, NVMF_NQN_SIZE); strncpy(data->hostnqn, ctrl->opts->host->nqn, NVMF_NQN_SIZE); Loading drivers/nvme/host/fabrics.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -36,7 +36,7 @@ struct nvmf_host { struct kref ref; struct kref ref; struct list_head list; struct list_head list; char nqn[NVMF_NQN_SIZE]; char nqn[NVMF_NQN_SIZE]; uuid_be id; uuid_t id; }; }; /** /** Loading drivers/nvme/host/fc.c +1 −2 Original line number Original line Diff line number Diff line Loading @@ -878,8 +878,7 @@ nvme_fc_connect_admin_queue(struct nvme_fc_ctrl *ctrl, assoc_rqst->assoc_cmd.sqsize = cpu_to_be16(qsize); assoc_rqst->assoc_cmd.sqsize = cpu_to_be16(qsize); /* Linux supports only Dynamic controllers */ /* Linux supports only Dynamic controllers */ assoc_rqst->assoc_cmd.cntlid = cpu_to_be16(0xffff); assoc_rqst->assoc_cmd.cntlid = cpu_to_be16(0xffff); memcpy(&assoc_rqst->assoc_cmd.hostid, &ctrl->ctrl.opts->host->id, uuid_copy(&assoc_rqst->assoc_cmd.hostid, &ctrl->ctrl.opts->host->id); min_t(size_t, FCNVME_ASSOC_HOSTID_LEN, sizeof(uuid_be))); strncpy(assoc_rqst->assoc_cmd.hostnqn, ctrl->ctrl.opts->host->nqn, strncpy(assoc_rqst->assoc_cmd.hostnqn, ctrl->ctrl.opts->host->nqn, min(FCNVME_ASSOC_HOSTNQN_LEN, NVMF_NQN_SIZE)); min(FCNVME_ASSOC_HOSTNQN_LEN, NVMF_NQN_SIZE)); strncpy(assoc_rqst->assoc_cmd.subnqn, ctrl->ctrl.opts->subsysnqn, strncpy(assoc_rqst->assoc_cmd.subnqn, ctrl->ctrl.opts->subsysnqn, Loading drivers/nvme/target/nvmet.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -21,6 +21,7 @@ #include <linux/percpu-refcount.h> #include <linux/percpu-refcount.h> #include <linux/list.h> #include <linux/list.h> #include <linux/mutex.h> #include <linux/mutex.h> #include <linux/uuid.h> #include <linux/nvme.h> #include <linux/nvme.h> #include <linux/configfs.h> #include <linux/configfs.h> #include <linux/rcupdate.h> #include <linux/rcupdate.h> Loading include/linux/nvme-fc.h +1 −2 Original line number Original line Diff line number Diff line Loading @@ -177,7 +177,6 @@ struct fcnvme_lsdesc_rjt { }; }; #define FCNVME_ASSOC_HOSTID_LEN 16 #define FCNVME_ASSOC_HOSTNQN_LEN 256 #define FCNVME_ASSOC_HOSTNQN_LEN 256 #define FCNVME_ASSOC_SUBNQN_LEN 256 #define FCNVME_ASSOC_SUBNQN_LEN 256 Loading @@ -191,7 +190,7 @@ struct fcnvme_lsdesc_cr_assoc_cmd { __be16 cntlid; __be16 cntlid; __be16 sqsize; __be16 sqsize; __be32 rsvd52; __be32 rsvd52; u8 hostid[FCNVME_ASSOC_HOSTID_LEN]; uuid_t hostid; u8 hostnqn[FCNVME_ASSOC_HOSTNQN_LEN]; u8 hostnqn[FCNVME_ASSOC_HOSTNQN_LEN]; u8 subnqn[FCNVME_ASSOC_SUBNQN_LEN]; u8 subnqn[FCNVME_ASSOC_SUBNQN_LEN]; u8 rsvd632[384]; u8 rsvd632[384]; Loading Loading
drivers/nvme/host/fabrics.c +4 −4 Original line number Original line Diff line number Diff line Loading @@ -58,7 +58,7 @@ static struct nvmf_host *nvmf_host_add(const char *hostnqn) kref_init(&host->ref); kref_init(&host->ref); memcpy(host->nqn, hostnqn, NVMF_NQN_SIZE); memcpy(host->nqn, hostnqn, NVMF_NQN_SIZE); uuid_be_gen(&host->id); uuid_gen(&host->id); list_add_tail(&host->list, &nvmf_hosts); list_add_tail(&host->list, &nvmf_hosts); out_unlock: out_unlock: Loading @@ -75,7 +75,7 @@ static struct nvmf_host *nvmf_host_default(void) return NULL; return NULL; kref_init(&host->ref); kref_init(&host->ref); uuid_be_gen(&host->id); uuid_gen(&host->id); snprintf(host->nqn, NVMF_NQN_SIZE, snprintf(host->nqn, NVMF_NQN_SIZE, "nqn.2014-08.org.nvmexpress:NVMf:uuid:%pUb", &host->id); "nqn.2014-08.org.nvmexpress:NVMf:uuid:%pUb", &host->id); Loading Loading @@ -395,7 +395,7 @@ int nvmf_connect_admin_queue(struct nvme_ctrl *ctrl) if (!data) if (!data) return -ENOMEM; return -ENOMEM; memcpy(&data->hostid, &ctrl->opts->host->id, sizeof(uuid_be)); uuid_copy(&data->hostid, &ctrl->opts->host->id); data->cntlid = cpu_to_le16(0xffff); data->cntlid = cpu_to_le16(0xffff); strncpy(data->subsysnqn, ctrl->opts->subsysnqn, NVMF_NQN_SIZE); strncpy(data->subsysnqn, ctrl->opts->subsysnqn, NVMF_NQN_SIZE); strncpy(data->hostnqn, ctrl->opts->host->nqn, NVMF_NQN_SIZE); strncpy(data->hostnqn, ctrl->opts->host->nqn, NVMF_NQN_SIZE); Loading Loading @@ -454,7 +454,7 @@ int nvmf_connect_io_queue(struct nvme_ctrl *ctrl, u16 qid) if (!data) if (!data) return -ENOMEM; return -ENOMEM; memcpy(&data->hostid, &ctrl->opts->host->id, sizeof(uuid_be)); uuid_copy(&data->hostid, &ctrl->opts->host->id); data->cntlid = cpu_to_le16(ctrl->cntlid); data->cntlid = cpu_to_le16(ctrl->cntlid); strncpy(data->subsysnqn, ctrl->opts->subsysnqn, NVMF_NQN_SIZE); strncpy(data->subsysnqn, ctrl->opts->subsysnqn, NVMF_NQN_SIZE); strncpy(data->hostnqn, ctrl->opts->host->nqn, NVMF_NQN_SIZE); strncpy(data->hostnqn, ctrl->opts->host->nqn, NVMF_NQN_SIZE); Loading
drivers/nvme/host/fabrics.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -36,7 +36,7 @@ struct nvmf_host { struct kref ref; struct kref ref; struct list_head list; struct list_head list; char nqn[NVMF_NQN_SIZE]; char nqn[NVMF_NQN_SIZE]; uuid_be id; uuid_t id; }; }; /** /** Loading
drivers/nvme/host/fc.c +1 −2 Original line number Original line Diff line number Diff line Loading @@ -878,8 +878,7 @@ nvme_fc_connect_admin_queue(struct nvme_fc_ctrl *ctrl, assoc_rqst->assoc_cmd.sqsize = cpu_to_be16(qsize); assoc_rqst->assoc_cmd.sqsize = cpu_to_be16(qsize); /* Linux supports only Dynamic controllers */ /* Linux supports only Dynamic controllers */ assoc_rqst->assoc_cmd.cntlid = cpu_to_be16(0xffff); assoc_rqst->assoc_cmd.cntlid = cpu_to_be16(0xffff); memcpy(&assoc_rqst->assoc_cmd.hostid, &ctrl->ctrl.opts->host->id, uuid_copy(&assoc_rqst->assoc_cmd.hostid, &ctrl->ctrl.opts->host->id); min_t(size_t, FCNVME_ASSOC_HOSTID_LEN, sizeof(uuid_be))); strncpy(assoc_rqst->assoc_cmd.hostnqn, ctrl->ctrl.opts->host->nqn, strncpy(assoc_rqst->assoc_cmd.hostnqn, ctrl->ctrl.opts->host->nqn, min(FCNVME_ASSOC_HOSTNQN_LEN, NVMF_NQN_SIZE)); min(FCNVME_ASSOC_HOSTNQN_LEN, NVMF_NQN_SIZE)); strncpy(assoc_rqst->assoc_cmd.subnqn, ctrl->ctrl.opts->subsysnqn, strncpy(assoc_rqst->assoc_cmd.subnqn, ctrl->ctrl.opts->subsysnqn, Loading
drivers/nvme/target/nvmet.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -21,6 +21,7 @@ #include <linux/percpu-refcount.h> #include <linux/percpu-refcount.h> #include <linux/list.h> #include <linux/list.h> #include <linux/mutex.h> #include <linux/mutex.h> #include <linux/uuid.h> #include <linux/nvme.h> #include <linux/nvme.h> #include <linux/configfs.h> #include <linux/configfs.h> #include <linux/rcupdate.h> #include <linux/rcupdate.h> Loading
include/linux/nvme-fc.h +1 −2 Original line number Original line Diff line number Diff line Loading @@ -177,7 +177,6 @@ struct fcnvme_lsdesc_rjt { }; }; #define FCNVME_ASSOC_HOSTID_LEN 16 #define FCNVME_ASSOC_HOSTNQN_LEN 256 #define FCNVME_ASSOC_HOSTNQN_LEN 256 #define FCNVME_ASSOC_SUBNQN_LEN 256 #define FCNVME_ASSOC_SUBNQN_LEN 256 Loading @@ -191,7 +190,7 @@ struct fcnvme_lsdesc_cr_assoc_cmd { __be16 cntlid; __be16 cntlid; __be16 sqsize; __be16 sqsize; __be32 rsvd52; __be32 rsvd52; u8 hostid[FCNVME_ASSOC_HOSTID_LEN]; uuid_t hostid; u8 hostnqn[FCNVME_ASSOC_HOSTNQN_LEN]; u8 hostnqn[FCNVME_ASSOC_HOSTNQN_LEN]; u8 subnqn[FCNVME_ASSOC_SUBNQN_LEN]; u8 subnqn[FCNVME_ASSOC_SUBNQN_LEN]; u8 rsvd632[384]; u8 rsvd632[384]; Loading