qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v6 12/14] qemu-img: adds option to use aio engine


From: Aarushi Mehta
Subject: [Qemu-devel] [PATCH v6 12/14] qemu-img: adds option to use aio engine
Date: Fri, 19 Jul 2019 19:05:28 +0530

Use -i AIOMODE instead of -n.

Signed-off-by: Aarushi Mehta <address@hidden>
---
 qemu-img.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/qemu-img.c b/qemu-img.c
index 79983772de..b7a962afff 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -4192,7 +4192,7 @@ 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:io:qs:S:t:wU", long_options, 
NULL);
         if (c == -1) {
             break;
         }
@@ -4232,8 +4232,13 @@ static int img_bench(int argc, char **argv)
         case 'f':
             fmt = optarg;
             break;
-        case 'n':
-            flags |= BDRV_O_NATIVE_AIO;
+        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':
         {
-- 
2.21.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]