From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55873) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEzp2-0005t0-Ku for qemu-devel@nongnu.org; Wed, 27 Apr 2011 04:10:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QEzoy-0005Oh-DJ for qemu-devel@nongnu.org; Wed, 27 Apr 2011 04:10:08 -0400 Received: from mail-yx0-f173.google.com ([209.85.213.173]:58244) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEzoy-0005OU-9L for qemu-devel@nongnu.org; Wed, 27 Apr 2011 04:10:04 -0400 Received: by yxk8 with SMTP id 8so429566yxk.4 for ; Wed, 27 Apr 2011 01:10:04 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4DB7880C.4090302@fnarfbargle.com> References: <4DB7880C.4090302@fnarfbargle.com> Date: Wed, 27 Apr 2011 09:10:03 +0100 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Qemu-img convert with -B List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Brad Campbell Cc: qemu-devel@nongnu.org On Wed, Apr 27, 2011 at 4:05 AM, Brad Campbell wrote: > I see there is a bug raised about the behaviour of qemu-img when used to = convert using an output backing file. It allocates every sector whether or = not it already exists in the output backing file. Please post the link to the bug report. > Can someone verify these assumptions for me please? > - I can bdrv_open() a file that has a chain of backing files, and the > following is true : > =A0 =A0 =A0 =A0- bdrv_read() returns the most recently allocated sector c= ontents (or > 0) Correct. > =A0 =A0 =A0 =A0- bdrv_is_allocated() will return false only if that secto= r is not > allocated in _any_ of the files in the chain Incorrect. It returns true if the sector is allocated in the top-most file, false otherwise. In other words bdrv_is_allocated() is flat, it does not traverse a chain of backing files. Stefan