diff mbox

[v2] virtio-blk physical block size

Message ID 1262018363-15871-1-git-send-email-avi@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Avi Kivity Dec. 28, 2009, 4:39 p.m. UTC
None
diff mbox

Patch

--- virtio-spec-0.8.3.lyx.orig	2009-12-28 17:42:40.000000000 +0200
+++ virtio-spec-0.8.3.lyx	2009-12-28 18:37:39.000000000 +0200
@@ -4138,6 +4138,19 @@ 
 (10) Maximum total sectors in an I/O.
 \end_layout
 
+\begin_layout Description
+VIRTIO_BLK_F_PHYS_BLK_SIZE(11) Physical block size of disk (writes aligned
+ to this will not trigger read-modify-write cycles) is in 
+\begin_inset Quotes erd
+\end_inset
+
+phys_blk_size
+\begin_inset Quotes erd
+\end_inset
+
+.
+\end_layout
+
 \end_deeper
 \begin_layout Description
 Device
@@ -4214,6 +4227,11 @@ 
 
 \begin_layout Plain Layout
 
+    u32 phys_blk_size;
+\end_layout
+
+\begin_layout Plain Layout
+
 };
 \end_layout
 
@@ -4241,9 +4259,9 @@ 
 
 \begin_layout Enumerate
 If the VIRTIO_BLK_F_BLK_SIZE feature is negotiated, the blk_size field can
- be read to determine the optimal sector size for the driver to use.
+ be read to determine the sector size for the driver to use.
  This does not effect the units used in the protocol (always 512 bytes),
- but awareness of the correct value can effect performance.
+ but requests must be aligned to this size.
 \end_layout
 
 \begin_layout Enumerate
@@ -4257,6 +4275,13 @@ 
  No requests should be submitted which go beyond this limit.
 \end_layout
 
+\begin_layout Enumerate
+If the VIRTIO_BLK_F_PHYS_BLK_SIZE feature is negotiated, the phys_blk_size
+ field should be read to determine the hardware block size.
+ Smaller writes are liable to require read-modify-write cycles on behalf
+ of the underlying hardware, however they are still supported.
+\end_layout
+
 \begin_layout Section*
 Device Operation
 \end_layout