On 03.09.26 16:32, Markus Armbruster wrote:
Hanna Czenczek <[email protected]> writes:
This enum gives more information than IoOperationType (which is used for
the rerror/werror distinction) to identify operation types for block
accounting.
Signed-off-by: Hanna Czenczek <[email protected]>
---
qapi/block.json | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/qapi/block.json b/qapi/block.json
index 46955bbb3e3..456118eb0b4 100644
--- a/qapi/block.json
+++ b/qapi/block.json
@@ -603,3 +603,25 @@
'*boundaries-zap': ['uint64'],
'*boundaries-flush': ['uint64'] },
'allow-preconfig': true }
+
+##
+# @IoAccountingOperation:
+#
+# A more finely grained enumeration of I/O operation types beyond what
+# `IoOperationType` provides (whose read/write distinction matches the
+# rerror/werror policy settings).
Why is the comparison to IoOperationType useful?
Because the `IoOperationType` exists, and in my mind, it would be better
to have a single enum for all types.
Now, to reason why a new one is introduced, the commit message here
would be sufficient. But I felt it better to document for users also why
there are two types.
If making the connection between IoOperationType values and
"rerror/werror policy setting" is useful, why isn't it made in
IoOperationType's docs?
That is true! I should move it there.
What settings exactly? Could this be a link?
Probably. I will take the look.
(The block device’s rerror/werror settings.)
Hanna
+#
+# @read: Reading data
+#
+# @write: Writing data
+#
+# @flush: Flushing data to disk
+#
+# @zone-append: Appending data to a zone of a zoned block device
+#
+# @unmap: Discarding a block of data
+#
+# Since: 11.2
+##
+{ 'enum': 'IoAccountingOperation',
+ 'data': [ 'read', 'write', 'flush', 'zone-append', 'unmap' ] }