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 <vsementsov@virtuozzo.com>
---
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.