Re: [Qemu-devel] [Nbd] [PATCH v4 04/11] nbd: Improve server handling of bogus commands

2016-06-15 Thread Wouter Verhelst
On Wed, Jun 15, 2016 at 11:27:21AM +0100, Alex Bligh wrote: > Perhaps this should read "If an error occurs, the server MUST either initiate > a hard disconnect before the entire payload has been sent or > set the appropriate code in the error field and send the response header > without any

Re: [Qemu-devel] [Nbd] [PATCH v4 04/11] nbd: Improve server handling of bogus commands

2016-06-15 Thread Paolo Bonzini
On 15/06/2016 12:27, Alex Bligh wrote: > > On 15 Jun 2016, at 10:18, Paolo Bonzini wrote: > >>> So what should those servers do (like 2 of mine) which don't buffer >>> the entire read, if they get an error having already sent some data? >> >> They have sent an error code

Re: [Qemu-devel] [Nbd] [PATCH v4 04/11] nbd: Improve server handling of bogus commands

2016-06-15 Thread Alex Bligh
On 15 Jun 2016, at 10:18, Paolo Bonzini wrote: >> So what should those servers do (like 2 of mine) which don't buffer >> the entire read, if they get an error having already sent some data? > > They have sent an error code of zero, and it turned out to be wrong. So > the

Re: [Qemu-devel] [Nbd] [PATCH v4 04/11] nbd: Improve server handling of bogus commands

2016-06-15 Thread Paolo Bonzini
- Original Message - > From: "Alex Bligh" > To: "Wouter Verhelst" > Cc: "Alex Bligh" , nbd-gene...@lists.sourceforge.net, > "Paolo Bonzini" , > qemu-devel@nongnu.org, "qemu block" > Sent:

Re: [Qemu-devel] [Nbd] [PATCH v4 04/11] nbd: Improve server handling of bogus commands

2016-06-15 Thread Alex Bligh
> On 15 Jun 2016, at 09:03, Wouter Verhelst wrote: > > On Wed, Jun 15, 2016 at 09:05:22AM +0200, Wouter Verhelst wrote: >> There are more clients than the Linux and qemu ones, but I think it's >> fair to say that those two are the most important ones. If they agree >> that a read

Re: [Qemu-devel] [Nbd] [PATCH v4 04/11] nbd: Improve server handling of bogus commands

2016-06-15 Thread Wouter Verhelst
On Wed, Jun 15, 2016 at 09:05:22AM +0200, Wouter Verhelst wrote: > There are more clients than the Linux and qemu ones, but I think it's > fair to say that those two are the most important ones. If they agree > that a read reply which errors should come without payload, then I think > we should

Re: [Qemu-devel] [Nbd] [PATCH v4 04/11] nbd: Improve server handling of bogus commands

2016-06-15 Thread Wouter Verhelst
On Tue, Jun 14, 2016 at 04:02:15PM +0100, Alex Bligh wrote: > > On 14 Jun 2016, at 14:32, Paolo Bonzini wrote: > > > > > On 13/06/2016 23:41, Alex Bligh wrote: > >> That's one of the reasons that there is a proposal to add > >> STRUCTURED_READ to the spec (although I still

Re: [Qemu-devel] [Nbd] [PATCH v4 04/11] nbd: Improve server handling of bogus commands

2016-06-15 Thread Wouter Verhelst
On Mon, Jun 13, 2016 at 10:41:05PM +0100, Alex Bligh wrote: > For amusement value, the non-threaded handler (which is not used > any more) does not send any payload on an error: > https://github.com/yoe/nbd/blob/master/nbd-server.c#L1734 nbd-server used to just drop the connection on read error.