Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-31 Thread Paolo Bonzini
On 31/03/2017 09:55, Peter Lieven wrote: >>> Would it be an idea to introduce an inverse flag live BDRV_BLOCK_NOT_ZERO >>> for cases where we know that there is really DATA and thus can avoid the >>> second callout? >> How would you know that a block is nonzero? > I would trust the metadata. At l

Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-31 Thread Peter Lieven
Am 27.03.2017 um 17:06 schrieb Paolo Bonzini: > > On 27/03/2017 15:21, Peter Lieven wrote: I stumbled across the issue with lseek on a tmpfs because in the build process for our templates I temporarily have vmdks on a tmpfs and it takes ages before qemu-img convert starts to run

Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-27 Thread Paolo Bonzini
On 27/03/2017 15:21, Peter Lieven wrote: >>> >>> I stumbled across the issue with lseek on a tmpfs because in the >>> build process for our templates >>> I temporarily have vmdks on a tmpfs and it takes ages before qemu-img >>> convert starts to run (it iterates >>> over every 64kb cluster with t

Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-27 Thread Peter Lieven
Am 20.03.2017 um 17:56 schrieb Paolo Bonzini: On 20/03/2017 17:43, Peter Lieven wrote: Am 20.03.2017 um 15:05 schrieb Paolo Bonzini: On 20/03/2017 14:35, Peter Lieven wrote: Am 20.03.2017 um 14:23 schrieb Paolo Bonzini: On 20/03/2017 14:13, Peter Lieven wrote: Am 20.03.2017 um 13:47 schrieb

Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-20 Thread Paolo Bonzini
On 20/03/2017 17:43, Peter Lieven wrote: > Am 20.03.2017 um 15:05 schrieb Paolo Bonzini: >> >> On 20/03/2017 14:35, Peter Lieven wrote: >>> Am 20.03.2017 um 14:23 schrieb Paolo Bonzini: On 20/03/2017 14:13, Peter Lieven wrote: > Am 20.03.2017 um 13:47 schrieb Peter Lieven: >> commit

Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-20 Thread Peter Lieven
Am 20.03.2017 um 15:05 schrieb Paolo Bonzini: > > On 20/03/2017 14:35, Peter Lieven wrote: >> Am 20.03.2017 um 14:23 schrieb Paolo Bonzini: >>> On 20/03/2017 14:13, Peter Lieven wrote: Am 20.03.2017 um 13:47 schrieb Peter Lieven: > commit 5daa74a6ebce7543aaad178c4061dc087bb4c705 > Auth

Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-20 Thread Paolo Bonzini
On 20/03/2017 14:35, Peter Lieven wrote: > Am 20.03.2017 um 14:23 schrieb Paolo Bonzini: >> On 20/03/2017 14:13, Peter Lieven wrote: >>> Am 20.03.2017 um 13:47 schrieb Peter Lieven: commit 5daa74a6ebce7543aaad178c4061dc087bb4c705 Author: Paolo Bonzini Date: Wed Sep 4 19:00:38 20

Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-20 Thread Peter Lieven
Am 20.03.2017 um 14:23 schrieb Paolo Bonzini: > > On 20/03/2017 14:13, Peter Lieven wrote: >> Am 20.03.2017 um 13:47 schrieb Peter Lieven: >>> Am 20.03.2017 um 12:49 schrieb Fam Zheng: On Mon, 03/20 12:21, Paolo Bonzini wrote: > On 20/03/2017 03:46, Fam Zheng wrote: >> On Fri, 03/17 12

Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-20 Thread Paolo Bonzini
On 20/03/2017 14:13, Peter Lieven wrote: > Am 20.03.2017 um 13:47 schrieb Peter Lieven: >> Am 20.03.2017 um 12:49 schrieb Fam Zheng: >>> On Mon, 03/20 12:21, Paolo Bonzini wrote: On 20/03/2017 03:46, Fam Zheng wrote: > On Fri, 03/17 12:20, Peter Lieven wrote: >> Am 17.03.2017 um 12:1

Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-20 Thread Peter Lieven
Am 20.03.2017 um 13:47 schrieb Peter Lieven: > Am 20.03.2017 um 12:49 schrieb Fam Zheng: >> On Mon, 03/20 12:21, Paolo Bonzini wrote: >>> On 20/03/2017 03:46, Fam Zheng wrote: On Fri, 03/17 12:20, Peter Lieven wrote: > Am 17.03.2017 um 12:16 schrieb Paolo Bonzini: >> On 17/03/2017 12:1

Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-20 Thread Peter Lieven
Am 20.03.2017 um 12:49 schrieb Fam Zheng: > On Mon, 03/20 12:21, Paolo Bonzini wrote: >> >> On 20/03/2017 03:46, Fam Zheng wrote: >>> On Fri, 03/17 12:20, Peter Lieven wrote: Am 17.03.2017 um 12:16 schrieb Paolo Bonzini: > On 17/03/2017 12:11, Peter Lieven wrote: like VMDK or QCOW

Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-20 Thread Peter Lieven
Am 20.03.2017 um 12:49 schrieb Fam Zheng: > On Mon, 03/20 12:21, Paolo Bonzini wrote: >> >> On 20/03/2017 03:46, Fam Zheng wrote: >>> On Fri, 03/17 12:20, Peter Lieven wrote: Am 17.03.2017 um 12:16 schrieb Paolo Bonzini: > On 17/03/2017 12:11, Peter Lieven wrote: like VMDK or QCOW

Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-20 Thread Fam Zheng
On Mon, 03/20 12:21, Paolo Bonzini wrote: > > > On 20/03/2017 03:46, Fam Zheng wrote: > > On Fri, 03/17 12:20, Peter Lieven wrote: > >> Am 17.03.2017 um 12:16 schrieb Paolo Bonzini: > >>> > >>> On 17/03/2017 12:11, Peter Lieven wrote: > >> like VMDK or QCOW2 shouldn't we trust the information

Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-20 Thread Paolo Bonzini
On 20/03/2017 03:46, Fam Zheng wrote: > On Fri, 03/17 12:20, Peter Lieven wrote: >> Am 17.03.2017 um 12:16 schrieb Paolo Bonzini: >>> >>> On 17/03/2017 12:11, Peter Lieven wrote: >> like VMDK or QCOW2 shouldn't we trust the information from the l2 tables >> in the VMDK or QCOW2? > It

Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-19 Thread Fam Zheng
On Fri, 03/17 12:20, Peter Lieven wrote: > Am 17.03.2017 um 12:16 schrieb Paolo Bonzini: > > > > On 17/03/2017 12:11, Peter Lieven wrote: > like VMDK or QCOW2 shouldn't we trust the information from the l2 tables > in the VMDK or QCOW2? > >>> It provides additional information, for examp

Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-18 Thread Peter Lieven
Am 17.03.2017 um 15:51 schrieb Paolo Bonzini: > > On 17/03/2017 12:24, Fam Zheng wrote: >> On Fri, 03/17 12:16, Paolo Bonzini wrote: >>> >>> On 17/03/2017 12:11, Peter Lieven wrote: >> like VMDK or QCOW2 shouldn't we trust the information from the l2 tables >> in the VMDK or QCOW2? > I

Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-17 Thread Paolo Bonzini
On 17/03/2017 12:24, Fam Zheng wrote: > On Fri, 03/17 12:16, Paolo Bonzini wrote: >> >> >> On 17/03/2017 12:11, Peter Lieven wrote: > like VMDK or QCOW2 shouldn't we trust the information from the l2 tables > in the VMDK or QCOW2? It provides additional information, for example it w

Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-17 Thread Fam Zheng
On Fri, 03/17 12:16, Paolo Bonzini wrote: > > > On 17/03/2017 12:11, Peter Lieven wrote: > >>> like VMDK or QCOW2 shouldn't we trust the information from the l2 tables > >>> in the VMDK or QCOW2? > >> It provides additional information, for example it works better with > >> prealloc=metadata. >

Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-17 Thread Peter Lieven
Am 17.03.2017 um 12:16 schrieb Paolo Bonzini: > > On 17/03/2017 12:11, Peter Lieven wrote: like VMDK or QCOW2 shouldn't we trust the information from the l2 tables in the VMDK or QCOW2? >>> It provides additional information, for example it works better with >>> prealloc=metadata. >> Oka

Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-17 Thread Paolo Bonzini
On 17/03/2017 12:11, Peter Lieven wrote: >>> like VMDK or QCOW2 shouldn't we trust the information from the l2 tables in >>> the VMDK or QCOW2? >> It provides additional information, for example it works better with >> prealloc=metadata. > Okay, understood. Can you imagine of a away to condition

Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-17 Thread Peter Lieven
Am 17.03.2017 um 11:59 schrieb Paolo Bonzini: > > On 17/03/2017 11:45, Peter Lieven wrote: >> Hi, >> >> >> I tried to debug why qemu-img convert with a VMDK source laying on a tmpfs >> is horrible slow. >> >> For some reason a lseek on a tmpfs is slow. Strictly speaking the lseek in >> find_alloc

Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-17 Thread Paolo Bonzini
On 17/03/2017 11:45, Peter Lieven wrote: > Hi, > > > I tried to debug why qemu-img convert with a VMDK source laying on a tmpfs is > horrible slow. > > For some reason a lseek on a tmpfs is slow. Strictly speaking the lseek in > find_allocation in file-posix.c > > is slow. > > > When qemu

[Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-17 Thread Peter Lieven
Hi, I tried to debug why qemu-img convert with a VMDK source laying on a tmpfs is horrible slow. For some reason a lseek on a tmpfs is slow. Strictly speaking the lseek in find_allocation in file-posix.c is slow. When qemu-img convert iterates over all sectors of a VMDK file to check their