diff options
author | rusty <rusty@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652> | 2014-02-26 03:24:07 +0000 |
---|---|---|
committer | rusty <rusty@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652> | 2014-02-26 03:24:07 +0000 |
commit | b968a3909386d3468bd72db0f88e9112e8661b5a (patch) | |
tree | e01b1c0737c5d950f7a680ad01d95ac0a5165df9 | |
parent | 234e04b6e31cacba757a350893eebbb54c9f2f9a (diff) |
Feedback: block: separate normative and descriptive text.
Signed-off-by: Rusty Russell <rusty@au1.ibm.com>
git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio@274 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652
-rw-r--r-- | content.tex | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/content.tex b/content.tex index 9fc5404..8af1927 100644 --- a/content.tex +++ b/content.tex @@ -3474,9 +3474,7 @@ native endian of the guest rather than (necessarily) little-endian. \subsection{Device Initialization}\label{sec:Device Types / Block Device / Device Initialization} \begin{enumerate} -\item The device size should be read from \field{capacity}. - No requests should be submitted which goes - beyond this limit. +\item The device size can be read from \field{capacity}. \item If the VIRTIO_BLK_F_BLK_SIZE feature is negotiated, \field{blk_size} can be read to determine the optimal sector size @@ -3549,8 +3547,24 @@ error or VIRTIO_BLK_S_UNSUPP for a request unsupported by device: #define VIRTIO_BLK_S_UNSUPP 2 \end{lstlisting} -Any writes completed before the submission of the flush command should -be committed to non-volatile storage by the device. +\drivernormative{Device Types / Block Device / Device Operation} + +A driver MUST NOT submit a request which would cause a read or write +beyond \field{capacity}. + +A driver SHOULD accept the VIRTIO_BLK_F_RO feature if offered. + +A driver MUST set \field{sector} to 0 for a VIRTIO_BLK_T_FLUSH request. +A driver SHOULD NOT include any data in a VIRTIO_BLK_T_FLUSH request. + +\devicenormative{Device Types / Block Device / Device Operation} + +A device MUST set the \field{status} byte to VIRTIO_BLK_S_IOERR +for a write request if the VIRTIO_BLK_F_RO feature if offered, and MUST NOT +write any data. + +Upon receipt of a VIRTIO_BLK_T_FLUSH request, the driver SHOULD ensure +that any writes which were completed are committed to non-volatile storage. \subsubsection{Legacy Interface: Device Operation}\label{sec:Device Types / Block Device / Device Operation / Legacy Interface: Device Operation} For legacy devices, the fields in struct virtio_blk_req are the |