Re: [Qemu-devel] [PATCH] LUKS: support preallocation in qemu-img

2019-07-11 Thread Kevin Wolf
Am 11.07.2019 um 15:50 hat Eric Blake geschrieben: > On 7/11/19 7:24 AM, Max Reitz wrote: > > >>> So it isn’t just me who expects these to pre-initialize the image to 0. > >>> Hm, although... I suppose @falloc technically does not specify whether > >>> the data reads as zeroes. I kind of find

Re: [Qemu-devel] [PATCH] LUKS: support preallocation in qemu-img

2019-07-11 Thread Daniel P . Berrangé
On Thu, Jul 11, 2019 at 08:50:56AM -0500, Eric Blake wrote: > On 7/11/19 7:24 AM, Max Reitz wrote: > > >>> So it isn’t just me who expects these to pre-initialize the image to 0. > >>> Hm, although... I suppose @falloc technically does not specify whether > >>> the data reads as zeroes. I kind

Re: [Qemu-devel] [PATCH] LUKS: support preallocation in qemu-img

2019-07-11 Thread Eric Blake
On 7/11/19 7:24 AM, Max Reitz wrote: >>> So it isn’t just me who expects these to pre-initialize the image to 0. >>> Hm, although... I suppose @falloc technically does not specify whether >>> the data reads as zeroes. I kind of find it to be implied, but, well... >> >> I personally don't

Re: [Qemu-devel] [PATCH] LUKS: support preallocation in qemu-img

2019-07-11 Thread Daniel P . Berrangé
On Thu, Jul 11, 2019 at 02:23:55PM +0200, Max Reitz wrote: > On 11.07.19 11:20, Daniel P. Berrangé wrote: > > On Wed, Jul 10, 2019 at 11:24:46PM +0200, Max Reitz wrote: > >> On 10.07.19 19:03, Maxim Levitsky wrote: > >>> preallocation=off and preallocation=metadata > >>> both allocate luks header

Re: [Qemu-devel] [PATCH] LUKS: support preallocation in qemu-img

2019-07-11 Thread Max Reitz
On 11.07.19 14:23, Max Reitz wrote: > On 11.07.19 11:20, Daniel P. Berrangé wrote: >> On Wed, Jul 10, 2019 at 11:24:46PM +0200, Max Reitz wrote: [...] >>> Hm. I would expect a preallocated image to read 0. But if you just >>> pass this through to the protocol layer, it won’t read 0. >> >> Yes,

Re: [Qemu-devel] [PATCH] LUKS: support preallocation in qemu-img

2019-07-11 Thread Max Reitz
On 11.07.19 11:20, Daniel P. Berrangé wrote: > On Wed, Jul 10, 2019 at 11:24:46PM +0200, Max Reitz wrote: >> On 10.07.19 19:03, Maxim Levitsky wrote: >>> preallocation=off and preallocation=metadata >>> both allocate luks header only, and preallocation=falloc/full >>> is passed to underlying file,

Re: [Qemu-devel] [PATCH] LUKS: support preallocation in qemu-img

2019-07-11 Thread Max Reitz
On 11.07.19 10:39, Maxim Levitsky wrote: > On Wed, 2019-07-10 at 23:52 +0200, Max Reitz wrote: >> On 10.07.19 23:24, Max Reitz wrote: >>> On 10.07.19 19:03, Maxim Levitsky wrote: preallocation=off and preallocation=metadata both allocate luks header only, and preallocation=falloc/full

Re: [Qemu-devel] [PATCH] LUKS: support preallocation in qemu-img

2019-07-11 Thread Daniel P . Berrangé
On Wed, Jul 10, 2019 at 11:24:46PM +0200, Max Reitz wrote: > On 10.07.19 19:03, Maxim Levitsky wrote: > > preallocation=off and preallocation=metadata > > both allocate luks header only, and preallocation=falloc/full > > is passed to underlying file, with the given image size. > > > > Note that

Re: [Qemu-devel] [PATCH] LUKS: support preallocation in qemu-img

2019-07-11 Thread Maxim Levitsky
On Wed, 2019-07-10 at 23:52 +0200, Max Reitz wrote: > On 10.07.19 23:24, Max Reitz wrote: > > On 10.07.19 19:03, Maxim Levitsky wrote: > > > preallocation=off and preallocation=metadata > > > both allocate luks header only, and preallocation=falloc/full > > > is passed to underlying file, with the

Re: [Qemu-devel] [PATCH] LUKS: support preallocation in qemu-img

2019-07-10 Thread Max Reitz
On 10.07.19 23:24, Max Reitz wrote: > On 10.07.19 19:03, Maxim Levitsky wrote: >> preallocation=off and preallocation=metadata >> both allocate luks header only, and preallocation=falloc/full >> is passed to underlying file, with the given image size. >> >> Note that the actual preallocated size

Re: [Qemu-devel] [PATCH] LUKS: support preallocation in qemu-img

2019-07-10 Thread Max Reitz
On 10.07.19 19:03, Maxim Levitsky wrote: > preallocation=off and preallocation=metadata > both allocate luks header only, and preallocation=falloc/full > is passed to underlying file, with the given image size. > > Note that the actual preallocated size is a bit smaller due > to luks header.

[Qemu-devel] [PATCH] LUKS: support preallocation in qemu-img

2019-07-10 Thread Maxim Levitsky
preallocation=off and preallocation=metadata both allocate luks header only, and preallocation=falloc/full is passed to underlying file, with the given image size. Note that the actual preallocated size is a bit smaller due to luks header. Fixes: