All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3 00/21] blkdebug/blkverify: Allow QMP configuration
@ 2013-12-13 17:10 Max Reitz
  2013-12-13 17:10 ` [Qemu-devel] [PATCH v5 01/22] blkdebug: Use errp for read_config() Max Reitz
                   ` (22 more replies)
  0 siblings, 23 replies; 61+ messages in thread
From: Max Reitz @ 2013-12-13 17:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Fam Zheng, Stefan Hajnoczi, Max Reitz

Currently, the configuration of blkdebug and blkverify is done through
the "filename" alone. There is now way of manually choosing blkdebug or
blkverify as a driver and using a normal image filename.

In the case of blkdebug, the filename starts with the protocol prefix,
follows up with the name of a configuration file and ends with the name
of the image file.

In the case of blkverify, the filename starts with the protocol prefix,
follows up with the raw reference image filename and ends with the name
of the image file.

This patch allows the configuration of both drivers completely through
QMP and accordingly command-line options. The driver has to be selected
through the driver option (or similar), the image filename may be given
either as the filename itself or through a x.filename option, where "x"
depends on the driver. Further options may be required depending on the
driver.

In case of blkverify, the test image may be specified either through the
filename or as a BlockdevRef reference through the "test" option. The
raw image is referenced as "raw".

In case of blkdebug, one may either set the "config" option to the
filename of a configuration file, or the content of the configuration
file may be given directly (as options). The image filename is either
specified as the filename or referenced through the "image" option.


v5:
 - Addressed Fam's comments:
    - Patch 4: Asserted against prefix == NULL in qdict_flatten_qlist()
    - Patch 4: Support other types than QDicts and QLists in QLists in
      qdict_flatten_qlist()
    - Patch 4: Modified comment above qdict_flatten() to include the
      functionality of qdict_flatten_qlist()
    - Patch 8 (now patch 9): Removed goto fail; in favor of directly
      returning in the if (reference) patch - this fixes a double
      QDECREF(options) as well as two bs dereferences with bs being NULL
    - Patch 21 (now patch 22): Added reason for not using Python to the
      commit message
 - Added patch 5: Cleans up qdict_flatten_qdict() which contains a now
   unused delete variable

backport diff against v3:
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/22:[----] [--] 'blkdebug: Use errp for read_config()'
002/22:[----] [--] 'blkdebug: Don't require sophisticated filename'
003/22:[----] [--] 'qdict: Add qdict_array_split()'
004/22:[0015] [FC] 'qapi: extend qdict_flatten() for QLists'
005/22:[down] 'qdict: Remove delete from qdict_flatten_qdict()'
006/22:[----] [--] 'qemu-option: Add qemu_config_parse_qdict()'
007/22:[----] [--] 'blkdebug: Always call read_config()'
008/22:[----] [--] 'blkdebug: Use command-line in read_config()'
009/22:[0006] [FC] 'block: Allow reference for bdrv_file_open()'
010/22:[----] [--] 'block: Pass reference to bdrv_file_open()'
011/22:[----] [--] 'block: Allow block devices without files'
012/22:[----] [--] 'block: Allow recursive "file"s'
013/22:[----] [--] 'qemu-iotests: Fix output of test 051'
014/22:[----] [--] 'blockdev: Move "file" to legacy_opts'
015/22:[----] [--] 'blkdebug: Allow command-line file configuration'
016/22:[----] [--] 'blkdebug: Make filename optional'
017/22:[----] [--] 'blkverify: Allow command-line configuration'
018/22:[----] [--] 'blkverify: Don't require protocol filename'
019/22:[----] [--] 'blkdebug: Alias "errno" as "error"'
020/22:[----] [--] 'qapi: QMP interface for blkdebug and blkverify'
021/22:[----] [--] 'qemu-io: Make filename optional'
022/22:[----] [--] 'iotests: Test new blkdebug/blkverify interface'

v4:
 - Fixed a memleak in qdict_flatten_qlist() in patch 4

v3:
 - The first few patches are probably similar to the ones from the
   previous series; but it's probably best to see this series as a
   completely new one.


Max Reitz (22):
  blkdebug: Use errp for read_config()
  blkdebug: Don't require sophisticated filename
  qdict: Add qdict_array_split()
  qapi: extend qdict_flatten() for QLists
  qdict: Remove delete from qdict_flatten_qdict()
  qemu-option: Add qemu_config_parse_qdict()
  blkdebug: Always call read_config()
  blkdebug: Use command-line in read_config()
  block: Allow reference for bdrv_file_open()
  block: Pass reference to bdrv_file_open()
  block: Allow block devices without files
  block: Allow recursive "file"s
  qemu-iotests: Fix output of test 051
  blockdev: Move "file" to legacy_opts
  blkdebug: Allow command-line file configuration
  blkdebug: Make filename optional
  blkverify: Allow command-line configuration
  blkverify: Don't require protocol filename
  blkdebug: Alias "errno" as "error"
  qapi: QMP interface for blkdebug and blkverify
  qemu-io: Make filename optional
  iotests: Test new blkdebug/blkverify interface

 block.c                    |  56 ++++++++++---
 block/blkdebug.c           |  90 ++++++++++++++------
 block/blkverify.c          |  65 ++++++++++-----
 block/cow.c                |   3 +-
 block/qcow.c               |   3 +-
 block/qcow2.c              |   2 +-
 block/qed.c                |   4 +-
 block/sheepdog.c           |   4 +-
 block/vhdx.c               |   2 +-
 block/vmdk.c               |   4 +-
 blockdev.c                 |  19 +++--
 include/block/block.h      |   3 +-
 include/qapi/qmp/qdict.h   |   1 +
 include/qemu/config-file.h |   6 ++
 qapi-schema.json           |  94 ++++++++++++++++++++-
 qemu-io.c                  |  10 ++-
 qobject/qdict.c            | 111 ++++++++++++++++++++-----
 tests/qemu-iotests/051.out |   2 +-
 tests/qemu-iotests/071     | 201 +++++++++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/071.out |  73 ++++++++++++++++
 tests/qemu-iotests/group   |   1 +
 util/qemu-config.c         |  95 +++++++++++++++++++++
 22 files changed, 741 insertions(+), 108 deletions(-)
 create mode 100755 tests/qemu-iotests/071
 create mode 100644 tests/qemu-iotests/071.out

-- 
1.8.5.1

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

end of thread, other threads:[~2013-12-14  0:26 UTC | newest]

Thread overview: 61+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-13 17:10 [Qemu-devel] [PATCH v3 00/21] blkdebug/blkverify: Allow QMP configuration Max Reitz
2013-12-13 17:10 ` [Qemu-devel] [PATCH v5 01/22] blkdebug: Use errp for read_config() Max Reitz
2013-12-13 18:59   ` Kevin Wolf
2013-12-13 17:10 ` [Qemu-devel] [PATCH v5 02/22] blkdebug: Don't require sophisticated filename Max Reitz
2013-12-13 19:00   ` Kevin Wolf
2013-12-13 17:10 ` [Qemu-devel] [PATCH v5 03/22] qdict: Add qdict_array_split() Max Reitz
2013-12-13 19:00   ` Kevin Wolf
2013-12-13 17:10 ` [Qemu-devel] [PATCH v5 04/22] qapi: extend qdict_flatten() for QLists Max Reitz
2013-12-13 19:01   ` Kevin Wolf
2013-12-13 20:04   ` Eric Blake
2013-12-13 17:10 ` [Qemu-devel] [PATCH v5 05/22] qdict: Remove delete from qdict_flatten_qdict() Max Reitz
2013-12-13 18:58   ` Kevin Wolf
2013-12-14  0:05     ` Max Reitz
2013-12-13 17:10 ` [Qemu-devel] [PATCH v5 06/22] qemu-option: Add qemu_config_parse_qdict() Max Reitz
2013-12-13 17:10 ` [Qemu-devel] [PATCH v5 07/22] blkdebug: Always call read_config() Max Reitz
2013-12-13 19:04   ` Kevin Wolf
2013-12-13 17:10 ` [Qemu-devel] [PATCH v5 08/22] blkdebug: Use command-line in read_config() Max Reitz
2013-12-13 19:48   ` Kevin Wolf
2013-12-13 17:10 ` [Qemu-devel] [PATCH v5 09/22] block: Allow reference for bdrv_file_open() Max Reitz
2013-12-13 19:54   ` Kevin Wolf
2013-12-13 17:10 ` [Qemu-devel] [PATCH v5 10/22] block: Pass reference to bdrv_file_open() Max Reitz
2013-12-13 19:56   ` Kevin Wolf
2013-12-13 17:10 ` [Qemu-devel] [PATCH v5 11/22] block: Allow block devices without files Max Reitz
2013-12-13 20:06   ` Kevin Wolf
2013-12-14  0:10     ` Max Reitz
2013-12-13 17:10 ` [Qemu-devel] [PATCH v5 12/22] block: Allow recursive "file"s Max Reitz
2013-12-13 20:19   ` Kevin Wolf
2013-12-13 20:36     ` Eric Blake
2013-12-13 21:21       ` Kevin Wolf
2013-12-14  0:16     ` Max Reitz
2013-12-13 17:10 ` [Qemu-devel] [PATCH v5 13/22] qemu-iotests: Fix output of test 051 Max Reitz
2013-12-13 20:21   ` Eric Blake
2013-12-13 20:21   ` Kevin Wolf
2013-12-13 17:10 ` [Qemu-devel] [PATCH v5 14/22] blockdev: Move "file" to legacy_opts Max Reitz
2013-12-13 20:27   ` Kevin Wolf
2013-12-13 17:10 ` [Qemu-devel] [PATCH v5 15/22] blkdebug: Allow command-line file configuration Max Reitz
2013-12-13 20:36   ` Kevin Wolf
2013-12-13 23:57     ` Max Reitz
2013-12-13 17:10 ` [Qemu-devel] [PATCH v5 16/22] blkdebug: Make filename optional Max Reitz
2013-12-13 20:43   ` Kevin Wolf
2013-12-14  0:27     ` Max Reitz
2013-12-13 17:10 ` [Qemu-devel] [PATCH v5 17/22] blkverify: Allow command-line configuration Max Reitz
2013-12-13 20:46   ` Kevin Wolf
2013-12-14  0:22     ` Max Reitz
2013-12-13 17:10 ` [Qemu-devel] [PATCH v5 18/22] blkverify: Don't require protocol filename Max Reitz
2013-12-13 20:47   ` Kevin Wolf
2013-12-13 17:10 ` [Qemu-devel] [PATCH v5 19/22] blkdebug: Alias "errno" as "error" Max Reitz
2013-12-13 20:49   ` Kevin Wolf
2013-12-13 21:00     ` Eric Blake
2013-12-13 21:23       ` Kevin Wolf
2013-12-13 23:59       ` Max Reitz
2013-12-13 17:10 ` [Qemu-devel] [PATCH v5 20/22] qapi: QMP interface for blkdebug and blkverify Max Reitz
2013-12-13 20:54   ` Kevin Wolf
2013-12-13 21:03     ` Eric Blake
2013-12-14  0:20     ` Max Reitz
2013-12-13 17:10 ` [Qemu-devel] [PATCH v5 21/22] qemu-io: Make filename optional Max Reitz
2013-12-13 20:57   ` Kevin Wolf
2013-12-13 17:10 ` [Qemu-devel] [PATCH v5 22/22] iotests: Test new blkdebug/blkverify interface Max Reitz
2013-12-13 21:08   ` Kevin Wolf
2013-12-14  0:01     ` Max Reitz
2013-12-13 17:15 ` [Qemu-devel] [PATCH v3 00/21] blkdebug/blkverify: Allow QMP configuration 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.