From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvmuT-0005Y3-Sg for qemu-devel@nongnu.org; Mon, 30 Jul 2012 06:09:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SvmuN-0002X7-VB for qemu-devel@nongnu.org; Mon, 30 Jul 2012 06:09:09 -0400 Received: from mail-bk0-f45.google.com ([209.85.214.45]:64541) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvmuN-0002Ws-JE for qemu-devel@nongnu.org; Mon, 30 Jul 2012 06:09:03 -0400 Received: by bkcji1 with SMTP id ji1so2354544bkc.4 for ; Mon, 30 Jul 2012 03:09:02 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <50124C4D.6020407@redhat.com> References: <1343218884-14980-1-git-send-email-stefanha@linux.vnet.ibm.com> <1343218884-14980-8-git-send-email-stefanha@linux.vnet.ibm.com> <501145F7.6010705@redhat.com> <50124C4D.6020407@redhat.com> Date: Mon, 30 Jul 2012 11:09:02 +0100 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Qemu-devel] [PATCH v2 7/7] qemu-iotests: add 039 qcow2 lazy refcounts test List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Khoa Huynh , Anthony Liguori , Stefan Hajnoczi , qemu-devel@nongnu.org On Fri, Jul 27, 2012 at 9:07 AM, Kevin Wolf wrote: > Am 27.07.2012 09:56, schrieb Stefan Hajnoczi: >> On Thu, Jul 26, 2012 at 2:28 PM, Kevin Wolf wrote: >>> Am 25.07.2012 14:21, schrieb Stefan Hajnoczi: >>>> +== Read-only access must still work == >>>> +read 512/512 bytes at offset 0 >>>> +512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) >>>> +incompatible_features 0x1 >>>> + >>>> +== Repairing the image file must succeed == >>>> +ERROR OFLAG_COPIED: offset=8000000000050000 refcount=0 >>>> +Repairing cluster 5 refcount=0 reference=1 >>>> +No errors were found on the image. >>>> +incompatible_features 0x0 >>> >>> I wonder what happened to the "The following inconsistencies were found >>> and repaired" message. Most likely not a problem with qemu-iotests, >>> though, but something unexpected in qemu-img. >> >> It's because opening a qcow2 image read/write when the dirty flag is >> set causes a repair. This accounts for the "Repairing cluster 5 ..." >> message. >> >> Then qemu-img check -r all calls bdrv_check() on an already repaired >> image file and we get the "No errors were found on the image". > > I see. Not exactly how it was intended... Do we need a BDRV_O_CHECK flag > that prevents the automatic repair or should we just live with the > suboptimal output when lazy refcounting is enabled? You noticed the issue so others might notice it too. I'll send a patch including qcow2 and qed changes to fix this using BDRV_O_CHECK. Stefan