From c30e624d5d04efdb581c841f9bf8b06302b96575 Mon Sep 17 00:00:00 2001 From: Frediano Ziglio Date: Tue, 30 Aug 2011 09:46:11 +0200 Subject: linux aio: some comments Add some notes about Linux AIO explaining why we don't use AIO in some situations. Signed-off-by: Frediano Ziglio Signed-off-by: Kevin Wolf --- block/raw-posix.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'block/raw-posix.c') diff --git a/block/raw-posix.c b/block/raw-posix.c index c5c99446c0..bcf50b2cf7 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)) { -- cgit v1.2.3