All of lore.kernel.org
 help / color / mirror / Atom feed
From: Klaus Jensen <its@irrelevant.dk>
To: Minwoo Im <minwoo.im.dev@gmail.com>
Cc: Keith Busch <kbusch@kernel.org>, Kevin Wolf <kwolf@redhat.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org,
	Max Reitz <mreitz@redhat.com>
Subject: Re: [RFC PATCH V3 7/8] hw/block/nvme: add 'detached' param not to attach namespace
Date: Tue, 19 Jan 2021 19:25:08 +0100	[thread overview]
Message-ID: <YAckBNC3ReHdyP4w@apples.localdomain> (raw)
In-Reply-To: <20210119170147.19657-8-minwoo.im.dev@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1821 bytes --]

On Jan 20 02:01, Minwoo Im wrote:
> Introduced 'detached' parameter to nvme-ns device.  If given, the
> namespace will not be attached to controller(s) in the subsystem.  If
> 'subsys' is not given with this option, it should be provided with 'bus'
> which is for private namespace.
> 
> This patch also introduced 'ctrls_bitmap' in NvmeNamespace instance to
> represent which controler id(cntlid) is attached to this namespace
> device.  A namespace can be attached to multiple controllers in a
> subsystem so that this bitmap maps those two relationships.
> 
> The ctrls_bitmap bitmap should not be accessed directly, but through the
> helpers introduced in this patch: nvme_ns_is_attached(),
> nvme_ns_attach(), nvme_ns_detach().
> 
> Note that this patch made identify namespace list data not hold
> non-attached namespace ID in nvme_identify_nslist.  Currently, this
> command handler is for CNS 0x2(Active) and 0x10(Allocated) both.  The
> next patch will introduce a handler for later on.
> 
> Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
> ---
>  hw/block/nvme-ns.c     |  9 +++++++++
>  hw/block/nvme-ns.h     |  6 ++++++
>  hw/block/nvme-subsys.c |  2 ++
>  hw/block/nvme.c        | 31 ++++++++++++++++++++++++++++++-
>  hw/block/nvme.h        | 15 +++++++++++++++
>  5 files changed, 62 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/block/nvme-ns.c b/hw/block/nvme-ns.c
> index 073f65e49cac..70d42c24065c 100644
> --- a/hw/block/nvme-ns.c
> +++ b/hw/block/nvme-ns.c
> @@ -17,6 +17,7 @@
>  #include "qemu/cutils.h"
>  #include "qemu/log.h"
>  #include "qemu/error-report.h"
> +#include "qemu/hbitmap.h"

Isn't the HBitmap slightly overkill? Can qemu/bitmap.h suffice?

>  #include "hw/block/block.h"
>  #include "hw/pci/pci.h"
>  #include "sysemu/sysemu.h"

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-01-19 19:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-19 17:01 [RFC PATCH V3 0/8] hw/block/nvme: support multi-path for ctrl/ns Minwoo Im
2021-01-19 17:01 ` [RFC PATCH V3 1/8] hw/block/nvme: introduce nvme-subsys device Minwoo Im
2021-01-19 17:01 ` [RFC PATCH V3 2/8] hw/block/nvme: support to map controller to a subsystem Minwoo Im
2021-01-19 17:01 ` [RFC PATCH V3 3/8] hw/block/nvme: add CMIC enum value for Identify Controller Minwoo Im
2021-01-19 17:01 ` [RFC PATCH V3 4/8] hw/block/nvme: support for multi-controller in subsystem Minwoo Im
2021-01-19 17:01 ` [RFC PATCH V3 5/8] hw/block/nvme: add NMIC enum value for Identify Namespace Minwoo Im
2021-01-19 17:01 ` [RFC PATCH V3 6/8] hw/block/nvme: support for shared namespace in subsystem Minwoo Im
2021-01-19 17:01 ` [RFC PATCH V3 7/8] hw/block/nvme: add 'detached' param not to attach namespace Minwoo Im
2021-01-19 18:25   ` Klaus Jensen [this message]
2021-01-20  0:47     ` Minwoo Im
2021-01-19 17:01 ` [RFC PATCH V3 8/8] hw/block/nvme: Add Identify Active Namespace ID List Minwoo Im
2021-01-20 14:07   ` Niklas Cassel
2021-01-20 14:17     ` Klaus Jensen
2021-01-20 21:58     ` Minwoo Im
2021-01-21  9:53       ` Niklas Cassel
2021-01-19 18:18 ` [RFC PATCH V3 0/8] hw/block/nvme: support multi-path for ctrl/ns Klaus Jensen
2021-01-19 19:26   ` Keith Busch
2021-01-20  0:45     ` Minwoo Im
2021-01-20  0:44   ` Minwoo Im
2021-01-20  7:52     ` Klaus Jensen
2021-01-20 11:46       ` 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=YAckBNC3ReHdyP4w@apples.localdomain \
    --to=its@irrelevant.dk \
    --cc=kbusch@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.