diff mbox

[1.1,v2] sheepdog: add coroutine_fn markers to coroutine functions

Message ID 1338336235-10980-1-git-send-email-morita.kazutaka@lab.ntt.co.jp
State New
Headers show

Commit Message

MORITA Kazutaka May 30, 2012, 12:03 a.m. UTC
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
---

Changes from v1:
 - use spaces for indentation

 block/sheepdog.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

Comments

Stefan Hajnoczi May 30, 2012, 7:36 a.m. UTC | #1
On Wed, May 30, 2012 at 1:03 AM, MORITA Kazutaka
<morita.kazutaka@lab.ntt.co.jp> wrote:
> Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
> ---
>
> Changes from v1:
>  - use spaces for indentation
>
>  block/sheepdog.c |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)

It's worth mentioning that this does not affect the binary that gets
built and isn't critical for QEMU 1.1.  It's still a good change to
have though because it documents which functions execute in coroutine
context.

Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Kevin Wolf May 30, 2012, 7:52 a.m. UTC | #2
Am 30.05.2012 09:36, schrieb Stefan Hajnoczi:
> On Wed, May 30, 2012 at 1:03 AM, MORITA Kazutaka
> <morita.kazutaka@lab.ntt.co.jp> wrote:
>> Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
>> ---
>>
>> Changes from v1:
>>  - use spaces for indentation
>>
>>  block/sheepdog.c |    9 +++++----
>>  1 files changed, 5 insertions(+), 4 deletions(-)
> 
> It's worth mentioning that this does not affect the binary that gets
> built and isn't critical for QEMU 1.1.  It's still a good change to
> have though because it documents which functions execute in coroutine
> context.
> 
> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>

I don't such things qualify for 1.1 at this point. I'll queue it for 1.2.

Kevin
diff mbox

Patch

diff --git a/block/sheepdog.c b/block/sheepdog.c
index f46ca8f..8877f45 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -522,8 +522,8 @@  static int send_req(int sockfd, SheepdogReq *hdr, void *data,
     return ret;
 }
 
-static int send_co_req(int sockfd, SheepdogReq *hdr, void *data,
-                       unsigned int *wlen)
+static coroutine_fn int send_co_req(int sockfd, SheepdogReq *hdr, void *data,
+                                    unsigned int *wlen)
 {
     int ret;
 
@@ -540,6 +540,7 @@  static int send_co_req(int sockfd, SheepdogReq *hdr, void *data,
 
     return ret;
 }
+
 static int do_req(int sockfd, SheepdogReq *hdr, void *data,
                   unsigned int *wlen, unsigned int *rlen)
 {
@@ -576,8 +577,8 @@  out:
     return ret;
 }
 
-static int do_co_req(int sockfd, SheepdogReq *hdr, void *data,
-                     unsigned int *wlen, unsigned int *rlen)
+static coroutine_fn int do_co_req(int sockfd, SheepdogReq *hdr, void *data,
+                                  unsigned int *wlen, unsigned int *rlen)
 {
     int ret;