All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/8] block/qcow2: Improve (?) zero cluster expansion
@ 2014-07-25 18:07 Max Reitz
  2014-07-25 18:07 ` [Qemu-devel] [PATCH 1/8] block: Add status callback to bdrv_amend_options() Max Reitz
                   ` (7 more replies)
  0 siblings, 8 replies; 20+ messages in thread
From: Max Reitz @ 2014-07-25 18:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Stefan Hajnoczi, Max Reitz

The main purpose of this series is to add a progress report to
qemu-img amend. This is achieved by adding a callback function to
bdrv_amend_options() - the reasons for this choice are explained in
patch 1.

While adapting qcow2's expand_zero_clusters_in_l1() accordingly, I
noticed a way to simplify it and get rid of the rather ugly bitmap used
there (patch 6) and even found a way to optimize it (patch 7).

However, Kevin already expressed strong dislike about that patch 7, as
it complicates things in a function which should rarely ever be used.

I personally don't have a strong opinion on the topic. The optimization
should significantly increase the expansion performance; on the other
hand, it makes the code equally more complicated.

Patch 8 does not really depend on patch 7; it contains a test case
specifically for patch 7, but of course it works without that patch just
as well.

Therefore, we can simply drop patch 7 if we don't need it.


In this version, the total size of the "zero cluster expansion job" is
the number of zero cluster entries in all L2 tables multiplied by the
cluster size. This of course requires that number to be calculated
beforehand, which is complicated as well. An easier way (suggested by
Kevin) would be to simply use the number of all L2 entries as a basis.
This would not be as exact, but much easier to implement.

Since I already implemented the more complicated version of everything,
I'm just sending it as-is. I'll write an alternative to patch 5 which
uses the simpler variant and send it for comparison later.


This series depends on v2 of my "qemu-img: Allow source cache mode
specification" seires.


Max Reitz (8):
  block: Add status callback to bdrv_amend_options()
  qemu-img: Add progress output for amend
  qemu-img: Fix insignifcant memleak
  block/qcow2: Make get_refcount() global
  block/qcow2: Implement status CB for amend
  block/qcow2: Simplify shared L2 handling in amend
  block/qcow2: Speed up zero cluster expansion
  iotests: Expand test 061

 block.c                    |   5 +-
 block/qcow2-cluster.c      | 319 ++++++++++++++++++++++++++++++++++-----------
 block/qcow2-refcount.c     |  23 ++--
 block/qcow2.c              |  10 +-
 block/qcow2.h              |   5 +-
 include/block/block.h      |   5 +-
 include/block/block_int.h  |   3 +-
 qemu-img.c                 |  30 ++++-
 tests/qemu-iotests/061     |  41 ++++++
 tests/qemu-iotests/061.out |  40 ++++++
 tests/qemu-iotests/group   |   2 +-
 11 files changed, 379 insertions(+), 104 deletions(-)

-- 
2.0.1

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2014-07-30 20:41 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-25 18:07 [Qemu-devel] [PATCH 0/8] block/qcow2: Improve (?) zero cluster expansion Max Reitz
2014-07-25 18:07 ` [Qemu-devel] [PATCH 1/8] block: Add status callback to bdrv_amend_options() Max Reitz
2014-07-30 14:50   ` Eric Blake
2014-07-25 18:07 ` [Qemu-devel] [PATCH 2/8] qemu-img: Add progress output for amend Max Reitz
2014-07-30 14:55   ` Eric Blake
2014-07-30 20:20     ` Max Reitz
2014-07-25 18:07 ` [Qemu-devel] [PATCH 3/8] qemu-img: Fix insignifcant memleak Max Reitz
2014-07-30 14:56   ` Eric Blake
2014-07-25 18:07 ` [Qemu-devel] [PATCH 4/8] block/qcow2: Make get_refcount() global Max Reitz
2014-07-30 15:04   ` Eric Blake
2014-07-25 18:07 ` [Qemu-devel] [PATCH 5/8] block/qcow2: Implement status CB for amend Max Reitz
2014-07-30 15:23   ` Eric Blake
2014-07-25 18:07 ` [Qemu-devel] [PATCH 6/8] block/qcow2: Simplify shared L2 handling in amend Max Reitz
2014-07-30 15:36   ` Eric Blake
2014-07-25 18:07 ` [Qemu-devel] [PATCH 7/8] block/qcow2: Speed up zero cluster expansion Max Reitz
2014-07-30 16:14   ` Eric Blake
2014-07-30 20:31     ` Max Reitz
2014-07-30 20:31     ` Eric Blake
2014-07-30 20:41       ` Max Reitz
2014-07-25 18:07 ` [Qemu-devel] [PATCH 8/8] iotests: Expand test 061 Max Reitz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.