Skip to contentSkip to conversation

qapi: Complete BlkdebugEvent

PATCH Applied Max Reitz 3 participants 4 messages Nov 7, 2014

lore
Share & tools
lore

Max Reitz

author
#0 lore raw

PATCH 1/1 qapi: Complete BlkdebugEvent

Several events were missing from the QAPI enum, add them.

---
 qapi/block-core.json | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
qapi/block-core.json +3 -1
index 77a0cfb..8c3e45d 100644
@@ -1422,7 +1422,9 @@
             'refblock_alloc.write_blocks', 'refblock_alloc.write_table',
             'refblock_alloc.switch_table', 'cluster_alloc',
             'cluster_alloc_bytes', 'cluster_free', 'flush_to_os',
-            'flush_to_disk' ] }
+            'flush_to_disk', 'pwritev_rmw.head', 'pwritev_rmw.after_head',
+            'pwritev_rmw.tail', 'pwritev_rmw.after_tail', 'pwritev',
+            'pwritev_zero', 'pwritev_done', 'empty_image_prepare' ] }
 
 ##
 # @BlkdebugInjectErrorOptions
Signature · 1 line
1.9.3
#2 lore raw
In reply to Max Reitz
Quoted 7 lines · Max Reitz

Several events were missing from the QAPI enum, add them.

---
 qapi/block-core.json | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Do we need any documentation on these? Or is this one of those types where the only people using it are already expected to be familiar with the C code?

Quoted 17 lines
qapi/block-core.json +3 -1
index 77a0cfb..8c3e45d 100644
@@ -1422,7 +1422,9 @@
             'refblock_alloc.write_blocks', 'refblock_alloc.write_table',
             'refblock_alloc.switch_table', 'cluster_alloc',
             'cluster_alloc_bytes', 'cluster_free', 'flush_to_os',
-            'flush_to_disk' ] }
+            'flush_to_disk', 'pwritev_rmw.head', 'pwritev_rmw.after_head',
+            'pwritev_rmw.tail', 'pwritev_rmw.after_tail', 'pwritev',
+            'pwritev_zero', 'pwritev_done', 'empty_image_prepare' ] }
 
 ##
 # @BlkdebugInjectErrorOptions
Signature · 2 lines
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org
author
#3 lore raw
Quoted 11 lines · Eric Blake
Quoted 7 lines · Max Reitz

Several events were missing from the QAPI enum, add them.

---
  qapi/block-core.json | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

Do we need any documentation on these? Or is this one of those types where the only people using it are already expected to be familiar with the C code?

Well, you have to be familiar with the block driver as well. The documentation wouldn't be very useful, it'd be something like "refblock_alloc.write_blocks: Emitted when the new refblocks are written during qcow2 refblock allocation" or "empty_image_prepare: Emitted when qcow2 prepares to empty an image". So I'd leave the documentation out. Most users don't want to use this anyway, blkdebug is for debugging purposes only, so you need to know what the event does in the context of the block driver you're debugging anyway.

Max

Quoted 16 lines
Quoted 16 lines
qapi/block-core.json +3 -1
index 77a0cfb..8c3e45d 100644
@@ -1422,7 +1422,9 @@
              'refblock_alloc.write_blocks', 'refblock_alloc.write_table',
              'refblock_alloc.switch_table', 'cluster_alloc',
              'cluster_alloc_bytes', 'cluster_free', 'flush_to_os',
-            'flush_to_disk' ] }
+            'flush_to_disk', 'pwritev_rmw.head', 'pwritev_rmw.after_head',
+            'pwritev_rmw.tail', 'pwritev_rmw.after_tail', 'pwritev',
+            'pwritev_zero', 'pwritev_done', 'empty_image_prepare' ] }
 
  ##
  # @BlkdebugInjectErrorOptions