qemu/nbd
Eric Blake 73e064ccf0 nbd: Fix regression with multiple meta contexts
Detected by a hang in the libnbd testsuite.  If a client requests
multiple meta contexts (both base:allocation and qemu:dirty-bitmap:x)
at the same time, our attempt to silence a false-positive warning
about a potential uninitialized variable introduced botched logic: we
were short-circuiting the second context, and never sending the
NBD_REPLY_FLAG_DONE.  Combining two 'if' into one 'if/else' in
bdf200a55 was wrong (I'm a bit embarrassed that such a change was my
initial suggestion after the v1 patch, then I did not review the v2
patch that actually got committed). Revert that, and instead silence
the false positive warning by replacing 'return ret' with 'return 0'
(the value it always has at that point in the code, even though it
eluded the deduction abilities of the robot that reported the false
positive).

Fixes: bdf200a553
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200206173832.130004-1-eblake@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
2020-02-26 14:45:02 -06:00
..
Makefile.objs nbd: Split nbd.c 2016-01-15 18:58:02 +01:00
client.c nbd: Don't send oversize strings 2019-11-18 16:01:34 -06:00
common.c nbd: Prepare for NBD_CMD_FLAG_FAST_ZERO 2019-09-05 16:03:13 -05:00
nbd-internal.h Include qemu/main-loop.h less 2019-08-16 13:31:52 +02:00
server.c nbd: Fix regression with multiple meta contexts 2020-02-26 14:45:02 -06:00
trace-events trace: Remove trailing newline in events 2019-09-18 10:19:47 +01:00