qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v4 24/30] qcow2: Clear the L2 bitmap when allocating a compre


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH v4 24/30] qcow2: Clear the L2 bitmap when allocating a compressed cluster
Date: Sat, 25 Apr 2020 09:38:06 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

24.04.2020 21:41, Alberto Garcia wrote:
On Fri 24 Apr 2020 08:15:04 PM CEST, Vladimir Sementsov-Ogievskiy 
<address@hidden> wrote:
AFAIK, now compressed clusters can't be used in scenarios with guest,
as qcow2 driver doesn't support rewriting them.

You can write to those images just fine, it's just not efficient because
you have to COW the compressed clusters.

No, rewriting doesn't work:

[root@kvm master]# ./qemu-img create -f qcow2 x 10M
Formatting 'x', fmt=qcow2 size=10485760 cluster_size=65536 lazy_refcounts=off 
refcount_bits=16
[root@kvm master]# ./qemu-io -c 'write -c 0 64K' x
wrote 65536/65536 bytes at offset 0
64 KiB, 1 ops; 00.23 sec (278.708 KiB/sec and 4.3548 ops/sec)
[root@kvm master]# ./qemu-io -c 'write -c 0 64K' x
write failed: Input/output error



Or am I wrong? And we normally don't combine normal and compressed
clusters together in one image.

As soon as you start writing to an image with compressed clusters you'll
have a combination of both.

Ah, you mean, rewriting compressed clusters by normal.. So the use-case is just 
take compressed backup image and use it for the guest, instead of converting 
first.. It makes sense.


But it's true that you don't have an image with compressed clusters if
what you're looking for is performance. So I wouldn't add support for
this if it complicates things too much.

Berto



--
Best regards,
Vladimir



reply via email to

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