Skip to contentSkip to conversation

block:add coroutine_fn marker to coroutine functions

PATCH Applied Dong Xu Wang 3 participants 4 messages Nov 10, 2011 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block:add coroutine_fn marker to coroutine functions

From: Dong Xu Wang <[email protected]>

Looks better when reviewing these source files.

---
 block/qcow.c     |    4 ++--
 block/qcow2.c    |    6 +++---
 block/sheepdog.c |    4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)
block/qcow.c +2 -2
index 35e21eb..3620a29 100644
@@ -425,7 +425,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;
@@ -523,7 +523,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;
block/qcow2.c +3 -3
index ef057d3..4924cfa 100644
@@ -376,7 +376,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;
@@ -516,7 +516,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)
@@ -1105,7 +1105,7 @@ fail:
     return ret;
 }
 
-static int qcow2_co_flush(BlockDriverState *bs)
+static coroutine_fn int qcow2_co_flush(BlockDriverState *bs)
 {
     BDRVQcowState *s = bs->opaque;
     int ret;
block/sheepdog.c +2 -2
index 9f80609..c5bc520 100644
@@ -1713,7 +1713,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;
@@ -1742,7 +1742,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;
Signature · 1 line
1.7.5.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Dong Xu Wang

From: Dong Xu Wang <[email protected]>

Looks better when reviewing these source files.

---
 block/qcow.c     |    4 ++--
 block/qcow2.c    |    6 +++---
 block/sheepdog.c |    4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

Looks fine but please send all block patches through Kevin, who actively maintains the block layer.

Stefan

#2 lore raw

2011/11/10 Stefan Hajnoczi <[email protected]>:

Quoted 12 lines · Dong Xu Wang
Quoted 10 lines

From: Dong Xu Wang <[email protected]>

Looks better when reviewing these source files.

---
 block/qcow.c     |    4 ++--
 block/qcow2.c    |    6 +++---
 block/sheepdog.c |    4 ++--

 3 files changed, 7 insertions(+), 7 deletions(-)
Quoted 8 lines

Looks fine but please send all block patches through Kevin, who actively maintains the block layer.

Stefan

Okay. I will next time. :)