From a968168c580cb45a700e0b218c7f6871d91ee257 Mon Sep 17 00:00:00 2001 From: Dong Xu Wang Date: Thu, 10 Nov 2011 16:23:22 +0800 Subject: [PATCH] block: Add coroutine_fn marker to coroutine functions Looks better when reviewing these source files. Signed-off-by: Dong Xu Wang Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block/qcow.c | 4 ++-- block/qcow2.c | 8 ++++---- block/sheepdog.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/block/qcow.c b/block/qcow.c index 4814ed0ced..326ef878e6 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -433,7 +433,7 @@ static int decompress_cluster(BlockDriverState *bs, uint64_t cluster_offset) return 0; } -static int qcow_co_readv(BlockDriverState *bs, int64_t sector_num, +static coroutine_fn int qcow_co_readv(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov) { BDRVQcowState *s = bs->opaque; @@ -531,7 +531,7 @@ fail: goto done; } -static int qcow_co_writev(BlockDriverState *bs, int64_t sector_num, +static coroutine_fn int qcow_co_writev(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov) { BDRVQcowState *s = bs->opaque; diff --git a/block/qcow2.c b/block/qcow2.c index d7805ce943..a6a4f4772b 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -377,7 +377,7 @@ int qcow2_backing_read1(BlockDriverState *bs, QEMUIOVector *qiov, return n1; } -static int qcow2_co_readv(BlockDriverState *bs, int64_t sector_num, +static coroutine_fn int qcow2_co_readv(BlockDriverState *bs, int64_t sector_num, int remaining_sectors, QEMUIOVector *qiov) { BDRVQcowState *s = bs->opaque; @@ -517,7 +517,7 @@ static void run_dependent_requests(BDRVQcowState *s, QCowL2Meta *m) } } -static int qcow2_co_writev(BlockDriverState *bs, +static coroutine_fn int qcow2_co_writev(BlockDriverState *bs, int64_t sector_num, int remaining_sectors, QEMUIOVector *qiov) @@ -1137,7 +1137,7 @@ fail: return ret; } -static int qcow2_co_flush_to_os(BlockDriverState *bs) +static coroutine_fn int qcow2_co_flush_to_os(BlockDriverState *bs) { BDRVQcowState *s = bs->opaque; int ret; @@ -1159,7 +1159,7 @@ static int qcow2_co_flush_to_os(BlockDriverState *bs) return 0; } -static int qcow2_co_flush_to_disk(BlockDriverState *bs) +static coroutine_fn int qcow2_co_flush_to_disk(BlockDriverState *bs) { return bdrv_co_flush(bs->file); } diff --git a/block/sheepdog.c b/block/sheepdog.c index 62f1f3a0cf..aa9707f2ae 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -1715,7 +1715,7 @@ out: return 1; } -static int sd_co_writev(BlockDriverState *bs, int64_t sector_num, +static coroutine_fn int sd_co_writev(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov) { SheepdogAIOCB *acb; @@ -1744,7 +1744,7 @@ static int sd_co_writev(BlockDriverState *bs, int64_t sector_num, return acb->ret; } -static int sd_co_readv(BlockDriverState *bs, int64_t sector_num, +static coroutine_fn int sd_co_readv(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov) { SheepdogAIOCB *acb; -- GitLab