diff options
author | Aarushi Mehta <mehta.aaru20@gmail.com> | 2020-01-20 14:18:55 +0000 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2020-01-30 20:59:42 +0000 |
commit | cdd267749a3ab787e8b03f1971d1c7c147c8a47c (patch) | |
tree | 8bd00f45e91debcbc1904212609355956da68c61 /qemu-img.c | |
parent | 1c5a2aecead5c914d9880c8d9b01ec8d43c8f73e (diff) |
qemu-img: adds option to use aio engine for benchmarking
Signed-off-by: Aarushi Mehta <mehta.aaru20@gmail.com>
Acked-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20200120141858.587874-13-stefanha@redhat.com
Message-Id: <20200120141858.587874-13-stefanha@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'qemu-img.c')
-rw-r--r-- | qemu-img.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/qemu-img.c b/qemu-img.c index 6233b8ca56..2b4562b9d9 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -4187,7 +4187,8 @@ static int img_bench(int argc, char **argv) {"force-share", no_argument, 0, 'U'}, {0, 0, 0, 0} }; - c = getopt_long(argc, argv, ":hc:d:f:no:qs:S:t:wU", long_options, NULL); + c = getopt_long(argc, argv, ":hc:d:f:ni:o:qs:S:t:wU", long_options, + NULL); if (c == -1) { break; } @@ -4230,6 +4231,14 @@ static int img_bench(int argc, char **argv) case 'n': flags |= BDRV_O_NATIVE_AIO; break; + case 'i': + ret = bdrv_parse_aio(optarg, &flags); + if (ret < 0) { + error_report("Invalid aio option: %s", optarg); + ret = -1; + goto out; + } + break; case 'o': { offset = cvtnum(optarg); |