From: Keith Busch <kbusch@kernel.org>
To: Minwoo Im <minwoo.im.dev@gmail.com>
Cc: Klaus Jensen <its@irrelevant.dk>, Kevin Wolf <kwolf@redhat.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org,
Max Reitz <mreitz@redhat.com>
Subject: Re: [PATCH V4 2/6] hw/block/nvme: support to map controller to a subsystem
Date: Thu, 21 Jan 2021 15:03:38 -0800 [thread overview]
Message-ID: <20210121230338.GC1727271@dhcp-10-100-145-180.wdc.com> (raw)
In-Reply-To: <20210121220908.14247-3-minwoo.im.dev@gmail.com>
On Fri, Jan 22, 2021 at 07:09:04AM +0900, Minwoo Im wrote:
> --- a/hw/block/nvme.c
> +++ b/hw/block/nvme.c
> @@ -23,6 +23,7 @@
> * max_ioqpairs=<N[optional]>, \
> * aerl=<N[optional]>, aer_max_queued=<N[optional]>, \
> * mdts=<N[optional]>,zoned.append_size_limit=<N[optional]> \
> + * ,subsys=<subsys_id> \
For consistency, the ',' goes in the preceeding line.
> * -device nvme-ns,drive=<drive_id>,bus=<bus_name>,nsid=<nsid>,\
> * zoned=<true|false[optional]>
> * -device nvme-subsys,id=<subsys_id>
> @@ -4404,11 +4412,25 @@ static int nvme_init_pci(NvmeCtrl *n, PCIDevice *pci_dev, Error **errp)
> return 0;
> }
>
> +static void nvme_init_subnqn(NvmeCtrl *n)
> +{
> + NvmeSubsystem *subsys = n->subsys;
> + NvmeIdCtrl *id = &n->id_ctrl;
> + char *subnqn;
> +
> + if (!subsys) {
> + subnqn = g_strdup_printf("nqn.2019-08.org.qemu:%s", n->params.serial);
> + strpadcpy((char *)id->subnqn, sizeof(id->subnqn), subnqn, '\0');
> + g_free(subnqn);
snprintf(id->subnqn, sizeof(id->subnqn), "nqn.2019-08.org.qemu:%s", n->params.serial);
> + } else {
> + pstrcpy((char *)id->subnqn, sizeof(id->subnqn), (char*)subsys->subnqn);
> + }
> +}
next prev parent reply other threads:[~2021-01-21 23:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-21 22:09 [PATCH V4 0/6] hw/block/nvme: support multi-path for ctrl/ns Minwoo Im
2021-01-21 22:09 ` [PATCH V4 1/6] hw/block/nvme: introduce nvme-subsys device Minwoo Im
2021-01-21 22:52 ` Keith Busch
2021-01-21 23:40 ` Minwoo Im
2021-01-21 22:09 ` [PATCH V4 2/6] hw/block/nvme: support to map controller to a subsystem Minwoo Im
2021-01-21 23:03 ` Keith Busch [this message]
2021-01-21 23:41 ` Minwoo Im
2021-01-21 22:09 ` [PATCH V4 3/6] hw/block/nvme: add CMIC enum value for Identify Controller Minwoo Im
2021-01-21 22:09 ` [PATCH V4 4/6] hw/block/nvme: support for multi-controller in subsystem Minwoo Im
2021-01-21 23:17 ` Keith Busch
2021-01-21 23:41 ` Minwoo Im
2021-01-21 22:09 ` [PATCH V4 5/6] hw/block/nvme: add NMIC enum value for Identify Namespace Minwoo Im
2021-01-21 22:09 ` [PATCH V4 6/6] hw/block/nvme: support for shared namespace in subsystem Minwoo Im
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=20210121230338.GC1727271@dhcp-10-100-145-180.wdc.com \
--to=kbusch@kernel.org \
--cc=its@irrelevant.dk \
--cc=kwolf@redhat.com \
--cc=minwoo.im.dev@gmail.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.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).