From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S73yj-0007OX-Vv for qemu-devel@nongnu.org; Mon, 12 Mar 2012 08:04:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S73yf-0005Lw-6X for qemu-devel@nongnu.org; Mon, 12 Mar 2012 08:03:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44520) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S73ye-0005KY-Uk for qemu-devel@nongnu.org; Mon, 12 Mar 2012 08:03:49 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2CC3loM000384 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 12 Mar 2012 08:03:47 -0400 Message-ID: <4F5DE621.9050803@redhat.com> Date: Mon, 12 Mar 2012 14:03:45 +0200 From: Avi Kivity MIME-Version: 1.0 References: <1331226917-6658-1-git-send-email-pbonzini@redhat.com> <1331226917-6658-8-git-send-email-pbonzini@redhat.com> <4F58F286.6060209@redhat.com> <4F5A3306.3010006@redhat.com> <4F5DD31C.20608@redhat.com> <4F5DD83A.3080309@redhat.com> In-Reply-To: <4F5DD83A.3080309@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 07/17] block: make high level discard operation always zero List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Paolo Bonzini , qemu-devel@nongnu.org On 03/12/2012 01:04 PM, Kevin Wolf wrote: > >> > >> qcow2 can't handle clusters that are referenced twice from the same L1 > >> table. This would require a reverse lookup to adjust the QCOW_O_COPIED > >> flags in the L2 tables containing the other references. > > > > Don't follow, sorry. What adjustment are you talking about? > > > > If it's a 1->0 transition, is it mandatory to adjust the flag? That is, > > it it legal to have a refcount of exactly one, but have the flag clear? > > According to the spec it's illegal and qemu-img check will complain, > too. In practice, I'm not entirely sure if it will cause real corruption > or just unnecessary COWs. I believe it may be the latter. We could retro-doc it but I'm not a huge fan of this practice. > But it's not worth the trouble anyway when we can have a real zero flag > in qcow3. ok. Thanks for the explanations. -- error compiling committee.c: too many arguments to function