mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
1c5a2aecea
commit
cdd267749a
3 changed files with 16 additions and 4 deletions
11
qemu-img.c
11
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue