[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/3] Only call aio flush handler if set
From: |
Ryan Harper |
Subject: |
[Qemu-devel] [PATCH 1/3] Only call aio flush handler if set |
Date: |
Mon, 22 Sep 2008 18:17:32 -0500 |
If the aio handler doesn't register an io_flush handler, we'd SEGV; fix that by
only calling the flush handler if set. BTW, aio handlers *should* register an
io_flush routine.
Signed-off-by: Ryan Harper <address@hidden>
diff --git a/aio.c b/aio.c
index 687e4be..2bb3ed4 100644
--- a/aio.c
+++ b/aio.c
@@ -105,7 +105,8 @@ void qemu_aio_flush(void)
ret = 0;
LIST_FOREACH(node, &aio_handlers, node) {
- ret |= node->io_flush(node->opaque);
+ if (node->io_flush)
+ ret |= node->io_flush(node->opaque);
}
qemu_aio_wait();
[Qemu-devel] [PATCH 2/3] Move aio implementation out of raw block driver, Ryan Harper, 2008/09/22