Skip to contentSkip to conversation

virtio_blk header fixes

PATCH In review Michael S. Tsirkin 2 participants 5 messages Mar 1, 2015 – Mar 5, 2015

Subsystems (2)
lore
Share & tools
lore

Michael S. Tsirkin

author maintainer
#0 lore raw

cover virtio_blk header fixes

Now that QEmu reuses linux virtio headers, we noticed a typo in the exported virtio block header. Fix it up.

I'd like these merged for 4.0 so that Qemu 2.3 can alredy get it right.

Michael S. Tsirkin (2):
virtio_blk: typo fix
virtio_blk: fix comment for virtio 1.0

 include/uapi/linux/virtio_blk.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
Signature · 1 line
MST
author maintainer
#1 lore raw

PATCH 1/2 virtio_blk: typo fix

Now that QEmu reuses linux virtio headers, we noticed a typo in the exported virtio block header. Fix it up.

---
 include/uapi/linux/virtio_blk.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/virtio_blk.h +1 -1
index 3c53eec..b695ba9 100644
@@ -60,7 +60,7 @@ struct virtio_blk_config {
 	__u32 size_max;
 	/* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */
 	__u32 seg_max;
-	/* geometry the device (if VIRTIO_BLK_F_GEOMETRY) */
+	/* geometry of the device (if VIRTIO_BLK_F_GEOMETRY) */
 	struct virtio_blk_geometry {
 		__u16 cylinders;
 		__u8 heads;
Signature · 1 line
MST
author maintainer
#2 lore raw

PATCH 2/2 virtio_blk: fix comment for virtio 1.0

In reply to Michael S. Tsirkin

Fix up comment to match virtio 1.0 logic:
virtio_blk_outhdr isn't the first elements anymore, the only requirement is that it comes first in the s/g list.

---
 include/uapi/linux/virtio_blk.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
include/uapi/linux/virtio_blk.h +5 -1
index b695ba9..19c66fc 100644
@@ -119,7 +119,11 @@ struct virtio_blk_config {
 #define VIRTIO_BLK_T_BARRIER	0x80000000
 #endif /* !VIRTIO_BLK_NO_LEGACY */
 
-/* This is the first element of the read scatter-gather list. */
+/*
+ * This comes first in the read scatter-gather list.
+ * For legacy virtio, if VIRTIO_F_ANY_LAYOUT is not negotiated,
+ * this is the first element of the read scatter-gather list.
+ */
 struct virtio_blk_outhdr {
 	/* VIRTIO_BLK_T* */
 	__virtio32 type;
Signature · 1 line
MST
#3 lore raw

Re: [PATCH 2/2] virtio_blk: fix comment for virtio 1.0

Quoted 6 lines · Michael S. Tsirkin

Fix up comment to match virtio 1.0 logic:
virtio_blk_outhdr isn't the first elements anymore, the only requirement is that it comes first in the s/g list.

Thanks, both applied.

Cheers,
Rusty.

author maintainer
#4 lore raw

Re: [PATCH 2/2] virtio_blk: fix comment for virtio 1.0

Quoted 6 lines · Rusty Russell
Quoted 5 lines · Michael S. Tsirkin

Fix up comment to match virtio 1.0 logic:
virtio_blk_outhdr isn't the first elements anymore, the only requirement is that it comes first in the s/g list.

Quoted 6 lines
Quoted 1 line

Thanks, both applied.

Cheers,
Rusty.

Hmm, I don't see them in your virtio-next tree. Did I miss something?
I know these are just headers but it's in UAPI so I'd like to make them correct ASAP.