From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48501) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XB7Xe-0001cC-Lc for qemu-devel@nongnu.org; Sat, 26 Jul 2014 15:22:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XB7XY-0005YP-Ch for qemu-devel@nongnu.org; Sat, 26 Jul 2014 15:22:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60393) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XB7XY-0005YL-58 for qemu-devel@nongnu.org; Sat, 26 Jul 2014 15:21:56 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6QJLsaQ014314 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sat, 26 Jul 2014 15:21:55 -0400 From: Max Reitz Date: Sat, 26 Jul 2014 21:22:04 +0200 Message-Id: <1406402531-9278-1-git-send-email-mreitz@redhat.com> Subject: [Qemu-devel] [PATCH alt 0/7] block/qcow2: Improve zero cluster expansion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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). This series depends on v2 of my "qemu-img: Allow source cache mode specification" series. This series is an alternative of the one with the same name (and one additional patch) without the tag "alt"; the main difference is that the first version adds optimizations and be as exact as possible, whereas this version rather tries to be as simple as possible (because the code being touched is rarely ever used). The differences are the following: - switched patches 4 and 5, because 5 (now 4) does not rely on 4 (now 5) in this version - patch 5 (here: 4) uses a far simpler model to track progress (instead of counting the expanded zero clusters, it counts the number of visited L1 entries) - patch 6 had to be rebased on top of it - patch 7 has been dropped (it optimizes zero cluster expansion in exchange for more complicated code for a function which should be rarely ever used) - patch 8 (here: 7) had to be adapted accordingly: - dropped the test case for patch 7 (did not fail without it, but did not make any sense either) - different progress output due to the differences in patch 5 (here: 4) git-upstream-diff output against the non-alt version: Key: [----] : patches are identical [####] : number of functional differences between upstream/downstream patch [down] : patch is downstream-only The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively 001/7:[----] [--] 'block: Add status callback to bdrv_amend_options()' 002/7:[----] [--] 'qemu-img: Add progress output for amend' 003/7:[----] [--] 'qemu-img: Fix insignifcant memleak' 004/7:[0137] [FC] 'block/qcow2: Implement status CB for amend' 005/7:[----] [--] 'block/qcow2: Make get_refcount() global' 006/7:[0011] [FC] 'block/qcow2: Simplify shared L2 handling in amend' 007/7:[0026] [FC] 'iotests: Expand test 061' Max Reitz (7): block: Add status callback to bdrv_amend_options() qemu-img: Add progress output for amend qemu-img: Fix insignifcant memleak block/qcow2: Implement status CB for amend block/qcow2: Make get_refcount() global block/qcow2: Simplify shared L2 handling in amend iotests: Expand test 061 block.c | 5 +- block/qcow2-cluster.c | 114 +++++++++++++++++++++------------------------ 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 | 27 +++++++++++ tests/qemu-iotests/061.out | 32 +++++++++++++ tests/qemu-iotests/group | 2 +- 11 files changed, 171 insertions(+), 85 deletions(-) -- 2.0.3