From ee32990b0348fc670f6f6719bd07122a393e302d Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 1 Apr 2008 18:11:58 +0100 Subject: [PATCH] Move raw_aio_flush to where it gets compiled. --- block-raw-posix.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/block-raw-posix.c b/block-raw-posix.c index 768d52c5..71e304d1 100644 --- a/block-raw-posix.c +++ b/block-raw-posix.c @@ -429,6 +429,20 @@ static BlockDriverAIOCB *raw_aio_write(BlockDriverState *bs, return &acb->common; } +static BlockDriverAIOCB *raw_aio_flush(BlockDriverState *bs, + BlockDriverCompletionFunc *cb, void *opaque) +{ + RawAIOCB *acb; + + acb = raw_aio_setup(bs, 0, NULL, 0, cb, opaque); + if (!acb) + return NULL; + if (aio_fsync(O_SYNC, &acb->aiocb) < 0) { + qemu_aio_release(acb); + return NULL; + } + return &acb->common; +} static void raw_aio_cancel(BlockDriverAIOCB *blockacb) { int ret; @@ -763,20 +777,6 @@ static int fd_open(BlockDriverState *bs) return 0; } -static BlockDriverAIOCB *raw_aio_flush(BlockDriverState *bs, - BlockDriverCompletionFunc *cb, void *opaque) -{ - RawAIOCB *acb; - - acb = raw_aio_setup(bs, 0, NULL, 0, cb, opaque); - if (!acb) - return NULL; - if (aio_fsync(O_SYNC, &acb->aiocb) < 0) { - qemu_aio_release(acb); - return NULL; - } - return &acb->common; -} #endif #if defined(__linux__) -- 2.39.5