[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 7/7] qemu-iotests: add 039 qcow2 lazy refcoun
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v2 7/7] qemu-iotests: add 039 qcow2 lazy refcounts test |
Date: |
Fri, 27 Jul 2012 08:56:30 +0100 |
On Thu, Jul 26, 2012 at 2:28 PM, Kevin Wolf <address@hidden> wrote:
> Am 25.07.2012 14:21, schrieb Stefan Hajnoczi:
>> This tests establishes the basic post-conditions of the qcow2 lazy
>> refcounts features:
>>
>> 1. If the image was closed normally, it is marked clean.
>>
>> 2. If an allocating write was performed and the image was not close
>> normally, then it is marked dirty.
>>
>> a. Written data can be read back successfully.
>> b. The image file can be repaired and will be marked clean again.
>>
>> Signed-off-by: Stefan Hajnoczi <address@hidden>
>
> I think an important case that is missing here is opening a dirty image
> rw without having run qemu-img check -r first.
I have added that test case.
>> +== 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".
Stefan
[Qemu-devel] [PATCH v2 2/7] qcow2: introduce dirty bit, Stefan Hajnoczi, 2012/07/25
[Qemu-devel] [PATCH v2 4/7] qemu-iotests: ignore qemu-img create lazy_refcounts output, Stefan Hajnoczi, 2012/07/25
[Qemu-devel] [PATCH v2 6/7] qemu-io: add "abort" command to simulate program crash, Stefan Hajnoczi, 2012/07/25
[Qemu-devel] [PATCH v2 1/7] docs: add dirty bit to qcow2 specification, Stefan Hajnoczi, 2012/07/25
[Qemu-devel] [PATCH v2 3/7] docs: add lazy refcounts bit to qcow2 specification, Stefan Hajnoczi, 2012/07/25