From: Stefan Hajnoczi <stefanha@redhat.com>
To: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Cc: virtio-dev@lists.oasis-open.org,
virtio-comment@lists.oasis-open.org,
Damien Le Moal <damien.lemoal@opensource.wdc.com>,
Stefan Hajnoczi <stefanha@gmail.com>,
Hannes Reinecke <hare@suse.de>, Cornelia Huck <cohuck@redhat.com>,
Matias Bjorling <matias.bjorling@wdc.com>,
Niklas Cassel <niklas.cassel@wdc.com>,
Hans Holmberg <Hans.Holmberg@wdc.com>,
Klaus Jensen <its@irrelevant.dk>,
Sam Li <faithilikerun@gmail.com>
Subject: Re: [virtio-dev] [PATCH v6] virtio-blk: add zoned block device specification
Date: Thu, 6 Oct 2022 11:11:13 -0400 [thread overview]
Message-ID: <Yz7wEeUdVQT3y7u5@fedora> (raw)
In-Reply-To: <20220904165601.170769-1-dmitry.fomichev@wdc.com>
[-- Attachment #1: Type: text/plain, Size: 1154 bytes --]
On Sun, Sep 04, 2022 at 12:56:01PM -0400, Dmitry Fomichev wrote:
> @@ -4746,7 +4930,15 @@ \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope
> le32 reserved;
> le64 sector;
> u8 data[];
> - u8 status;
> + union {
> + u8 status;
> +
> + struct {
> + u8 status;
> + u8 reserved[7];
> + le64 append_sector;
> + } zone_append_in_hdr;
> + };
If a zone append request is sent to a device without VIRTIO_BLK_F_ZONED,
then should the device store VIRTIO_BLK_S_UNSUPP to status or to
zone_append_in_hdr.status?
(I think the answer is status.)
It seems simpler to avoid this problem and instead define:
struct virtio_blk_zone_append_in_hdr {
le64 append_sector;
}
and say that zone append requests have this struct *before* struct
virtio_blk_in_hdr. So the layout is:
le32 type;
le32 reserved;
le64 sector;
u8 data[];
le64 append_sector;
u8 status;
That way the location of the status field does not change, it's always
the last byte.
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2022-10-06 15:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-04 16:56 [PATCH v6] virtio-blk: add zoned block device specification Dmitry Fomichev
2022-09-20 2:30 ` Dmitry Fomichev
2022-09-30 9:45 ` [virtio-dev] " Cornelia Huck
2022-10-04 7:39 ` Damien Le Moal
2022-10-04 16:03 ` [virtio-dev] " Stefan Hajnoczi
2022-10-06 15:11 ` Stefan Hajnoczi [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=Yz7wEeUdVQT3y7u5@fedora \
--to=stefanha@redhat.com \
--cc=Hans.Holmberg@wdc.com \
--cc=cohuck@redhat.com \
--cc=damien.lemoal@opensource.wdc.com \
--cc=dmitry.fomichev@wdc.com \
--cc=faithilikerun@gmail.com \
--cc=hare@suse.de \
--cc=its@irrelevant.dk \
--cc=matias.bjorling@wdc.com \
--cc=niklas.cassel@wdc.com \
--cc=stefanha@gmail.com \
--cc=virtio-comment@lists.oasis-open.org \
--cc=virtio-dev@lists.oasis-open.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.