linux aio: some comments
PATCH 1/1 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 <[email protected]>
--- block/raw-posix.c | 4 ++++ linux-aio.c | 1 + 2 files changed, 5 insertions(+), 0 deletions(-)
block/raw-posix.c +4 -0
@@ -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 )) {
linux-aio.c +1 -0
@@ -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);
Signature · 1 line
1.7.1
Kevin Wolf
AppliedAm 30.08.2011 09:46, schrieb Frediano Ziglio:
Quoted 4 lines
Add some notes about Linux AIO explaining why we don't use AIO in some situations.
Signed-off-by Frediano Ziglio <[email protected]>
Thanks, applied to the block branch.
Kevin