Re: [Qemu-block] [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

Re: [Qemu-block] [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

Re: [Qemu-block] [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

Re: [Qemu-block] [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-block] [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" >

Re: [Qemu-block] [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

Re: [Qemu-block] [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-de...@nongnu.org, qemu-block@nongnu.org, >>

Re: [Qemu-block] [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-de...@nongnu.org, qemu-block@nongnu.org, >>

Re: [Qemu-block] [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-de...@nongnu.org, qemu-block@nongnu.org, > nbd-gene...@lists.sourceforge.net, a...@alex.org.uk,

Re: [Qemu-block] [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

Re: [Qemu-block] [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

Re: [Qemu-block] [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,

Re: [Qemu-block] [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

Re: [Qemu-block] [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

Re: [Qemu-block] [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-block] [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

Re: [Qemu-block] [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. > >

Re: [Qemu-block] [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

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

2016-09-26 Thread Vladimir Sementsov-Ogievskiy
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 disk (up to the whole disk). Signed-off-by: Vladimir