Received: from eggs.gnu.org ([2001:4830:134:3::10]:46057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1coprz-0005G5-5s for qemu-devel@nongnu.org; Fri, 17 Mar 2017 07:16:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1copry-0003nM-A6 for qemu-devel@nongnu.org; Fri, 17 Mar 2017 07:16:31 -0400 References: <82d604c8-068a-aff4-6037-e3cd247b3588@redhat.com> <819af057-3777-dffc-4670-895b8265fd01@kamp.de> From: Paolo Bonzini Message-ID: Date: Fri, 17 Mar 2017 12:16:22 +0100 MIME-Version: 1.0 In-Reply-To: <819af057-3777-dffc-4670-895b8265fd01@kamp.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven , qemu block , "qemu-devel@nongnu.org" Cc: Fam Zheng 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 conditionally avoid this second callout? In my case we have an additional > lseek for each cluster. For a 20GB file this are approx. 327k calls to lseek. And if the file has no preallocated metadata > it will likely not improve anything. And even if the metadata is prealloced what is the allocation status of the clusters? If the metadata is preallocated, cluster will (or should) show up as zero, speeding up the copy. Paolo