qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v6 00/22] blkdebug/blkverify: Allow QMP configuratio


From: Max Reitz
Subject: [Qemu-devel] [PATCH v6 00/22] blkdebug/blkverify: Allow QMP configuration
Date: Thu, 19 Dec 2013 20:47:01 +0100

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.


v6:
 - Addressed Kevin's and Erik's comments (first number is patch number
   in v5, second is patch number in this series):
    - Patch 4/4: Adjusted comment
    - Patch 5/-: Dropped
    - Patch 11/10: Guard against !drv && !file before
      find_image_format()
    - Patch -/11: Added
    - Patch -/12: Added
    - Patch 12/13: Removed unnecessary hunk and squashed next
      patch into this one
    - Patch 13/-: Squashed into previous patch
    - Patch 15/15: Dropped static open_image() in favor of the global
      bdrv_open_image()
    - Patch 16/-: Dropped
    - Patch 17/16: Dropped static open_image() in favor of the global
      bdrv_open_image(); also, disable format auto-detection for the raw
      image
    - Patch 18/17: Drop check for !filename since the filename is always
      passed to this function
    - Patch 19/18: Add "errno" to the list of polluted words in qapi.py
      rather than introduce a new alias
    - Patch 20/19: Use enumeration for the blkdebug trigger events;
      also, we can and must use "errno" now instead of "error"
    - Patch 22/21: Fix test by increasing the image size; add actually
      working tests for blkverify failures; add test for blkverify using
      an already existing block device as the raw image
    - Patch -/22: Added

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

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.


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:[0003] [FC] 'qapi: extend qdict_flatten() for QLists'
005/22:[----] [--] 'qemu-option: Add qemu_config_parse_qdict()'
006/22:[----] [--] 'blkdebug: Always call read_config()'
007/22:[----] [--] 'blkdebug: Use command-line in read_config()'
008/22:[----] [--] 'block: Allow reference for bdrv_file_open()'
009/22:[----] [--] 'block: Pass reference to bdrv_file_open()'
010/22:[0008] [FC] 'block: Allow block devices without files'
011/22:[down] 'block: Add bdrv_open_image()'
012/22:[down] 'block: Use bdrv_open_image() in bdrv_open()'
013/22:[0010] [FC] 'block: Allow recursive "file"s'
014/22:[----] [--] 'blockdev: Move "file" to legacy_opts'
015/22:[0026] [FC] 'blkdebug: Allow command-line file configuration'
016/22:[0042] [FC] 'blkverify: Allow command-line configuration'
017/22:[0006] [FC] 'blkverify: Don't require protocol filename'
018/22:[down] 'qapi: Add "errno" to the list of polluted words'
019/22:[0031] [FC] 'qapi: QMP interface for blkdebug and blkverify'
020/22:[----] [--] 'qemu-io: Make filename optional'
021/22:[0083] [FC] 'iotests: Test new blkdebug/blkverify interface'
022/22:[down] 'iotests: Test file format nesting'


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
  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: Add bdrv_open_image()
  block: Use bdrv_open_image() in bdrv_open()
  block: Allow recursive "file"s
  blockdev: Move "file" to legacy_opts
  blkdebug: Allow command-line file configuration
  blkverify: Allow command-line configuration
  blkverify: Don't require protocol filename
  qapi: Add "errno" to the list of polluted words
  qapi: QMP interface for blkdebug and blkverify
  qemu-io: Make filename optional
  iotests: Test new blkdebug/blkverify interface
  iotests: Test file format nesting

 block.c                    | 123 ++++++++++++++++++++---
 block/blkdebug.c           |  59 ++++++-----
 block/blkverify.c          |  29 ++----
 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      |   6 +-
 include/qapi/qmp/qdict.h   |   1 +
 include/qemu/config-file.h |   6 ++
 qapi-schema.json           | 113 ++++++++++++++++++++-
 qemu-io.c                  |  10 +-
 qobject/qdict.c            |  93 ++++++++++++++++--
 scripts/qapi.py            |   2 +-
 tests/qemu-iotests/051.out |   2 +-
 tests/qemu-iotests/071     | 239 +++++++++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/071.out |  90 +++++++++++++++++
 tests/qemu-iotests/072     |  69 +++++++++++++
 tests/qemu-iotests/072.out |  21 ++++
 tests/qemu-iotests/group   |   2 +
 util/qemu-config.c         |  95 ++++++++++++++++++
 25 files changed, 908 insertions(+), 93 deletions(-)
 create mode 100755 tests/qemu-iotests/071
 create mode 100644 tests/qemu-iotests/071.out
 create mode 100755 tests/qemu-iotests/072
 create mode 100644 tests/qemu-iotests/072.out

-- 
1.8.5.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]