Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-28 Thread Kevin Wolf
Am 28.09.2016 um 11:00 hat Vladimir Sementsov-Ogievskiy geschrieben: > On 28.09.2016 11:56, Kevin Wolf wrote: > >Am 28.09.2016 um 10:37 hat Denis V. Lunev geschrieben: > >>On 09/28/2016 11:34 AM, Kevin Wolf wrote: > >>>Am 27.09.2016 um 20:59 hat Denis V. Lunev geschrieben: > On 09/27/2016 08:04

Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-28 Thread Vladimir Sementsov-Ogievskiy
On 28.09.2016 11:56, Kevin Wolf wrote: Am 28.09.2016 um 10:37 hat Denis V. Lunev geschrieben: On 09/28/2016 11:34 AM, Kevin Wolf wrote: Am 27.09.2016 um 20:59 hat Denis V. Lunev geschrieben: On 09/27/2016 08:04 PM, Paolo Bonzini wrote: On 27/09/2016 15:28, Denis V. Lunev wrote: On 09/27/2016

Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-28 Thread Kevin Wolf
Am 28.09.2016 um 10:37 hat Denis V. Lunev geschrieben: > On 09/28/2016 11:34 AM, Kevin Wolf wrote: > > Am 27.09.2016 um 20:59 hat Denis V. Lunev geschrieben: > >> On 09/27/2016 08:04 PM, Paolo Bonzini wrote: > >>> On 27/09/2016 15:28, Denis V. Lunev wrote: > On 09/27/2016 03:07 PM, Paolo Bonzi

Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-28 Thread Denis V. Lunev
On 09/28/2016 11:34 AM, Kevin Wolf wrote: > Am 27.09.2016 um 20:59 hat Denis V. Lunev geschrieben: >> On 09/27/2016 08:04 PM, Paolo Bonzini wrote: >>> On 27/09/2016 15:28, Denis V. Lunev wrote: On 09/27/2016 03:07 PM, Paolo Bonzini wrote: > - Original Message - >> From: "Denis

Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-28 Thread Kevin Wolf
Am 27.09.2016 um 20:59 hat Denis V. Lunev geschrieben: > On 09/27/2016 08:04 PM, Paolo Bonzini wrote: > > > > On 27/09/2016 15:28, Denis V. Lunev wrote: > >> On 09/27/2016 03:07 PM, Paolo Bonzini wrote: > >>> - Original Message - > From: "Denis V. Lunev" > To: "Paolo Bonzini" >

Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-27 Thread Denis V. Lunev
On 09/27/2016 08:04 PM, Paolo Bonzini wrote: > > On 27/09/2016 15:28, Denis V. Lunev wrote: >> On 09/27/2016 03:07 PM, Paolo Bonzini wrote: >>> - Original Message - From: "Denis V. Lunev" To: "Paolo Bonzini" Cc: "Vladimir Sementsov-Ogievskiy" , qemu-devel@nongnu.org,

Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-27 Thread Denis V. Lunev
On 09/27/2016 03:07 PM, Paolo Bonzini wrote: > > - Original Message - >> From: "Denis V. Lunev" >> To: "Paolo Bonzini" >> Cc: "Vladimir Sementsov-Ogievskiy" , >> qemu-devel@nongnu.org, qemu-bl...@nongnu.org, >> nbd-gene...@lists.sourceforge.net, a...@alex.org.uk, ebl...@redhat.com, >> k

Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-27 Thread Paolo Bonzini
On 27/09/2016 15:28, Denis V. Lunev wrote: > On 09/27/2016 03:07 PM, Paolo Bonzini wrote: >> >> - Original Message - >>> From: "Denis V. Lunev" >>> To: "Paolo Bonzini" >>> Cc: "Vladimir Sementsov-Ogievskiy" , >>> qemu-devel@nongnu.org, qemu-bl...@nongnu.org, >>> nbd-gene...@lists.sourc

Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-27 Thread Denis V. Lunev
On 09/27/2016 03:07 PM, Paolo Bonzini wrote: > > - Original Message - >> From: "Denis V. Lunev" >> To: "Paolo Bonzini" >> Cc: "Vladimir Sementsov-Ogievskiy" , >> qemu-devel@nongnu.org, qemu-bl...@nongnu.org, >> nbd-gene...@lists.sourceforge.net, a...@alex.org.uk, ebl...@redhat.com, >> k

Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-27 Thread Paolo Bonzini
- Original Message - > From: "Denis V. Lunev" > To: "Paolo Bonzini" > Cc: "Vladimir Sementsov-Ogievskiy" , > qemu-devel@nongnu.org, qemu-bl...@nongnu.org, > nbd-gene...@lists.sourceforge.net, a...@alex.org.uk, ebl...@redhat.com, > kw...@redhat.com, stefa...@redhat.com, > w...@uter.be

Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-27 Thread Denis V. Lunev
On 09/26/2016 03:46 PM, Vladimir Sementsov-Ogievskiy wrote: > This extension allows big requests for TRIM and WRITE_ZEROES through > special 'shift' parameter, which means that offset and length should be > shifted left by several bits. > > This is needed for efficient clearing large regions of the

Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-27 Thread Denis V. Lunev
On 09/27/2016 01:15 PM, Paolo Bonzini wrote: >> We could go in a different direction and export flag >> 'has_zero_init' which will report that the storage is >> initialized with all zeroes at the moment. In this >> case mirroring code will not fall into this >> branch. > Why don't you add the zero_

Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-27 Thread Paolo Bonzini
> We could go in a different direction and export flag > 'has_zero_init' which will report that the storage is > initialized with all zeroes at the moment. In this > case mirroring code will not fall into this > branch. Why don't you add the zero_init flag to QEMU's NBD driver instead? Thanks, P

Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-26 Thread Eric Blake
On 09/26/2016 07:51 AM, Paolo Bonzini wrote: >> +- bit 3, `NBD_CMD_FLAG_SHIFT`; This flag is valid for `NBD_CMD_TRIM` and >> + `NBD_CMD_WRITE_ZEROES`. If this flag is set the server shifts request >> + *length* and *offset* left by N bits, where N is defined by >> `NBD_OPT_SHIFT` >> + option o

Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-26 Thread Eric Blake
On 09/26/2016 07:46 AM, Vladimir Sementsov-Ogievskiy wrote: > This extension allows big requests for TRIM and WRITE_ZEROES through > special 'shift' parameter, which means that offset and length should be > shifted left by several bits. > > This is needed for efficient clearing large regions of th

Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-26 Thread Alex Bligh
> On 26 Sep 2016, at 14:54, Paolo Bonzini wrote: > > > Considering that NBD supports multiple outstanding requests, is it a big > deal to require one request per terabyte of storage? +1 Also I don't think we particularly want to make clearing the entire disk easy to do by mistake! This whole

Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-26 Thread Vladimir Sementsov-Ogievskiy
On 26.09.2016 15:51, Paolo Bonzini wrote: On 26/09/2016 14:46, Vladimir Sementsov-Ogievskiy wrote: This extension allows big requests for TRIM and WRITE_ZEROES through special 'shift' parameter, which means that offset and length should be shifted left by several bits. This is needed for effic

Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-26 Thread Alex Bligh
> On 26 Sep 2016, at 13:46, Vladimir Sementsov-Ogievskiy > wrote: > > Option reply types > > These values are used in the "reply type" field, sent by the server > @@ -872,7 +883,13 @@ valid may depend on negotiation during the handshake > phase. > > [extension](https://github.com/yoe/

Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-26 Thread Paolo Bonzini
On 26/09/2016 15:53, Vladimir Sementsov-Ogievskiy wrote: > On 26.09.2016 15:51, Paolo Bonzini wrote: >> This is very ad hoc. Can we instead have a block size common to all >> commands? Block devices in practice have one, in fact that's why >> they're called block devices... > > Block size can

Re: [Qemu-devel] [PATCH] proto: add 'shift' extension.

2016-09-26 Thread Paolo Bonzini
On 26/09/2016 14:46, Vladimir Sementsov-Ogievskiy wrote: > This extension allows big requests for TRIM and WRITE_ZEROES through > special 'shift' parameter, which means that offset and length should be > shifted left by several bits. > > This is needed for efficient clearing large regions of the