From: Eric Blake <eblake@redhat.com>
To: Max Reitz <mreitz@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v12 03/14] qcow2: Optimize bdrv_make_empty()
Date: Fri, 10 Oct 2014 09:34:10 -0600 [thread overview]
Message-ID: <5437FC72.5080404@redhat.com> (raw)
In-Reply-To: <5437D1E3.4070302@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1210 bytes --]
On 10/10/2014 06:32 AM, Eric Blake wrote:
> On 08/26/2014 03:36 PM, Max Reitz wrote:
>> bdrv_make_empty() is currently only called if the current image
>> represents an external snapshot that has been committed to its base
>> image; it is therefore unlikely to have internal snapshots. In this
>> case, bdrv_make_empty() can be greatly sped up by emptying the L1 and
>> refcount table (while having the dirty flag set) and creating a trivial
>> refcount structure.
>>
>> If there are snapshots, fall back to the simple implementation (discard
>> all clusters).
Brain-wave...
>> + /* Refcounts will be broken utterly */
>> + ret = qcow2_mark_dirty(bs);
>
> qcow2_mark_dirty does assert(s->qcow_version >= 3). But this code can
> be reached when committing a qcow2 0.10 compat-level file, right?
What if you use the fallback of the slower code on compat=0.10 files?
It's no worse than it has always been, and after all, this patch is
about adding an optimization, not adding new behavior. It's okay if the
optimization is only usable on compat=1.1 files.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]
next prev parent reply other threads:[~2014-10-10 15:34 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-26 21:36 [Qemu-devel] [PATCH v12 00/14] qemu-img: Implement commit like QMP Max Reitz
2014-08-26 21:36 ` [Qemu-devel] [PATCH v12 01/14] qcow2: Allow "full" discard Max Reitz
2014-08-26 21:36 ` [Qemu-devel] [PATCH v12 02/14] qcow2: Implement bdrv_make_empty() Max Reitz
2014-08-26 21:36 ` [Qemu-devel] [PATCH v12 03/14] qcow2: Optimize bdrv_make_empty() Max Reitz
2014-10-10 12:32 ` Eric Blake
2014-10-10 15:34 ` Eric Blake [this message]
2014-10-11 10:27 ` Max Reitz
2014-08-26 21:36 ` [Qemu-devel] [PATCH v12 04/14] blockjob: Introduce block_job_complete_sync() Max Reitz
2014-08-26 21:36 ` [Qemu-devel] [PATCH v12 05/14] blockjob: Add "ready" field Max Reitz
2014-08-26 21:36 ` [Qemu-devel] [PATCH v12 06/14] iotests: Omit length/offset test in 040 and 041 Max Reitz
2014-08-26 21:36 ` [Qemu-devel] [PATCH v12 07/14] block/mirror: Improve progress report Max Reitz
2014-08-26 21:36 ` [Qemu-devel] [PATCH v12 08/14] qemu-img: Implement commit like QMP Max Reitz
2014-08-26 21:36 ` [Qemu-devel] [PATCH v12 09/14] qemu-img: Empty image after commit Max Reitz
2014-08-26 21:36 ` [Qemu-devel] [PATCH v12 10/14] qemu-img: Enable progress output for commit Max Reitz
2014-08-26 21:36 ` [Qemu-devel] [PATCH v12 11/14] qemu-img: Specify backing file " Max Reitz
2014-08-26 21:36 ` [Qemu-devel] [PATCH v12 12/14] iotests: Add _filter_qemu_img_map Max Reitz
2014-08-26 21:36 ` [Qemu-devel] [PATCH v12 13/14] iotests: Add test for backing-chain commits Max Reitz
2014-08-26 21:36 ` [Qemu-devel] [PATCH v12 14/14] iotests: Add test for qcow2's bdrv_make_empty Max Reitz
2014-10-10 16:47 ` Eric Blake
2014-10-11 10:27 ` Max Reitz
2014-10-08 19:29 ` [Qemu-devel] [PATCH v12 00/14] qemu-img: Implement commit like QMP Max Reitz
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=5437FC72.5080404@redhat.com \
--to=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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).