From: Klaus Jensen <its@irrelevant.dk>
To: Niklas Cassel <niklas.cassel@wdc.com>
Cc: kbusch@kernel.org, damien.lemoal@wdc.com, qemu-block@nongnu.org,
qemu-devel@nongnu.org
Subject: Re: [PATCH v2 2/4] hw/nvme: store a pointer to the NvmeSubsystem in the NvmeNamespace
Date: Tue, 28 Jun 2022 07:57:39 +0200 [thread overview]
Message-ID: <YrqYUwt3TQVmW+41@apples> (raw)
In-Reply-To: <20220627114731.356462-3-niklas.cassel@wdc.com>
[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]
On Jun 27 13:47, Niklas Cassel wrote:
> Each NvmeNamespace can be used by serveral controllers,
> but a NvmeNamespace can at most belong to a single NvmeSubsystem.
> Store a pointer to the NvmeSubsystem, if the namespace was realized
> with a NvmeSubsystem.
>
> This will be used by a follow up patch.
>
> Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
> ---
> hw/nvme/ns.c | 1 +
> hw/nvme/nvme.h | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/hw/nvme/ns.c b/hw/nvme/ns.c
> index 870c3ca1a2..8bee3e8b3b 100644
> --- a/hw/nvme/ns.c
> +++ b/hw/nvme/ns.c
> @@ -559,6 +559,7 @@ static void nvme_ns_realize(DeviceState *dev, Error **errp)
> if (!qdev_set_parent_bus(dev, &subsys->bus.parent_bus, errp)) {
> return;
> }
> + ns->subsys = subsys;
> }
>
> if (nvme_ns_setup(ns, errp)) {
> diff --git a/hw/nvme/nvme.h b/hw/nvme/nvme.h
> index 0711b9748c..5487e2db40 100644
> --- a/hw/nvme/nvme.h
> +++ b/hw/nvme/nvme.h
> @@ -167,6 +167,7 @@ typedef struct NvmeNamespace {
> int32_t nr_active_zones;
>
> NvmeNamespaceParams params;
> + NvmeSubsystem *subsys;
>
> struct {
> uint32_t err_rec;
> --
> 2.36.1
>
No problemo.
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-06-28 7:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-27 11:47 [PATCH v2 0/4] hw/nvme: add support for TP4084 Niklas Cassel via
2022-06-27 11:47 ` [PATCH v2 1/4] hw/nvme: claim NVMe 2.0 compliance Niklas Cassel via
2022-06-27 17:59 ` Christoph Hellwig
2022-06-28 5:58 ` Klaus Jensen
2022-06-27 11:47 ` [PATCH v2 2/4] hw/nvme: store a pointer to the NvmeSubsystem in the NvmeNamespace Niklas Cassel via
2022-06-28 5:57 ` Klaus Jensen [this message]
2022-06-27 11:47 ` [PATCH v2 3/4] hw/nvme: add support for ratified TP4084 Niklas Cassel via
2022-06-28 5:57 ` Klaus Jensen
2022-06-27 11:47 ` [PATCH v2 4/4] hw/nvme: add new never_ready parameter to test the DNR bit Niklas Cassel via
2022-06-28 6:07 ` Klaus Jensen
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=YrqYUwt3TQVmW+41@apples \
--to=its@irrelevant.dk \
--cc=damien.lemoal@wdc.com \
--cc=kbusch@kernel.org \
--cc=niklas.cassel@wdc.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).