On 10/16/2017 04:49 AM, Vladimir Sementsov-Ogievskiy wrote: > 15.10.2017 04:01, Eric Blake wrote: >> From: Vladimir Sementsov-Ogievskiy <[email protected]> >> >> 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 <[email protected]> >> Signed-off-by: Eric Blake <[email protected]> >>
>> +
>> + 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
