[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 00/21] blkdebug/blkverify: Allow QMP configuratio
From: |
Max Reitz |
Subject: |
[Qemu-devel] [PATCH v3 00/21] blkdebug/blkverify: Allow QMP configuration |
Date: |
Fri, 13 Dec 2013 18:10:11 +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.
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
- [Qemu-devel] [PATCH v3 15/21] blkdebug: Make filename optional, (continued)
- [Qemu-devel] [PATCH v3 15/21] blkdebug: Make filename optional, Max Reitz, 2013/12/11
- [Qemu-devel] [PATCH v3 16/21] blkverify: Allow command-line configuration, Max Reitz, 2013/12/11
- [Qemu-devel] [PATCH v3 17/21] blkverify: Don't require protocol filename, Max Reitz, 2013/12/11
- [Qemu-devel] [PATCH v3 19/21] qapi: QMP interface for blkdebug and blkverify, Max Reitz, 2013/12/11
- [Qemu-devel] [PATCH v3 18/21] blkdebug: Alias "errno" as "error", Max Reitz, 2013/12/11
- [Qemu-devel] [PATCH v3 20/21] qemu-io: Make filename optional, Max Reitz, 2013/12/11
- [Qemu-devel] [PATCH v3 21/21] iotests: Test new blkdebug/blkverify interface, Max Reitz, 2013/12/11
- Re: [Qemu-devel] [PATCH v3 00/21] blkdebug/blkverify: Allow QMP configuration, Fam Zheng, 2013/12/12
- [Qemu-devel] [PATCH v3 00/21] blkdebug/blkverify: Allow QMP configuration,
Max Reitz <=
- [Qemu-devel] [PATCH v5 06/22] qemu-option: Add qemu_config_parse_qdict(), Max Reitz, 2013/12/13