From nobody Sat Feb 7 06:39:56 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1490879837091142.27279055849715; Thu, 30 Mar 2017 06:17:17 -0700 (PDT) Received: from localhost ([::1]:35588 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctZwx-0003yX-Ss for importer@patchew.org; Thu, 30 Mar 2017 09:17:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctZv4-0002ZF-My for qemu-devel@nongnu.org; Thu, 30 Mar 2017 09:15:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ctZv3-0002QS-Oo for qemu-devel@nongnu.org; Thu, 30 Mar 2017 09:15:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60694) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ctZuz-0002HN-2n; Thu, 30 Mar 2017 09:15:13 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 10E0380496; Thu, 30 Mar 2017 13:15:12 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-26.ams2.redhat.com [10.36.116.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 27FBB78433; Thu, 30 Mar 2017 13:15:11 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id D3D661138609; Thu, 30 Mar 2017 15:15:07 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 10E0380496 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=armbru@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 10E0380496 From: Markus Armbruster To: qemu-devel@nongnu.org Date: Thu, 30 Mar 2017 15:15:06 +0200 Message-Id: <1490879707-6060-10-git-send-email-armbru@redhat.com> In-Reply-To: <1490879707-6060-1-git-send-email-armbru@redhat.com> References: <1490879707-6060-1-git-send-email-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 30 Mar 2017 13:15:12 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC v2 for-2.9 09/10] squash! nbd: Tidy up blockdev-add interface X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-block@nongnu.org, mitake.hitoshi@lab.ntt.co.jp, jcody@redhat.com, mreitz@redhat.com, pbonzini@redhat.com, namei.unix@gmail.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Drop backward -drive server.data.* compatibility gunk. On squash, replace commit message's last paragraph "Unfortunately, SocketAddress is also visible..." by: Unfortunately, SocketAddress is also visible in -drive since 2.8: -drive if=3Dnone,driver=3Dnbd,server.type=3Dinet,server.data.host=3D127= .0.0.1,server.data.port=3D12345 Nobody should be using it, as it's fairly new and has never been documented, so adding still more compatibility gunk to keep it working isn't worth the trouble. You now have to use -drive if=3Dnone,driver=3Dnbd,server.type=3Dinet,server.host=3D127.0.0.= 1,server.port=3D12345 Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- block/nbd.c | 41 +---------------------------------------- 1 file changed, 1 insertion(+), 40 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index ea9d8dc..8bb29a9 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -223,51 +223,12 @@ static bool nbd_process_legacy_socket_options(QDict *= output_options, const char *path =3D qemu_opt_get(legacy_opts, "path"); const char *host =3D qemu_opt_get(legacy_opts, "host"); const char *port =3D qemu_opt_get(legacy_opts, "port"); - const char *sd_path =3D qdict_get_try_str(output_options, - "server.data.path"); - const char *sd_host =3D qdict_get_try_str(output_options, - "server.data.host"); - const char *sd_port =3D qdict_get_try_str(output_options, - "server.data.port"); - bool bare =3D path || host || port; - bool server_data =3D sd_path || sd_host || sd_port; - QObject *val; const QDictEntry *e; =20 - if (!bare && !server_data) { + if (!path && !host && !port) { return true; } =20 - if (bare && server_data) { - error_setg(errp, "Cannot use 'server' and path/host/port at the " - "same time"); - return false; - } - - if (server_data) { - if (sd_host) { - val =3D qdict_get(output_options, "server.data.host"); - qobject_incref(val); - qdict_put_obj(output_options, "server.host", val); - qdict_del(output_options, "server.data.host"); - } - if (sd_port) { - val =3D qdict_get(output_options, "server.data.port"); - qobject_incref(val); - qdict_put_obj(output_options, "server.port", val); - qdict_del(output_options, "server.data.port"); - } - if (sd_path) { - val =3D qdict_get(output_options, "server.data.path"); - qobject_incref(val); - qdict_put_obj(output_options, "server.path", val); - qdict_del(output_options, "server.data.path"); - } - return true; - } - - assert(bare); - for (e =3D qdict_first(output_options); e; e =3D qdict_next(output_opt= ions, e)) { if (strstart(e->key, "server.", NULL)) { --=20 2.7.4