qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Max Reitz <mreitz@redhat.com>
Subject: [Qemu-devel] [PATCH v8 00/14] qemu-img: Implement commit like QMP
Date: Sat,  7 Jun 2014 20:51:06 +0200	[thread overview]
Message-ID: <1402167080-20316-1-git-send-email-mreitz@redhat.com> (raw)

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).


With Stefan's pull request for his dataplane series now out, I thought
this a good opportunity to send a rebase of this series.

Patches 7 and 9 through 13 are yet to be reviewed, if I can trust grep.


v8: Rebased on Stefan's block branch
- Patch 5: modify qapi/block-core.json rather than qapi-schema.json
- Patch 12: test number 092 is taken, move to 094
- Patch 13: test number 093 will be taken (by Fam), move to 095

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 v7:

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:[----] [--] '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:[----] [-C] 'qemu-img: Implement commit like QMP'
008/14:[----] [--] 'qemu-img: Empty image after commit'
009/14:[----] [--] 'qemu-img: Enable progress output for commit'
010/14:[----] [--] 'qemu-img: Specify backing file for commit'
011/14:[----] [--] 'iotests: Add _filter_qemu_img_map'
012/14:[0002] [FC] 'iotests: Add test for backing-chain commits'
013/14:[0002] [FC] '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/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/094           | 122 ++++++++++++
 tests/qemu-iotests/094.out       | 119 ++++++++++++
 tests/qemu-iotests/095           |  72 ++++++++
 tests/qemu-iotests/095.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/094
 create mode 100644 tests/qemu-iotests/094.out
 create mode 100755 tests/qemu-iotests/095
 create mode 100644 tests/qemu-iotests/095.out

-- 
2.0.0

             reply	other threads:[~2014-06-07 18:51 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-07 18:51 Max Reitz [this message]
2014-06-07 18:51 ` [Qemu-devel] [PATCH v8 01/14] qcow2: Allow "full" discard Max Reitz
2014-06-30 10:00   ` Kevin Wolf
2014-06-07 18:51 ` [Qemu-devel] [PATCH v8 02/14] qcow2: Implement bdrv_make_empty() Max Reitz
2014-06-30 10:00   ` Kevin Wolf
2014-06-07 18:51 ` [Qemu-devel] [PATCH v8 03/14] qcow2: Optimize bdrv_make_empty() Max Reitz
2014-06-30 11:33   ` Kevin Wolf
2014-07-01  7:11     ` Hu Tao
2014-07-01 12:12     ` Max Reitz
2014-07-09 23:23     ` Max Reitz
2014-06-07 18:51 ` [Qemu-devel] [PATCH v8 04/14] blockjob: Introduce block_job_complete_sync() Max Reitz
2014-06-07 18:51 ` [Qemu-devel] [PATCH v8 05/14] blockjob: Add "ready" field Max Reitz
2014-06-07 18:51 ` [Qemu-devel] [PATCH v8 06/14] block/mirror: Improve progress report Max Reitz
2014-06-07 18:51 ` [Qemu-devel] [PATCH v8 07/14] qemu-img: Implement commit like QMP Max Reitz
2014-06-09 16:53   ` Eric Blake
2014-06-07 18:51 ` [Qemu-devel] [PATCH v8 08/14] qemu-img: Empty image after commit Max Reitz
2014-06-07 18:51 ` [Qemu-devel] [PATCH v8 09/14] qemu-img: Enable progress output for commit Max Reitz
2014-06-09 17:28   ` Eric Blake
2014-06-07 18:51 ` [Qemu-devel] [PATCH v8 10/14] qemu-img: Specify backing file " Max Reitz
2014-06-09 17:40   ` Eric Blake
2014-06-07 18:51 ` [Qemu-devel] [PATCH v8 11/14] iotests: Add _filter_qemu_img_map Max Reitz
2014-06-09 17:51   ` Eric Blake
2014-06-07 18:51 ` [Qemu-devel] [PATCH v8 12/14] iotests: Add test for backing-chain commits Max Reitz
2014-06-09 18:50   ` Eric Blake
2014-06-07 18:51 ` [Qemu-devel] [PATCH v8 13/14] iotests: Add test for qcow2's bdrv_make_empty Max Reitz
2014-06-09 18:55   ` Eric Blake
2014-06-07 18:51 ` [Qemu-devel] [PATCH v8 14/14] iotests: Omit length/offset test in 040 and 041 Max Reitz
2014-06-27 22:07 ` [Qemu-devel] [PATCH v8 00/14] qemu-img: Implement commit like QMP Max Reitz
2014-06-30  9:50   ` Kevin Wolf

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=1402167080-20316-1-git-send-email-mreitz@redhat.com \
    --to=mreitz@redhat.com \
    --cc=kwolf@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).