Received: from eggs.gnu.org ([2001:4830:134:3::10]:39064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WiU6n-0000ne-J1 for qemu-devel@nongnu.org; Thu, 08 May 2014 15:36:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WiU6i-0007Tv-3T for qemu-devel@nongnu.org; Thu, 08 May 2014 15:35:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8909) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WiU6h-0007Tr-Rf for qemu-devel@nongnu.org; Thu, 08 May 2014 15:35:52 -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 s48JZpIM025509 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 8 May 2014 15:35:51 -0400 From: Max Reitz Date: Thu, 8 May 2014 21:35:34 +0200 Message-Id: <1399577748-18907-1-git-send-email-mreitz@redhat.com> Subject: [Qemu-devel] [PATCH v7 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 , Stefan Hajnoczi , Max Reitz 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). This series (as of v7) depends on the "[PATCH v3 00/25] dataplane: use QEMU block layer" series by Stefan. v7: - Patch 1: rephrased comment [Eric] - Patch 3: - give BDRV_REQ_MAY_UNMAP to bdrv_write_zeroes() [Eric] - adjusted comment about calculation of total cluster count [Eric] - added error handling for bdrv_discard() [Eric] - Patch 7: replaced qemu_aio_wait() by aio_poll() [Stefan's dataplane series] - Patch 8: rephrased comment and manpage content [Eric] - Patch 12: more test passes for implicit and explicit -d git-backport-diff output against v6: 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:[0004] [FC] 'qcow2: Allow "full" discard' 002/14:[----] [--] 'qcow2: Implement bdrv_make_empty()' 003/14:[0014] [FC] 'qcow2: Optimize bdrv_make_empty()' 004/14:[----] [--] 'blockjob: Introduce block_job_complete_sync()' 005/14:[----] [--] 'blockjob: Add "ready" field' 006/14:[----] [--] 'block/mirror: Improve progress report' 007/14:[0008] [FC] 'qemu-img: Implement commit like QMP' 008/14:[0012] [FC] 'qemu-img: Empty image after commit' 009/14:[----] [-C] 'qemu-img: Enable progress output for commit' 010/14:[----] [-C] 'qemu-img: Specify backing file for commit' 011/14:[----] [--] 'iotests: Add _filter_qemu_img_map' 012/14:[0094] [FC] 'iotests: Add test for backing-chain commits' 013/14:[----] [--] 'iotests: Add test for qcow2's bdrv_make_empty' 014/14:[----] [--] 'iotests: Omit length/offset test in 040 and 041' 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 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 iotests: Omit length/offset test in 040 and 041 block/Makefile.objs | 2 +- block/mirror.c | 32 ++-- block/qcow2-cluster.c | 27 ++- block/qcow2-snapshot.c | 2 +- block/qcow2.c | 388 ++++++++++++++++++++++++++++++++++++++- block/qcow2.h | 2 +- blockjob.c | 46 ++++- include/block/blockjob.h | 20 ++ qapi-schema.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/092 | 122 ++++++++++++ tests/qemu-iotests/092.out | 119 ++++++++++++ tests/qemu-iotests/093 | 72 ++++++++ tests/qemu-iotests/093.out | 26 +++ tests/qemu-iotests/common.filter | 7 + tests/qemu-iotests/group | 2 + tests/qemu-iotests/iotests.py | 3 +- 21 files changed, 980 insertions(+), 67 deletions(-) create mode 100755 tests/qemu-iotests/092 create mode 100644 tests/qemu-iotests/092.out create mode 100755 tests/qemu-iotests/093 create mode 100644 tests/qemu-iotests/093.out -- 1.9.2