qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Minwoo Im <minwoo.im.dev@gmail.com>
To: Klaus Jensen <its@irrelevant.dk>
Cc: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <fam@euphon.net>,
	qemu-block@nongnu.org, Klaus Jensen <k.jensen@samsung.com>,
	Gollu Appalanaidu <anaidu.gollu@samsung.com>,
	qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Keith Busch <kbusch@kernel.org>
Subject: Re: [PATCH for-6.0 v2 7/8] hw/block/nvme: fix handling of private namespaces
Date: Tue, 6 Apr 2021 15:23:33 +0900	[thread overview]
Message-ID: <20210406062333.GB2594@localhost> (raw)
In-Reply-To: <20210405175452.37578-8-its@irrelevant.dk>

On 21-04-05 19:54:51, Klaus Jensen wrote:
> From: Klaus Jensen <k.jensen@samsung.com>
> 
> Prior to this patch, if a private nvme-ns device (that is, a namespace
> that is not linked to a subsystem) is wired up to an nvme-subsys linked
> nvme controller device, the device fails to verify that the namespace id
> is unique within the subsystem. NVM Express v1.4b, Section 6.1.6 ("NSID
> and Namespace Usage") states that because the device supports Namespace
> Management, "NSIDs *shall* be unique within the NVM subsystem".
> 
> Additionally, prior to this patch, private namespaces are not known to
> the subsystem and the namespace is considered exclusive to the
> controller with which it is initially wired up to. However, this is not
> the definition of a private namespace; per Section 1.6.33 ("private
> namespace"), a private namespace is just a namespace that does not
> support multipath I/O or namespace sharing, which means "that it is only
> able to be attached to one controller at a time".
> 
> Fix this by always allocating namespaces in the subsystem (if one is
> linked to the controller), regardsless of the shared/private status of
> the namespace. Whether or not the namespace is shareable is controlled
> by a new `shared` nvme-ns parameter.
> 
> Finally, this fix allows the nvme-ns `subsys` parameter to be removed,
> since the `shared` parameter now serves the purpose of attaching the
> namespace to all controllers in the subsystem upon device realization.
> It is invalid to have an nvme-ns namespace device with a linked
> subsystem without the parent nvme controller device also being linked to
> one and since the nvme-ns devices will unconditionally be "attached" (in
> QEMU terms that is) to an nvme controller device through an NvmeBus, the
> nvme-ns namespace device can always get a reference to the subsystem of
> the controller it is explicitly (using 'bus=' parametr) or implicitly
> attaching to.
> 
> Fixes: e570768566b3 ("hw/block/nvme: support for shared namespace in subsystem")
> Cc: Minwoo Im <minwoo.im.dev@gmail.com>
> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
> Reviewed-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>

Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com>

Thanks for the fix.


  reply	other threads:[~2021-04-06  6:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-05 17:54 [PATCH for-6.0 v2 0/8] hw/block/nvme: misc fixes Klaus Jensen
2021-04-05 17:54 ` [PATCH for-6.0 v2 1/8] hw/block/nvme: fix pi constraint check Klaus Jensen
2021-04-05 17:54 ` [PATCH for-6.0 v2 2/8] hw/block/nvme: fix missing string representation for ns attachment Klaus Jensen
2021-04-05 17:54 ` [PATCH for-6.0 v2 3/8] hw/block/nvme: fix the nsid 'invalid' value Klaus Jensen
2021-04-06  6:53   ` Philippe Mathieu-Daudé
2021-04-06  7:16     ` Klaus Jensen
2021-04-05 17:54 ` [PATCH for-6.0 v2 4/8] hw/block/nvme: fix controller namespaces array indexing Klaus Jensen
2021-04-06  7:01   ` Philippe Mathieu-Daudé
2021-04-06  7:28     ` Klaus Jensen
2021-04-06 18:21       ` Klaus Jensen
2021-04-05 17:54 ` [PATCH for-6.0 v2 5/8] hw/block/nvme: fix warning about legacy namespace configuration Klaus Jensen
2021-04-05 17:54 ` [PATCH for-6.0 v2 6/8] hw/block/nvme: update dmsrl limit on namespace detachment Klaus Jensen
2021-04-06  7:10   ` Philippe Mathieu-Daudé
2021-04-06  7:24     ` Klaus Jensen
2021-04-09 17:39       ` Thomas Huth
2021-04-12  7:26         ` Klaus Jensen
2021-04-05 17:54 ` [PATCH for-6.0 v2 7/8] hw/block/nvme: fix handling of private namespaces Klaus Jensen
2021-04-06  6:23   ` Minwoo Im [this message]
2021-04-05 17:54 ` [PATCH for-6.0 v2 8/8] hw/block/nvme: add missing copyright headers Klaus Jensen
2021-04-05 18:59 ` [PATCH for-6.0 v2 0/8] hw/block/nvme: misc fixes Keith Busch

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=20210406062333.GB2594@localhost \
    --to=minwoo.im.dev@gmail.com \
    --cc=anaidu.gollu@samsung.com \
    --cc=fam@euphon.net \
    --cc=its@irrelevant.dk \
    --cc=k.jensen@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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).