From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Gollu Appalanaidu <anaidu.gollu@samsung.com>, qemu-devel@nongnu.org
Cc: fam@euphon.net, kwolf@redhat.com, qemu-block@nongnu.org,
mreitz@redhat.com, kbusch@kernel.org, stefanha@redhat.com,
its@irrelevant.dk
Subject: Re: [PATCH v3] hw/block/nvme: fix lbaf formats initialization
Date: Wed, 21 Apr 2021 12:30:54 +0200 [thread overview]
Message-ID: <29011d94-df5d-5e76-d82d-f0a1a70cbde2@redhat.com> (raw)
In-Reply-To: <20210416115907.30625-1-anaidu.gollu@samsung.com>
On 4/16/21 1:59 PM, Gollu Appalanaidu wrote:
> Currently LBAF formats are being intialized based on metadata
> size if and only if nvme-ns "ms" parameter is non-zero value.
> Since FormatNVM command being supported device parameter "ms"
> may not be the criteria to initialize the supported LBAFs.
>
> Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
> ---
> -v3: Remove "mset" constraint check if ms < 8, "mset" can be
> set even when ms < 8 and non-zero.
>
> -v2: Addressing review comments (Klaus)
> Change the current "pi" and "ms" constraint check such that it
> will throw the error if ms < 8 and if namespace protection info,
> location and metadata settings are set.
> Splitting this from compare fix patch series.
>
> hw/block/nvme-ns.c | 58 ++++++++++++++++++++--------------------------
> 1 file changed, 25 insertions(+), 33 deletions(-)
> + NvmeLBAF lbaf[16] = {
Unrelated to your change, but better to use a read-only array:
static const NvmeLBAF lbaf[16] = {
> + [0] = { .ds = 9 },
> + [1] = { .ds = 9, .ms = 8 },
> + [2] = { .ds = 9, .ms = 16 },
> + [3] = { .ds = 9, .ms = 64 },
> + [4] = { .ds = 12 },
> + [5] = { .ds = 12, .ms = 8 },
> + [6] = { .ds = 12, .ms = 16 },
> + [7] = { .ds = 12, .ms = 64 },
> + };
> +
> + memcpy(&id_ns->lbaf, &lbaf, sizeof(lbaf));
> + id_ns->nlbaf = 7;
prev parent reply other threads:[~2021-04-21 10:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20210416120324epcas5p354e2f196cc68680aba45341f385b59ed@epcas5p3.samsung.com>
2021-04-16 11:59 ` [PATCH v3] hw/block/nvme: fix lbaf formats initialization Gollu Appalanaidu
2021-04-20 19:47 ` Klaus Jensen
2021-04-21 10:03 ` Gollu Appalanaidu
2021-04-21 10:30 ` Philippe Mathieu-Daudé [this message]
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=29011d94-df5d-5e76-d82d-f0a1a70cbde2@redhat.com \
--to=philmd@redhat.com \
--cc=anaidu.gollu@samsung.com \
--cc=fam@euphon.net \
--cc=its@irrelevant.dk \
--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).