From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvKvr-00050w-Kc for qemu-devel@nongnu.org; Sat, 15 Oct 2016 05:07:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bvKvn-0001f2-A7 for qemu-devel@nongnu.org; Sat, 15 Oct 2016 05:07:06 -0400 From: Ashijeet Acharya Date: Sat, 15 Oct 2016 14:34:35 +0530 Message-Id: <1476522280-23211-1-git-send-email-ashijeetacharya@gmail.com> Subject: [Qemu-devel] [v2 0/5] Allow blockdev-add for SSH List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: kwolf@redhat.com Cc: rjones@redhat.com, jcody@redhat.com, mreitz@redhat.com, eblake@redhat.com, armbru@redhat.com, berrange@redhat.com, kraxel@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org, Ashijeet Acharya Previously posted series patches: v1: http://lists.nongnu.org/archive/html/qemu-devel/2016-10/msg02137.html This series adds blockdev-add support for SSH block driver. This patch series has an additional patch 'Patch 3'. Patch 1 prepares the code for the addition of a new option prefix, which is "server.". This is accomplished by adding a ssh_has_filename_options_conflict() function which helps to iterate over the various options and check for conflict. Patch 2 first adds InetSocketAddress compatibility to SSH block driver and then makes it accept a InetSocketAddress under the "server" option. The old options "host" and "port" are supported as legacy options and then translated to the respective InetSocketAddress representation. Patch 3 makes use of inet_connect_saddr() instead of inet_connect() to establish socket connection. Patch 4 drops the usage of "host" and "port" outside of ssh_has_filename_options_conflict() and ssh_process_legacy_socket_options() functions in order to make them legacy options completely. Patch 5 helps to allow blockdev-add support for the SSH block driver by making the SSH option available. *** This series depends on the following patch: *** "qdict: implement a qdict_crumple method for un-flattening a dict" from Daniel's "QAPI/QOM work for non-scalar object properties" series. Changes in v2: - Use strstart() instead of strcmp() (Kevin) - Use qobject_input_visitor_new_autocast() instead of qmp_input_visitor_new() and change header files accordingly (Kevin) - Use inet_connect_saddr() instead of inet_connect() (Kevin) - Drop the contruction of : string (Kevin) - Fix the bug in ssh_process_legacy_socket_options() Ashijeet Acharya (5): block/ssh: Add ssh_has_filename_options_conflict() block/ssh: Add InetSocketAddress and accept it block/ssh: Use inet_connect_saddr() to establish socket connection block/ssh: Use InetSocketAddress options qapi: allow blockdev-add for ssh block/ssh.c | 120 ++++++++++++++++++++++++++++++++++++++++--------- include/qemu/sockets.h | 2 + qapi/block-core.json | 24 +++++++++- util/qemu-sockets.c | 2 +- 4 files changed, 124 insertions(+), 24 deletions(-) -- 2.6.2