From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xbwvh-0000f9-FY for qemu-devel@nongnu.org; Wed, 08 Oct 2014 15:29:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xbwvb-0005eB-VC for qemu-devel@nongnu.org; Wed, 08 Oct 2014 15:29:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21833) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xbwvb-0005e4-Mb for qemu-devel@nongnu.org; Wed, 08 Oct 2014 15:29:39 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s98JTdgT013702 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 8 Oct 2014 15:29:39 -0400 Message-ID: <5435909F.2010402@redhat.com> Date: Wed, 08 Oct 2014 21:29:35 +0200 From: Max Reitz MIME-Version: 1.0 References: <1409088987-17207-1-git-send-email-mreitz@redhat.com> In-Reply-To: <1409088987-17207-1-git-send-email-mreitz@redhat.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v12 00/14] qemu-img: Implement commit like QMP List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Fam Zheng , Stefan Hajnoczi On 26.08.2014 23:36, Max Reitz wrote: > qemu-img should use QMP commands whenever possible in order to ensure > feature completeness of both online and offline image operations. For > the "commit" command, this is relatively easy, so implement it first > (in the hope that indeed others will follow). > > As qemu-img does not have access to QMP (due to QMP being intertwined > with basically everything in qemu), we cannot directly use QMP, but at > least use the functions the corresponding QMP commands are using (which > would be "block-commit", in this case). > > > As of this version, this series depends on my series > '[PATCH v3 00/10] qcow2: Fix image repairing' (or on any later version). > > > Patches without a Reviewed-by: 3 and 14 Ping. I kind of want to make Kevin responsible for the state in which patch 3 is now, so I'm hoping he'll review it despite of the now official reviewer policy. ;-) Although everyone is welcome; patch 3 is now much more simple than in previous versions, so don't be afraid. Max > v12: > - Rewrote patch 3 according to Kevin's proposal (in reply to v8): > Instead of keeping the image constantly clean and recreating a new > refcount structure in unallocated clusters, just mark the image dirty, > overwrite the beginning of the image with zeroes, place the reftable > and the L1 table there and go from there. > This is much easier than the previous version but was not possible > like this before, because qcow2's repair function could not repair > images with completely lost refcount information. This is now > possible which makes this variant feasible. > - Pulled patch 14 before patch 6; therefore, patch 14 is now patch 6 and > patches 6 to 13 are now patches 7 to 14, respectively. I did this > because patches 7 and 8 break several tests which are fixed by patch > 14, so it makes sense to apply the fix before breaking the tests. > - Adjusted patch 14 (previously 13) according to the changes to patch 3. > In particular, images do not leak clusters when the emptying process > fails, but are dirty (their refcount structure is broken) and need to > be repaired (which is done automatically when they are opened). > > > git-backport-diff output against v11: > > 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/14:[----] [--] 'qcow2: Allow "full" discard' > 002/14:[----] [--] 'qcow2: Implement bdrv_make_empty()' > 003/14:[0430] [FC] 'qcow2: Optimize bdrv_make_empty()' > 004/14:[----] [--] 'blockjob: Introduce block_job_complete_sync()' > 005/14:[----] [--] 'blockjob: Add "ready" field' > 006/14:[----] [--] 'iotests: Omit length/offset test in 040 and 041' > 007/14:[----] [--] 'block/mirror: Improve progress report' > 008/14:[----] [--] 'qemu-img: Implement commit like QMP' > 009/14:[----] [-C] 'qemu-img: Empty image after commit' > 010/14:[----] [--] 'qemu-img: Enable progress output for commit' > 011/14:[----] [-C] 'qemu-img: Specify backing file for commit' > 012/14:[----] [--] 'iotests: Add _filter_qemu_img_map' > 013/14:[----] [-C] 'iotests: Add test for backing-chain commits' > 014/14:[0046] [FC] 'iotests: Add test for qcow2's bdrv_make_empty' > > > Max Reitz (14): > qcow2: Allow "full" discard > qcow2: Implement bdrv_make_empty() > qcow2: Optimize bdrv_make_empty() > blockjob: Introduce block_job_complete_sync() > blockjob: Add "ready" field > iotests: Omit length/offset test in 040 and 041 > block/mirror: Improve progress report > qemu-img: Implement commit like QMP > qemu-img: Empty image after commit > qemu-img: Enable progress output for commit > qemu-img: Specify backing file for commit > iotests: Add _filter_qemu_img_map > iotests: Add test for backing-chain commits > iotests: Add test for qcow2's bdrv_make_empty > > block/Makefile.objs | 2 +- > block/blkdebug.c | 2 + > block/mirror.c | 34 +++++---- > block/qcow2-cluster.c | 27 ++++--- > block/qcow2-snapshot.c | 2 +- > block/qcow2.c | 136 ++++++++++++++++++++++++++++++++++- > block/qcow2.h | 2 +- > blockjob.c | 42 +++++++++-- > include/block/block.h | 2 + > include/block/blockjob.h | 20 ++++++ > qapi/block-core.json | 4 +- > qemu-img-cmds.hx | 4 +- > qemu-img.c | 149 +++++++++++++++++++++++++++++++++------ > qemu-img.texi | 13 +++- > tests/qemu-iotests/040 | 4 +- > tests/qemu-iotests/041 | 3 +- > tests/qemu-iotests/097 | 122 ++++++++++++++++++++++++++++++++ > tests/qemu-iotests/097.out | 119 +++++++++++++++++++++++++++++++ > tests/qemu-iotests/098 | 78 ++++++++++++++++++++ > tests/qemu-iotests/098.out | 45 ++++++++++++ > tests/qemu-iotests/common.filter | 7 ++ > tests/qemu-iotests/group | 2 + > tests/qemu-iotests/iotests.py | 3 +- > 23 files changed, 755 insertions(+), 67 deletions(-) > create mode 100755 tests/qemu-iotests/097 > create mode 100644 tests/qemu-iotests/097.out > create mode 100755 tests/qemu-iotests/098 > create mode 100644 tests/qemu-iotests/098.out >