On 7/20/20 4:00 AM, Vladimir Sementsov-Ogievskiy wrote:
We try to go to wakeable sleep, so that, if drain begins it will break
the sleep. But what if nbd_client_co_drain_begin() already called and
s->drained is already true? We'll go to sleep, and drain will have to
wait for the whole timeout. Let's improve it.

Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]>
---
  block/nbd.c | 11 ++++++-----
  1 file changed, 6 insertions(+), 5 deletions(-)


How frequently did you hit this case? At any rate, the optimization looks sane, and I'm happy to include it in 5.1.

Reviewed-by: Eric Blake <[email protected]>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


Reply via email to