On 10/16/2017 04:49 AM, Vladimir Sementsov-Ogievskiy wrote: > 15.10.2017 04:01, Eric Blake wrote: >> From: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> >> >> Minimal implementation of structured read: one structured reply chunk, >> no segmentation. >> Minimal structured error implementation: no text message. >> Support DF flag, but just ignore it, as there is no segmentation any >> way. >> >> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> >> Signed-off-by: Eric Blake <ebl...@redhat.com> >>
>> + >> + case NBD_OPT_STRUCTURED_REPLY: >> + if (client->structured_reply) { >> + ret = nbd_negotiate_send_rep_err( >> + client->ioc, NBD_REP_ERR_INVALID, option, errp, >> + "structured reply already negotiated"); > > You were going to send a patch to spec for this.. Still am; it's on my queue for tasks to do today. :) > >> + } else { >> + ret = nbd_negotiate_send_rep(client->ioc, >> NBD_REP_ACK, >> + option, errp); >> + } >> + if (ret < 0) { >> + return ret; >> + } >> + client->structured_reply = true; >> + myflags |= NBD_CMD_FLAG_DF; > > it should be NBD_FLAG_SEND_DF Ouch, you're right. NBD_CMD_FLAG_DF has the same value as NBD_FLAG_SEND_FLUSH (which we always advertise). If nothing else, you proved that my weekend hacking was shoved out the door quickly, rather than fully tested. :) > > [...] > > the following looks ok. > -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature