Re: [Qemu-block] import thin provisioned disks with image upload

2017-12-11 Thread Max Reitz
On 2017-12-08 21:56, Nir Soffer wrote: > On Fri, Dec 8, 2017 at 5:23 PM Max Reitz > wrote: [...] > What "stat" reports as "size" I'd call the length (what qemu-img info > calls "virtual size" for raw images).  > > > raw images are not an issue since the virtu

Re: [Qemu-block] import thin provisioned disks with image upload

2017-12-08 Thread Nir Soffer
On Fri, Dec 8, 2017 at 5:23 PM Max Reitz wrote: > On 2017-12-07 21:33, Nir Soffer wrote: > > [...] > > > > > Trying harder... > > > > > > The term "file size" is ambiguous in this context... > > > > > > It is not. file size is what you get from stat: > > > > $ truncate -s 1g empty > > > > $ s

Re: [Qemu-block] import thin provisioned disks with image upload

2017-12-08 Thread Max Reitz
On 2017-12-07 21:33, Nir Soffer wrote: [...] > > Trying harder... >   > > The term "file size" is ambiguous in this context... > > > It is not. file size is what you get from stat: > > $ truncate -s 1g empty > > $ stat empty  >   File: 'empty' >   Size: 1073741824Blocks: 0          IO B

Re: [Qemu-block] import thin provisioned disks with image upload

2017-12-07 Thread Gianluca Cecchi
On Thu, Dec 7, 2017 at 9:33 PM, Nir Soffer wrote: > > For transferring images over http, there is no way to avoid sending > unused blocks, except compression. > OK, understood >> Maybe this file was crated with preallocation=full? >>> >> >> In virt-manager there is not this logic by default. >

Re: [Qemu-block] import thin provisioned disks with image upload

2017-12-07 Thread Nir Soffer
On Fri, Dec 8, 2017 at 1:35 AM Gianluca Cecchi wrote: > On Thu, Dec 7, 2017 at 9:33 PM, Nir Soffer wrote: > >> >> For transferring images over http, there is no way to avoid sending >> unused blocks, except compression. >> > > OK, understood > > >>> Maybe this file was crated with preallocation=

Re: [Qemu-block] import thin provisioned disks with image upload

2017-12-07 Thread Eric Blake
On 12/07/2017 02:33 PM, Nir Soffer wrote: > $ truncate -s 1g empty > > $ stat empty > File: 'empty' > Size: 1073741824 Blocks: 0 IO Block: 4096 regular file > ... > > $ qemu-img info empty > image: empty > file format: raw > virtual size: 1.0G (1073741824 bytes) > disk size: 0 >

Re: [Qemu-block] import thin provisioned disks with image upload

2017-12-07 Thread Nir Soffer
On Thu, Dec 7, 2017 at 10:15 AM Gianluca Cecchi wrote: > On Thu, Dec 7, 2017 at 1:28 AM, Nir Soffer wrote: > >> >> >> On Thu, Dec 7, 2017 at 1:22 AM Gianluca Cecchi >> wrote: >> >>> On Wed, Dec 6, 2017 at 11:42 PM, Nir Soffer wrote: >>> > > BTW: I notice that the disk seems p