From: Stefan Hajnoczi <stefanha@gmail.com>
To: Klaus Jensen <k.jensen@samsung.com>
Cc: Sam Li <faithilikerun@gmail.com>,
qemu-devel <qemu-devel@nongnu.org>,
Val Adler <spantamd@gmail.com>
Subject: Re: NVMe ZNS last zone size
Date: Wed, 23 Aug 2023 14:59:38 -0400 [thread overview]
Message-ID: <CAJSP0QWX3vAkn=nmCDTiNA6DdUXYnMBkcGeESBXTf4SU=0xQqA@mail.gmail.com> (raw)
In-Reply-To: <ZOZVi2FVAmj4qnXV@cormorant.local>
On Wed, 23 Aug 2023 at 14:53, Klaus Jensen <k.jensen@samsung.com> wrote:
>
> On Aug 23 22:58, Sam Li wrote:
> > Stefan Hajnoczi <stefanha@gmail.com> 于2023年8月23日周三 22:41写道:
> > >
> > > On Wed, 23 Aug 2023 at 10:24, Sam Li <faithilikerun@gmail.com> wrote:
> > > >
> > > > Hi Stefan,
> > > >
> > > > Stefan Hajnoczi <stefanha@gmail.com> 于2023年8月23日周三 21:26写道:
> > > > >
> > > > > Hi Sam and Klaus,
> > > > > Val is adding nvme-io_uring ZNS support to libblkio
> > > > > (https://gitlab.com/libblkio/libblkio/-/merge_requests/221) and asked
> > > > > how to test the size of the last zone when the namespace's total size
> > > > > is not a multiple of the zone size.
> > > >
> > > > I think a zone report operation can do the trick. Given zone configs,
> > > > the size of last zone should be [size - (nr_zones - 1) * zone_size].
> > > > Reporting last zone on such devices tells whether the value is
> > > > correct.
> > >
> > > In nvme_ns_zoned_check_calc_geometry() the number of zones is rounded down:
> > >
> > > ns->num_zones = le64_to_cpu(ns->id_ns.nsze) / ns->zone_size;
> > >
> > > Afterwards nsze is recalculated as follows:
> > >
> > > ns->id_ns.nsze = cpu_to_le64(ns->num_zones * ns->zone_size);
> > >
> > > I interpret this to mean that when the namespace's total size is not a
> > > multiple of the zone size, then the last part will be ignored and not
> > > exposed as a zone.
> >
> > I see. Current ZNS emulation does not support this case.
> >
>
> NVMe Zoned Namespaces requires all zones to be the same size. The
> "trailing zone" is a thing in SMR HDDs.
Thanks for letting me know.
Stefan
next prev parent reply other threads:[~2023-08-23 19:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-23 13:26 NVMe ZNS last zone size Stefan Hajnoczi
2023-08-23 14:23 ` Sam Li
2023-08-23 14:41 ` Stefan Hajnoczi
2023-08-23 14:58 ` Sam Li
2023-08-23 18:52 ` Klaus Jensen
2023-08-23 18:59 ` Stefan Hajnoczi [this message]
2023-08-24 0:45 ` Sam Li
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='CAJSP0QWX3vAkn=nmCDTiNA6DdUXYnMBkcGeESBXTf4SU=0xQqA@mail.gmail.com' \
--to=stefanha@gmail.com \
--cc=faithilikerun@gmail.com \
--cc=k.jensen@samsung.com \
--cc=qemu-devel@nongnu.org \
--cc=spantamd@gmail.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).