All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Fomichev <Dmitry.Fomichev@wdc.com>
To: Klaus Jensen <its@irrelevant.dk>
Cc: "Fam Zheng" <fam@euphon.net>, "Kevin Wolf" <kwolf@redhat.com>,
	"Damien Le Moal" <Damien.LeMoal@wdc.com>,
	"qemu-block@nongnu.org" <qemu-block@nongnu.org>,
	"Niklas Cassel" <Niklas.Cassel@wdc.com>,
	"Klaus Jensen" <k.jensen@samsung.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"Maxim Levitsky" <mlevitsk@redhat.com>,
	"Alistair Francis" <Alistair.Francis@wdc.com>,
	"Keith Busch" <kbusch@kernel.org>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Matias Bjorling" <Matias.Bjorling@wdc.com>
Subject: RE: [PATCH v7 08/11] hw/block/nvme: Add injection of Offline/Read-Only zones
Date: Tue, 20 Oct 2020 23:01:46 +0000	[thread overview]
Message-ID: <MN2PR04MB5951884401C5BDF23174A1B7E11F0@MN2PR04MB5951.namprd04.prod.outlook.com> (raw)
In-Reply-To: <20201019114230.GB10549@apples.localdomain>

> -----Original Message-----
> From: Klaus Jensen <its@irrelevant.dk>
> Sent: Monday, October 19, 2020 7:43 AM
> To: Dmitry Fomichev <Dmitry.Fomichev@wdc.com>
> Cc: Keith Busch <kbusch@kernel.org>; Klaus Jensen
> <k.jensen@samsung.com>; Kevin Wolf <kwolf@redhat.com>; Philippe
> Mathieu-Daudé <philmd@redhat.com>; Maxim Levitsky
> <mlevitsk@redhat.com>; Fam Zheng <fam@euphon.net>; Niklas Cassel
> <Niklas.Cassel@wdc.com>; Damien Le Moal <Damien.LeMoal@wdc.com>;
> qemu-block@nongnu.org; qemu-devel@nongnu.org; Alistair Francis
> <Alistair.Francis@wdc.com>; Matias Bjorling <Matias.Bjorling@wdc.com>
> Subject: Re: [PATCH v7 08/11] hw/block/nvme: Add injection of Offline/Read-
> Only zones
> 
> On Oct 19 11:17, Dmitry Fomichev wrote:
> > ZNS specification defines two zone conditions for the zones that no
> > longer can function properly, possibly because of flash wear or other
> > internal fault. It is useful to be able to "inject" a small number of
> > such zones for testing purposes.
> >
> > This commit defines two optional device properties, "offline_zones"
> > and "rdonly_zones". Users can assign non-zero values to these variables
> > to specify the number of zones to be initialized as Offline or
> > Read-Only. The actual number of injected zones may be smaller than the
> > requested amount - Read-Only and Offline counts are expected to be much
> > smaller than the total number of zones on a drive.
> >
> > Signed-off-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
> > ---
> >  hw/block/nvme-ns.c | 64
> ++++++++++++++++++++++++++++++++++++++++++++++
> >  hw/block/nvme-ns.h |  2 ++
> >  2 files changed, 66 insertions(+)
> >
> > diff --git a/hw/block/nvme-ns.c b/hw/block/nvme-ns.c
> > index 255ded2b43..d050f97909 100644
> > --- a/hw/block/nvme-ns.c
> > +++ b/hw/block/nvme-ns.c
> > @@ -21,6 +21,7 @@
> >  #include "sysemu/sysemu.h"
> >  #include "sysemu/block-backend.h"
> >  #include "qapi/error.h"
> > +#include "crypto/random.h"
> >
> >  #include "hw/qdev-properties.h"
> >  #include "hw/qdev-core.h"
> > @@ -132,6 +133,32 @@ static int
> nvme_calc_zone_geometry(NvmeNamespace *ns, Error **errp)
> >          return -1;
> >      }
> >
> > +    if (ns->params.zd_extension_size) {
> > +        if (ns->params.zd_extension_size & 0x3f) {
> > +            error_setg(errp,
> > +                "zone descriptor extension size must be a multiple of 64B");
> > +            return -1;
> > +        }
> > +        if ((ns->params.zd_extension_size >> 6) > 0xff) {
> > +            error_setg(errp, "zone descriptor extension size is too large");
> > +            return -1;
> > +        }
> > +    }
> 
> Looks like this should have been added in the previous patch.

Right, this belongs to ZDE patch. 

  reply	other threads:[~2020-10-20 23:03 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-19  2:17 [PATCH v7 00/11] hw/block/nvme: Support Namespace Types and Zoned Namespace Command Set Dmitry Fomichev
2020-10-19  2:17 ` [PATCH v7 01/11] hw/block/nvme: Add Commands Supported and Effects log Dmitry Fomichev
2020-10-19 19:22   ` Keith Busch
2020-10-19 20:16   ` Klaus Jensen
2020-10-20 23:04     ` Dmitry Fomichev
2020-10-19  2:17 ` [PATCH v7 02/11] hw/block/nvme: Generate namespace UUIDs Dmitry Fomichev
2020-10-19 19:24   ` Keith Busch
2020-10-19 19:30   ` Klaus Jensen
2020-10-19  2:17 ` [PATCH v7 03/11] hw/block/nvme: Add support for Namespace Types Dmitry Fomichev
2020-10-19 19:51   ` Keith Busch
2020-10-19 20:53   ` Klaus Jensen
2020-10-21  1:50     ` Dmitry Fomichev
2020-10-19  2:17 ` [PATCH v7 04/11] hw/block/nvme: Support allocated CNS command variants Dmitry Fomichev
2020-10-19 20:07   ` Keith Busch
2020-10-20  8:21   ` Klaus Jensen
2020-10-20 23:09     ` Dmitry Fomichev
2020-10-19  2:17 ` [PATCH v7 05/11] hw/block/nvme: Support Zoned Namespace Command Set Dmitry Fomichev
2020-10-19  9:50   ` Klaus Jensen
2020-10-19 15:55     ` Klaus Jensen
2020-10-19 12:33   ` Klaus Jensen
2020-10-20 11:08   ` Klaus Jensen
2020-10-21 10:26   ` Klaus Jensen
2020-10-21 23:19     ` Dmitry Fomichev
2020-10-19  2:17 ` [PATCH v7 06/11] hw/block/nvme: Introduce max active and open zone limits Dmitry Fomichev
2020-10-19  2:17 ` [PATCH v7 07/11] hw/block/nvme: Support Zone Descriptor Extensions Dmitry Fomichev
2020-10-19  2:17 ` [PATCH v7 08/11] hw/block/nvme: Add injection of Offline/Read-Only zones Dmitry Fomichev
2020-10-19 11:42   ` Klaus Jensen
2020-10-20 23:01     ` Dmitry Fomichev [this message]
2020-10-19  2:17 ` [PATCH v7 09/11] hw/block/nvme: Document zoned parameters in usage text Dmitry Fomichev
2020-10-19  2:17 ` [PATCH v7 10/11] hw/block/nvme: Separate read and write handlers Dmitry Fomichev
2020-10-20  8:28   ` Klaus Jensen
2020-10-20 12:36     ` Keith Busch
2020-10-20 23:05       ` Dmitry Fomichev
2020-10-19  2:17 ` [PATCH v7 11/11] hw/block/nvme: Merge nvme_write_zeroes() with nvme_write() Dmitry Fomichev
2020-10-20  8:29   ` Klaus Jensen
2020-10-19  7:32 ` [PATCH v7 00/11] hw/block/nvme: Support Namespace Types and Zoned Namespace Command Set Niklas Cassel

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=MN2PR04MB5951884401C5BDF23174A1B7E11F0@MN2PR04MB5951.namprd04.prod.outlook.com \
    --to=dmitry.fomichev@wdc.com \
    --cc=Alistair.Francis@wdc.com \
    --cc=Damien.LeMoal@wdc.com \
    --cc=Matias.Bjorling@wdc.com \
    --cc=Niklas.Cassel@wdc.com \
    --cc=fam@euphon.net \
    --cc=its@irrelevant.dk \
    --cc=k.jensen@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=kwolf@redhat.com \
    --cc=mlevitsk@redhat.com \
    --cc=philmd@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.