qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <famz@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
	Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP
Date: Thu, 29 Sep 2016 14:14:09 +0200	[thread overview]
Message-ID: <b022388f-a773-771f-0166-2f2873e5b4a7@redhat.com> (raw)
In-Reply-To: <20160929103957.GG5742@noname.redhat.com>



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.

Paolo

  reply	other threads:[~2016-09-29 12:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-28  7:04 [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP Fam Zheng
2016-09-28 16:11 ` Max Reitz
2016-09-29  2:21   ` Fam Zheng
2016-09-29  7:58     ` Paolo Bonzini
2016-09-29  8:10       ` Fam Zheng
2016-10-01 13:08         ` Max Reitz
2016-09-29  9:29 ` Kevin Wolf
2016-09-29  9:55   ` Fam Zheng
2016-09-29 10:39     ` Kevin Wolf
2016-09-29 12:14       ` Paolo Bonzini [this message]
2016-09-29 12:48         ` Kevin Wolf
2016-09-29 12:50           ` Paolo Bonzini
2016-09-29 12:56             ` Paolo Bonzini
2016-09-30  2:04       ` Fam Zheng
2016-09-30 12:38         ` Kevin Wolf
2016-10-12  1:14 ` Fam Zheng
2016-10-12  8:42   ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b022388f-a773-771f-0166-2f2873e5b4a7@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).