qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.12] qcow2: Reset free_cluster


From: Alberto Garcia
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH for-2.12] qcow2: Reset free_cluster_index when allocating a new refcount block
Date: Wed, 21 Mar 2018 14:15:57 +0100
User-agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu)

On Wed 21 Mar 2018 02:08:23 PM CET, Eric Blake wrote:
>>   - This scenario is harder to reach: in order to fill a 1-cluster
>>   refcount table the size of the image needs to be larger than
>>   (cluster_sizeĀ³ / refcount_bits) bytes, that's 16TB with the default
>>   parameters. So although it can be reproduced easily if you reduce
>>   the cluster size I think it's very infrequent under normal
>>   conditions.
>
> Yes, 16TB for default size, but only 2M for the best-case (512-byte
> cluster, 64-bit refcount), so still easy to write a test for.

The test case is indeed very easy:

   qemu-img create -f qcow2 -o cluster_size=512 hd.qcow2 16M
   qemu-io -c 'write 0 8222208' hd.qcow2
   qemu-io -c 'write 8222208 512' hd.qcow2

What I haven't done is debug the problem yet.

As I said I don't think this happens often in a real-world scenario, so
I wanted to fix the simple (and more common) problem first.

Berto



reply via email to

[Prev in Thread] Current Thread [Next in Thread]