[Qemu-block] [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: https://bugzilla.redhat.com/show_bug.cgi?id=153495

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

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

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

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