On Thu, Apr 14, 2022 at 07:57:48PM +0200, Paolo Bonzini wrote: > The .reply_possible field of s->requests is never set to false. This is > not a problem as it is only a safeguard to detect protocol errors, > but it's sloppy. In fact, the field is actually not necessary at all, > because .coroutine is set to NULL in NBD_FOREACH_REPLY_CHUNK after > receiving the last chunk. Thus, replace .reply_possible with .coroutine > and move the check before deciding the fate of this request. > > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > --- > block/nbd.c | 12 +++++------- > 1 file changed, 5 insertions(+), 7 deletions(-)
Ah, indeed nicer than the v1 approach. Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org