qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP
Date: Thu, 29 Sep 2016 14:48:15 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 29.09.2016 um 14:14 hat Paolo Bonzini geschrieben:
> On 29/09/2016 12:39, Kevin Wolf wrote:
> >> > Because there is another check of pass-discard-request value in
> >> > update_refcount:
> >> > 
> >> >         if (refcount == 0 && s->discard_passthrough[type]) {
> >> >             update_refcount_discard(bs, cluster_offset, s->cluster_size);
> >> >         }
> > What I mean is that in the second case, you're still uselessly
> > deallocating the cluster on the qcow2 level while you can't reclaim it
> > on the filesystem level. So it would be better to leave it allocated in
> > qcow2, too, so that you don't get an expensive reallocation the next
> > time you write to it.
> 
> But if you do a qemu-img convert, the deallocated cluster wouldn't be in
> the destination.

Right. I still think that there has to be an option to keep the image
fully allocated. Perhaps what we really need to check is BDRV_O_UNMAP.

Kevin



reply via email to

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