From e5e51dd3af6a0872dedce290ee41437b5aeed109 Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Wed, 1 Apr 2015 09:45:38 +0800 Subject: 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 Reviewed-by: Stefan Hajnoczi Message-id: 1427852740-24315-2-git-send-email-famz@redhat.com Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- qapi/block-core.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'qapi') 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 -- cgit v1.2.3