Re: [Qemu-devel] [PATCH v2 12/22] nbd/client: Improve error handling in nbd_negotiate_simple_meta_context()

2018-12-20 Thread Vladimir Sementsov-Ogievskiy
17.12.2018 18:30, Eric Blake wrote: > On 12/15/18 9:19 AM, Richard W.M. Jones wrote: >> On Sat, Dec 15, 2018 at 07:53:14AM -0600, Eric Blake wrote: >>> Always allocate space for the reply returned by the server and >>> hoist the trace earlier, as it is more interesting to trace the >>> server's rep

Re: [Qemu-devel] [PATCH v2 12/22] nbd/client: Improve error handling in nbd_negotiate_simple_meta_context()

2018-12-17 Thread Eric Blake
On 12/15/18 9:19 AM, Richard W.M. Jones wrote: On Sat, Dec 15, 2018 at 07:53:14AM -0600, Eric Blake wrote: Always allocate space for the reply returned by the server and hoist the trace earlier, as it is more interesting to trace the server's reply (even if it is unexpected) than parroting our r

Re: [Qemu-devel] [PATCH v2 12/22] nbd/client: Improve error handling in nbd_negotiate_simple_meta_context()

2018-12-17 Thread Eric Blake
On 12/15/18 9:19 AM, Richard W.M. Jones wrote: On Sat, Dec 15, 2018 at 07:53:14AM -0600, Eric Blake wrote: Always allocate space for the reply returned by the server and hoist the trace earlier, as it is more interesting to trace the server's reply (even if it is unexpected) than parroting our r

Re: [Qemu-devel] [PATCH v2 12/22] nbd/client: Improve error handling in nbd_negotiate_simple_meta_context()

2018-12-15 Thread Richard W.M. Jones
On Sat, Dec 15, 2018 at 07:53:14AM -0600, Eric Blake wrote: > Always allocate space for the reply returned by the server and > hoist the trace earlier, as it is more interesting to trace the > server's reply (even if it is unexpected) than parroting our > request only on success. After all, skippi

[Qemu-devel] [PATCH v2 12/22] nbd/client: Improve error handling in nbd_negotiate_simple_meta_context()

2018-12-15 Thread Eric Blake
Always allocate space for the reply returned by the server and hoist the trace earlier, as it is more interesting to trace the server's reply (even if it is unexpected) than parroting our request only on success. After all, skipping the allocation for a wrong size was merely a micro-optimization t