From: Andy Lutomirski <luto@kernel.org>
To: linux-nvme@lists.infradead.org
Cc: Andy Lutomirski <luto@kernel.org>
Subject: [PATCH 1/4] hostnqn: Fix the systemd-based NQN namespace to comply with the spec
Date: Thu, 19 Dec 2019 19:31:02 -0800 [thread overview]
Message-ID: <c4224eee27e76b803238048a54e6a27f8cd367b6.1576726427.git.luto@kernel.org> (raw)
In-Reply-To: <cover.1576726427.git.luto@kernel.org>
The NVME Base spec, section 7.9 explicitly states that
nqn.2014-08.org.nvmexpress:uuid: uses an RFC 4122 UUID, but we
weren't generating one. We could change it by actually generating a
compliant UUID, but we can also just invent a new naming authority.
Use "nqn.2019-10.us.luto:sd_id128_app:"
Signed-off-by: Andy Lutomirski <luto@kernel.org>
---
fabrics.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/fabrics.c b/fabrics.c
index 655bd36c5639..12be2e73986e 100644
--- a/fabrics.c
+++ b/fabrics.c
@@ -691,7 +691,12 @@ static char *hostnqn_generate_systemd(void)
if (sd_id128_get_machine_app_specific(NVME_HOSTNQN_ID, &id) < 0)
return NULL;
- if (asprintf(&ret, "nqn.2014-08.org.nvmexpress:uuid:" SD_ID128_FORMAT_STR "\n", SD_ID128_FORMAT_VAL(id)) == -1)
+ /*
+ * "nqn.2019-10.us.luto:sd_id128_app:" is hereby defined as an SD_ID128
+ * app-specific machine ID as generated here.
+ */
+
+ if (asprintf(&ret, "nqn.2019-10.us.luto:sd_id128_app:" SD_ID128_FORMAT_STR "\n", SD_ID128_FORMAT_VAL(id)) == -1)
ret = NULL;
return ret;
--
2.23.0
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2019-12-20 3:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-20 3:31 [PATCH 0/4] systemd ID improvements Andy Lutomirski
2019-12-20 3:31 ` Andy Lutomirski [this message]
2019-12-20 3:31 ` [PATCH 2/4] fabrics: Rename nvmf_hostnqn_file() to nvmf_hostnqn_load() Andy Lutomirski
2019-12-20 3:31 ` [PATCH 3/4] Use systemd-generated hostid if no hostid is configured Andy Lutomirski
2020-01-03 18:14 ` David Milburn
2020-01-13 19:14 ` Andy Lutomirski
2019-12-20 3:31 ` [PATCH 4/4] Do not install /etc/nvme/hostid or /etc/nvme/hostnqn by default Andy Lutomirski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c4224eee27e76b803238048a54e6a27f8cd367b6.1576726427.git.luto@kernel.org \
--to=luto@kernel.org \
--cc=linux-nvme@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).