On 03.09.26 16:36, Markus Armbruster wrote:
Hanna Czenczek <[email protected]> writes:
This event will be emitted when a disk operation takes longer than a
pre-defined threshold (as set on the block device).
Signed-off-by: Hanna Czenczek <[email protected]>
---
qapi/block.json | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/qapi/block.json b/qapi/block.json
index 456118eb0b4..1cdaffd5520 100644
--- a/qapi/block.json
+++ b/qapi/block.json
@@ -625,3 +625,33 @@
##
{ 'enum': 'IoAccountingOperation',
'data': [ 'read', 'write', 'flush', 'zone-append', 'unmap' ] }
+
+##
+# @BLOCK_IO_DELAY:
+#
+# Emitted when a disk operation takes longer than the pre-defined
+# threshold (as set via the delay-alert-ms property on the block
+# device).
Double-quotes around delay-alert-ms, please.
Sure.
"The block device" is the one at @qom-path?
Yes, exactly.
As far as I can tell, this property doesn't yet exist at this point.
Fine, but please mention the fact in the commit message.
I will!
Thanks for reviewing,
Hanna
+#
+# Note that delays deliberately incurred by throttling do count
+# towards the operation duration.
+#
+# @qom-path: path to the device object in the QOM tree
+#
+# @operation: I/O operation
+#
+# @duration: Ongoing duration of the operation (in seconds)
+#
+# @offset: Request offset in the guest disk (in bytes), if available
+#
+# @bytes: Request length
+#
+# Since: 11.2
+##
+{ 'event': 'BLOCK_IO_DELAY',
+ 'data': {
+ 'qom-path': 'str',
+ 'operation': 'IoAccountingOperation',
+ 'duration': 'number',
+ '*offset': 'uint64',
+ 'bytes': 'uint64' } }