qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 32/33] block/nbd: safer transition to receiving request


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH v3 32/33] block/nbd: safer transition to receiving request
Date: Fri, 4 Jun 2021 08:36:27 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

04.06.2021 00:11, Eric Blake wrote:
On Fri, Apr 16, 2021 at 11:09:10AM +0300, Vladimir Sementsov-Ogievskiy wrote:
req->receiving is a flag of request being in one concrete yield point
in nbd_co_do_receive_one_chunk().

Such kind of boolean flag is always better to unset before scheduling
the coroutine, to avoid double scheduling. So, let's be more careful.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
  block/nbd.c | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)


@@ -614,7 +616,7 @@ static int nbd_co_send_request(BlockDriverState *bs,
      if (qiov) {
          qio_channel_set_cork(s->ioc, true);
          rc = nbd_send_request(s->ioc, request);
-        if (nbd_clinet_connected(s) && rc >= 0) {
+        if (nbd_client_connected(s) && rc >= 0) {

Ouch - typo fix in clinet seems unrelated in this fix; please hoist it
into the correct point in the series so that we don't have the typo in
the first place.

That also means that I didn't made my favorite "git rebase -x 'make -j9' 
master".. Not good, will fix of course.


Otherwise,
Reviewed-by: Eric Blake <eblake@redhat.com>



--
Best regards,
Vladimir



reply via email to

[Prev in Thread] Current Thread [Next in Thread]