aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2015-04-01 09:45:38 +0800
committerKevin Wolf <kwolf@redhat.com>2015-04-28 15:36:09 +0200
commite5e51dd3af6a0872dedce290ee41437b5aeed109 (patch)
treed5ff9a3ea2164c674e46831e1a11b4b13b7ca8cf /qapi
parent9eddd6a4b3b187ba50038800b6e4aeda4973b365 (diff)
block/null: Latency simulation by adding new option "latency-ns"
Aio context switch should just work because the requests will be drained, so the scheduled timer(s) on the old context will be freed. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 1427852740-24315-2-git-send-email-famz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/block-core.json5
1 files changed, 4 insertions, 1 deletions
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 78730846c2..e158a7cfc2 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1310,11 +1310,14 @@
# Driver specific block device options for the null backend.
#
# @size: #optional size of the device in bytes.
+# @latency-ns: #optional emulated latency (in nanoseconds) in processing
+# requests. Default to zero which completes requests immediately.
+# (Since 2.4)
#
# Since: 2.2
##
{ 'type': 'BlockdevOptionsNull',
- 'data': { '*size': 'int' } }
+ 'data': { '*size': 'int', '*latency-ns': 'uint64' } }
##
# @BlockdevOptionsVVFAT