[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v6 13/14] qemu-nbd: adds option for aio engines
From: |
Aarushi Mehta |
Subject: |
[Qemu-devel] [PATCH v6 13/14] qemu-nbd: adds option for aio engines |
Date: |
Fri, 19 Jul 2019 19:05:29 +0530 |
Signed-off-by: Aarushi Mehta <address@hidden>
---
qemu-nbd.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/qemu-nbd.c b/qemu-nbd.c
index a8cb39e510..e5a71b3501 100644
--- a/qemu-nbd.c
+++ b/qemu-nbd.c
@@ -135,7 +135,7 @@ static void usage(const char *name)
" '[ID_OR_NAME]'\n"
" -n, --nocache disable host cache\n"
" --cache=MODE set cache mode (none, writeback, ...)\n"
-" --aio=MODE set AIO mode (native or threads)\n"
+" --aio=MODE set AIO mode (native, io_uring or threads)\n"
" --discard=MODE set discard mode (ignore, unmap)\n"
" --detect-zeroes=MODE set detect-zeroes mode (off, on, unmap)\n"
" --image-opts treat FILE as a full set of image options\n"
@@ -718,13 +718,9 @@ int main(int argc, char **argv)
exit(EXIT_FAILURE);
}
seen_aio = true;
- if (!strcmp(optarg, "native")) {
- flags |= BDRV_O_NATIVE_AIO;
- } else if (!strcmp(optarg, "threads")) {
- /* this is the default */
- } else {
- error_report("invalid aio mode `%s'", optarg);
- exit(EXIT_FAILURE);
+ if (bdrv_parse_aio(optarg, &flags) < 0) {
+ error_report("Invalid aio mode `%s'", optarg);
+ exit(EXIT_FAILURE);
}
break;
case QEMU_NBD_OPT_DISCARD:
--
2.21.0
- [Qemu-devel] [PATCH v6 09/14] block: add trace events for io_uring, (continued)
- [Qemu-devel] [PATCH v6 12/14] qemu-img: adds option to use aio engine, Aarushi Mehta, 2019/07/19
- [Qemu-devel] [PATCH v6 13/14] qemu-nbd: adds option for aio engines,
Aarushi Mehta <=
- [Qemu-devel] [PATCH v6 14/14] qemu-iotest: enable testing with qemu-io aio options, Aarushi Mehta, 2019/07/19
- Re: [Qemu-devel] [PATCH v6 00/14] Add support for io_uring, no-reply, 2019/07/19
- Re: [Qemu-devel] [PATCH v6 00/14] Add support for io_uring, no-reply, 2019/07/19