Re: [Qemu-devel] [PATCH for-4.0] nbd: Permit simple error to NBD_CMD_BLOCK_STATUS

2019-03-25 Thread Eric Blake
On 3/25/19 11:21 AM, Eric Blake wrote: > -if (!extent->length && !iter.err) { > -error_setg(&iter.err, > - "Server did not reply with any status extents"); > +if (!extent->length && !iter.request_ret) { Hmm, I don't see, what is changed.

Re: [Qemu-devel] [PATCH for-4.0] nbd: Permit simple error to NBD_CMD_BLOCK_STATUS

2019-03-25 Thread Eric Blake
On 3/25/19 11:05 AM, Eric Blake wrote: > More to the point, the behavior of qemu for a (structured) error reply > to NBD_CMD_BLOCK_STATUS with no extent->length was to keep the > connection alive (both before and after commit 7f86068d) - the > difference in behavior for this hunk of the patch is o

Re: [Qemu-devel] [PATCH for-4.0] nbd: Permit simple error to NBD_CMD_BLOCK_STATUS

2019-03-25 Thread Eric Blake
On 3/25/19 11:21 AM, Eric Blake wrote: > When you fix the first bug (the client setting iter.err on a simple > error reply from the server because the server's reply wasn't > structured, to now the client setting just iter.request_ret because it > successfully parsed an error out of the server's r

Re: [Qemu-devel] [PATCH for-4.0] nbd: Permit simple error to NBD_CMD_BLOCK_STATUS

2019-03-25 Thread Eric Blake
On 3/25/19 11:04 AM, Vladimir Sementsov-Ogievskiy wrote: +++ b/block/nbd-client.c @@ -718,9 +718,7 @@ static int nbd_co_receive_blockstatus_reply(NBDClientSession *s, bool received = false; assert(!extent->length); -NBD_FOREACH_REPLY_CHUNK(s, i

Re: [Qemu-devel] [PATCH for-4.0] nbd: Permit simple error to NBD_CMD_BLOCK_STATUS

2019-03-25 Thread Vladimir Sementsov-Ogievskiy
25.03.2019 17:44, Eric Blake wrote: > On 3/25/19 5:12 AM, Vladimir Sementsov-Ogievskiy wrote: >> 23.03.2019 17:24, Eric Blake wrote: >>> The NBD spec is clear that when structured replies are active, a >>> simple error reply is acceptable to any command except for >>> NBD_CMD_READ. However, we wer

Re: [Qemu-devel] [PATCH for-4.0] nbd: Permit simple error to NBD_CMD_BLOCK_STATUS

2019-03-25 Thread Eric Blake
On 3/25/19 9:44 AM, Eric Blake wrote: >>> >>> @@ -758,9 +756,11 @@ static int >>> nbd_co_receive_blockstatus_reply(NBDClientSession *s, >>> payload = NULL; >>> } >>> >>> -if (!extent->length && !iter.err) { >>> -error_setg(&iter.err, >>> - "Server did

Re: [Qemu-devel] [PATCH for-4.0] nbd: Permit simple error to NBD_CMD_BLOCK_STATUS

2019-03-25 Thread Eric Blake
On 3/25/19 5:12 AM, Vladimir Sementsov-Ogievskiy wrote: > 23.03.2019 17:24, Eric Blake wrote: >> The NBD spec is clear that when structured replies are active, a >> simple error reply is acceptable to any command except for >> NBD_CMD_READ. However, we were mistakenly requiring structured errors >

Re: [Qemu-devel] [PATCH for-4.0] nbd: Permit simple error to NBD_CMD_BLOCK_STATUS

2019-03-25 Thread Vladimir Sementsov-Ogievskiy
23.03.2019 17:24, Eric Blake wrote: > The NBD spec is clear that when structured replies are active, a > simple error reply is acceptable to any command except for > NBD_CMD_READ. However, we were mistakenly requiring structured errors > for NBD_CMD_BLOCK_STATUS, and hanging up on a server that ga

Re: [Qemu-devel] [PATCH for-4.0] nbd: Permit simple error to NBD_CMD_BLOCK_STATUS

2019-03-23 Thread Eric Blake
On 3/23/19 9:40 AM, Richard W.M. Jones wrote: > On Sat, Mar 23, 2019 at 09:24:55AM -0500, Eric Blake wrote: >> The NBD spec is clear that when structured replies are active, a >> simple error reply is acceptable to any command except for >> NBD_CMD_READ. However, we were mistakenly requiring struc

Re: [Qemu-devel] [PATCH for-4.0] nbd: Permit simple error to NBD_CMD_BLOCK_STATUS

2019-03-23 Thread Richard W.M. Jones
On Sat, Mar 23, 2019 at 09:24:55AM -0500, Eric Blake wrote: > The NBD spec is clear that when structured replies are active, a > simple error reply is acceptable to any command except for > NBD_CMD_READ. However, we were mistakenly requiring structured errors > for NBD_CMD_BLOCK_STATUS, and hangin

[Qemu-devel] [PATCH for-4.0] nbd: Permit simple error to NBD_CMD_BLOCK_STATUS

2019-03-23 Thread Eric Blake
The NBD spec is clear that when structured replies are active, a simple error reply is acceptable to any command except for NBD_CMD_READ. However, we were mistakenly requiring structured errors for NBD_CMD_BLOCK_STATUS, and hanging up on a server that gave a simple error (since qemu does not behav