From: Stefan Hajnoczi <stefanha@redhat.com>
To: virtio-dev@lists.oasis-open.org
Cc: Jan Kiszka <jan.kiszka@siemens.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
"Michael S . Tsirkin" <mst@redhat.com>
Subject: [virtio-dev] [PATCH v3 2/5] virtio-blk: move virtio_blk_discard_write_zeroes definition
Date: Thu, 21 Feb 2019 16:22:16 +0000 [thread overview]
Message-ID: <20190221162219.9790-3-stefanha@redhat.com> (raw)
In-Reply-To: <20190221162219.9790-1-stefanha@redhat.com>
struct virtio_blk_discard_write_zeroes is defined alongside
struct virtio_blk_req but only discussed later in the text. Move it to
where it belongs.
Suggested-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
content.tex | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/content.tex b/content.tex
index b185bb0..4201c7e 100644
--- a/content.tex
+++ b/content.tex
@@ -3944,15 +3944,6 @@ struct virtio_blk_req {
u8 data[];
u8 status;
};
-
-struct virtio_blk_discard_write_zeroes {
- le64 sector;
- le32 num_sectors;
- struct {
- le32 unmap:1;
- le32 reserved:31;
- } flags;
-};
\end{lstlisting}
The type of the request is either a read (VIRTIO_BLK_T_IN), a write
@@ -3977,10 +3968,22 @@ requests write the contents of \field{data} to the block device (in multiples
of 512 bytes).
The \field{data} used for discard or write zeroes command is described
-by one or more virtio_blk_discard_write_zeroes structs. \field{sector}
-indicates the starting offset (in 512-byte units) of the segment, while
-\field{num_sectors} indicates the number of sectors in each discarded
-range. \field{unmap} is only used for write zeroes command.
+by one or more virtio_blk_discard_write_zeroes structs:
+
+\begin{lstlisting}
+struct virtio_blk_discard_write_zeroes {
+ le64 sector;
+ le32 num_sectors;
+ struct {
+ le32 unmap:1;
+ le32 reserved:31;
+ } flags;
+};
+\end{lstlisting}
+
+\field{sector} indicates the starting offset (in 512-byte units) of the
+segment, while \field{num_sectors} indicates the number of sectors in each
+discarded range. \field{unmap} is only used for write zeroes command.
The final \field{status} byte is written by the device: either
VIRTIO_BLK_S_OK for success, VIRTIO_BLK_S_IOERR for device or driver
--
2.20.1
---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
next prev parent reply other threads:[~2019-02-21 16:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-21 16:22 [virtio-dev] [PATCH v3 0/5] virtio-blk: discard and write zeroes clarifications Stefan Hajnoczi
2019-02-21 16:22 ` [virtio-dev] [PATCH v3 1/5] virtio-blk: document data[] size constraints Stefan Hajnoczi
2019-02-21 16:22 ` Stefan Hajnoczi [this message]
2019-02-21 16:22 ` [virtio-dev] [PATCH v3 3/5] virtio-blk: describe write zeroes unmap semantics Stefan Hajnoczi
2019-02-21 16:22 ` [virtio-dev] [PATCH v3 4/5] virtio-blk: avoid inconsistent "DISCARD" term Stefan Hajnoczi
2019-02-21 16:22 ` [virtio-dev] [PATCH v3 5/5] virtio-blk: clarify semantics of multi-segment discard/write zeroes commands Stefan Hajnoczi
2019-02-22 15:01 ` Michael S. Tsirkin
2019-02-25 16:54 ` Stefan Hajnoczi
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=20190221162219.9790-3-stefanha@redhat.com \
--to=stefanha@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=mst@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox