Re: [Qemu-devel] [PATCH v2 2/6] nbd/server: refactor negotiation functions parameters

2018-01-12 Thread Eric Blake
On 01/12/2018 04:18 AM, Vladimir Sementsov-Ogievskiy wrote: >>> hmm, should not it be at the end of nbd_negotiate() ? Looks OK anyway. >> Sure, I'll squash this in, for no real change in behavior: >> >> diff --git i/nbd/server.c w/nbd/server.c >> index c22d5e6ecf..3fd145592e 100644 >> --- i/nbd/se

Re: [Qemu-devel] [PATCH v2 2/6] nbd/server: refactor negotiation functions parameters

2018-01-12 Thread Vladimir Sementsov-Ogievskiy
11.01.2018 22:54, Eric Blake wrote: On 01/11/2018 11:55 AM, Vladimir Sementsov-Ogievskiy wrote: 11.01.2018 02:08, Eric Blake wrote: From: Vladimir Sementsov-Ogievskiy Instead of passing currently negotiating option and its length to many of negotiation functions let's just store them on NBDCl

Re: [Qemu-devel] [PATCH v2 2/6] nbd/server: refactor negotiation functions parameters

2018-01-11 Thread Eric Blake
On 01/11/2018 11:55 AM, Vladimir Sementsov-Ogievskiy wrote: > 11.01.2018 02:08, Eric Blake wrote: >> From: Vladimir Sementsov-Ogievskiy >> >> Instead of passing currently negotiating option and its length to >> many of negotiation functions let's just store them on NBDClient >> struct to be state-

Re: [Qemu-devel] [PATCH v2 2/6] nbd/server: refactor negotiation functions parameters

2018-01-11 Thread Vladimir Sementsov-Ogievskiy
11.01.2018 02:08, Eric Blake wrote: From: Vladimir Sementsov-Ogievskiy Instead of passing currently negotiating option and its length to many of negotiation functions let's just store them on NBDClient struct to be state-variables of negotiation phase. This unifies semantics of negotiation fun

[Qemu-devel] [PATCH v2 2/6] nbd/server: refactor negotiation functions parameters

2018-01-10 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Instead of passing currently negotiating option and its length to many of negotiation functions let's just store them on NBDClient struct to be state-variables of negotiation phase. This unifies semantics of negotiation functions and allows tracking changes of