[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/31] linux aio: some comments
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 01/31] linux aio: some comments |
Date: |
Tue, 6 Sep 2011 17:39:16 +0200 |
From: Frediano Ziglio <address@hidden>
Add some notes about Linux AIO explaining why we don't use AIO in
some situations.
Signed-off-by: Frediano Ziglio <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/raw-posix.c | 4 ++++
linux-aio.c | 1 +
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index c5c9944..bcf50b2 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -236,6 +236,10 @@ static int raw_open_common(BlockDriverState *bs, const
char *filename,
}
#ifdef CONFIG_LINUX_AIO
+ /*
+ * Currently Linux do AIO only for files opened with O_DIRECT
+ * specified so check NOCACHE flag too
+ */
if ((bdrv_flags & (BDRV_O_NOCACHE|BDRV_O_NATIVE_AIO)) ==
(BDRV_O_NOCACHE|BDRV_O_NATIVE_AIO)) {
diff --git a/linux-aio.c b/linux-aio.c
index 5fd3932..5265a02 100644
--- a/linux-aio.c
+++ b/linux-aio.c
@@ -181,6 +181,7 @@ BlockDriverAIOCB *laio_submit(BlockDriverState *bs, void
*aio_ctx, int fd,
case QEMU_AIO_READ:
io_prep_preadv(iocbs, fd, qiov->iov, qiov->niov, offset);
break;
+ /* Currently Linux kernel does not support other operations */
default:
fprintf(stderr, "%s: invalid AIO request type 0x%x.\n",
__func__, type);
--
1.7.6
- [Qemu-devel] [PULL 00/31] Block patches, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 02/31] qcow2: Properly initialise QcowL2Meta, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 04/31] async: Allow nested qemu_bh_poll calls, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 01/31] linux aio: some comments,
Kevin Wolf <=
- [Qemu-devel] [PATCH 03/31] qcow2: Fix error cases to run depedent requests, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 05/31] block: Attach non-qdev devices as well, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 06/31] block: Generalize change_cb() to BlockDevOps, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 08/31] ide: Update command code definitions as per ACS-2 Table B.2, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 07/31] block: Split change_cb() into change_media_cb(), resize_cb(), Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 09/31] ide: Clean up case label indentation in ide_exec_cmd(), Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 11/31] block/raw: Fix to forward method bdrv_media_changed(), Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 10/31] ide: Give vmstate structs internal linkage where possible, Kevin Wolf, 2011/09/06