From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Luiz Capitulino <lcapitulino@redhat.com>
Subject: [Qemu-devel] [PATCH v3 for-2.7 00/14] qapi: Allow blockdev-add for NBD
Date: Wed, 6 Apr 2016 20:28:36 +0200 [thread overview]
Message-ID: <1459967330-4573-1-git-send-email-mreitz@redhat.com> (raw)
Turns out NBD is not so simple to do if you do it right. Anyway, this
series adds blockdev-add support for NBD clients.
Patch 1 adds a QDict function which I needed in later NBD patches for
handling legacy options (move "host" to "address.data.host" etc.).
Patches 2, 3, 4, and 5 are minor patches with no functional relation to
this series, other than later patches will touch the code they touch,
too.
Patches 6 and 7 prepare the code for the addition of a new option
prefix, which is "address.".
Patch 8 makes the NBD client accept a SocketAddress under the "address"
option (or rather, a flattened SocketAddress QDict with its keys
prefixed by "address."). The old options "host", "port", and "path" are
supported as legacy options and translated to the respective
SocketAddress representation.
Patch 9 drops usage of "host", "port", and "path" outside of
nbd_has_filename_options_conflict(),
nbd_process_legacy_socket_options(), and nbd_refresh_filename(), making
those options nothing but legacy.
Patch 10, the goal of this series, is again not very complicated.
Patches 11, 12, and 13 are required for the iotest added in patch 16. It
will invoke qemu-nbd, so patch 13 is required. Besides qemu-nbd, it will
launch an NBD server VM concurrently to the client VM, which is why
patch 14 is required. And finally, it will test whether we can add an
NBD BDS by passing it a file descriptor, which patch 15 is needed for
(so we use the socket_scm_helper to pass sockets to qemu).
Patch 14 then adds the iotest for NBD's blockdev-add interface.
*** This series requires Daniel's qdict_crumple() function (from his
"Provide a QOM-based authorization API" series). ***
v2:
- Dropped patches 2 and 3; use Daniel's qdict_crumple() instead.
- Patch 7: Not sure why the diff differs, seems functionally like the
same patch to me. Maybe git changed something about its default diff
algorithm.
- Patch 8: Use qdict_crumple() instead of qdict_unflatten()
- Patch 10: Rebase conflicts
git-backport-diff against v2:
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:[----] [--] 'qdict: Add qdict_change_key()'
002/14:[----] [--] 'block/nbd: Drop trailing "." in error messages'
003/14:[----] [--] 'block/nbd: Reject port parameter without host'
004/14:[----] [--] 'block/nbd: Default port in nbd_refresh_filename()'
005/14:[----] [--] 'block/nbd: Use qdict_put()'
006/14:[----] [--] 'block/nbd: Add nbd_has_filename_options_conflict()'
007/14:[0008] [FC] 'block/nbd: "address" in nbd_refresh_filename()'
008/14:[0024] [FC] 'block/nbd: Accept SocketAddress'
009/14:[----] [--] 'block/nbd: Use SocketAddress options'
010/14:[0004] [FC] 'qapi: Allow blockdev-add for NBD'
011/14:[----] [-C] 'iotests.py: Add qemu_nbd function'
012/14:[----] [--] 'iotests.py: Allow concurrent qemu instances'
013/14:[----] [--] 'socket_scm_helper: Accept fd directly'
014/14:[----] [-C] 'iotests: Add test for NBD's blockdev-add interface'
Max Reitz (14):
qdict: Add qdict_change_key()
block/nbd: Drop trailing "." in error messages
block/nbd: Reject port parameter without host
block/nbd: Default port in nbd_refresh_filename()
block/nbd: Use qdict_put()
block/nbd: Add nbd_has_filename_options_conflict()
block/nbd: "address" in nbd_refresh_filename()
block/nbd: Accept SocketAddress
block/nbd: Use SocketAddress options
qapi: Allow blockdev-add for NBD
iotests.py: Add qemu_nbd function
iotests.py: Allow concurrent qemu instances
socket_scm_helper: Accept fd directly
iotests: Add test for NBD's blockdev-add interface
block/nbd.c | 235 ++++++++++++++++++++++-----------
include/qapi/qmp/qdict.h | 1 +
qapi/block-core.json | 23 +++-
qobject/qdict.c | 23 ++++
tests/qemu-iotests/051.out | 4 +-
tests/qemu-iotests/051.pc.out | 4 +-
tests/qemu-iotests/147 | 194 +++++++++++++++++++++++++++
tests/qemu-iotests/147.out | 5 +
tests/qemu-iotests/group | 1 +
tests/qemu-iotests/iotests.py | 22 ++-
tests/qemu-iotests/socket_scm_helper.c | 29 ++--
11 files changed, 443 insertions(+), 98 deletions(-)
create mode 100755 tests/qemu-iotests/147
create mode 100644 tests/qemu-iotests/147.out
--
2.8.0
next reply other threads:[~2016-04-06 18:29 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-06 18:28 Max Reitz [this message]
2016-04-06 18:28 ` [Qemu-devel] [PATCH v3 01/14] qdict: Add qdict_change_key() Max Reitz
2016-06-14 22:03 ` Eric Blake
2016-04-06 18:28 ` [Qemu-devel] [PATCH v3 02/14] block/nbd: Drop trailing "." in error messages Max Reitz
2016-06-14 22:04 ` Eric Blake
2016-04-06 18:28 ` [Qemu-devel] [PATCH v3 03/14] block/nbd: Reject port parameter without host Max Reitz
2016-04-06 18:28 ` [Qemu-devel] [PATCH v3 04/14] block/nbd: Default port in nbd_refresh_filename() Max Reitz
2016-06-14 22:39 ` Eric Blake
2016-04-06 18:28 ` [Qemu-devel] [PATCH v3 05/14] block/nbd: Use qdict_put() Max Reitz
2016-06-14 22:40 ` Eric Blake
2016-04-06 18:28 ` [Qemu-devel] [PATCH v3 06/14] block/nbd: Add nbd_has_filename_options_conflict() Max Reitz
2016-06-14 22:54 ` Eric Blake
2016-04-06 18:28 ` [Qemu-devel] [PATCH v3 07/14] block/nbd: "address" in nbd_refresh_filename() Max Reitz
2016-06-14 23:03 ` Eric Blake
2016-04-06 18:28 ` [Qemu-devel] [PATCH v3 08/14] block/nbd: Accept SocketAddress Max Reitz
2016-06-14 23:14 ` Eric Blake
2016-06-15 14:40 ` Max Reitz
2016-04-06 18:28 ` [Qemu-devel] [PATCH v3 09/14] block/nbd: Use SocketAddress options Max Reitz
2016-04-06 18:28 ` [Qemu-devel] [PATCH v3 10/14] qapi: Allow blockdev-add for NBD Max Reitz
2016-04-06 18:28 ` [Qemu-devel] [PATCH v3 11/14] iotests.py: Add qemu_nbd function Max Reitz
2016-04-06 18:28 ` [Qemu-devel] [PATCH v3 12/14] iotests.py: Allow concurrent qemu instances Max Reitz
2016-04-06 18:28 ` [Qemu-devel] [PATCH v3 13/14] socket_scm_helper: Accept fd directly Max Reitz
2016-04-06 18:28 ` [Qemu-devel] [PATCH v3 14/14] iotests: Add test for NBD's blockdev-add interface Max Reitz
2016-05-03 13:51 ` [Qemu-devel] [PATCH v3 for-2.7 00/14] qapi: Allow blockdev-add for NBD Max Reitz
2016-05-03 15:23 ` Kevin Wolf
2016-06-14 22:42 ` Eric Blake
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=1459967330-4573-1-git-send-email-mreitz@redhat.com \
--to=mreitz@redhat.com \
--cc=armbru@redhat.com \
--cc=kwolf@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).