From nobody Tue May 7 12:53:40 2024 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 1487695487350818.4307728587419; Tue, 21 Feb 2017 08:44:47 -0800 (PST) Received: from localhost ([::1]:46822 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgDYU-0007wo-0B for importer@patchew.org; Tue, 21 Feb 2017 11:44:46 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgCYw-0005vg-9m for qemu-devel@nongnu.org; Tue, 21 Feb 2017 10:41:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgCYu-0004NB-Ff for qemu-devel@nongnu.org; Tue, 21 Feb 2017 10:41:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35026) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cgCYn-0004JQ-Mz; Tue, 21 Feb 2017 10:41:01 -0500 Received: from smtp.corp.redhat.com (int-mx16.intmail.prod.int.phx2.redhat.com [10.5.11.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CFE6BC04B320; Tue, 21 Feb 2017 15:41:00 +0000 (UTC) Received: from localhost (ovpn-116-19.phx2.redhat.com [10.3.116.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 78C366D229; Tue, 21 Feb 2017 15:41:00 +0000 (UTC) From: Jeff Cody To: qemu-block@nongnu.org Date: Tue, 21 Feb 2017 10:40:49 -0500 Message-Id: <20170221154057.20313-2-jcody@redhat.com> In-Reply-To: <20170221154057.20313-1-jcody@redhat.com> References: <20170221154057.20313-1-jcody@redhat.com> X-Scanned-By: MIMEDefang 2.74 on 10.5.11.28 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 21 Feb 2017 15:41:00 +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] [PULL 1/9] iscsi: Split URL into individual options 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: peter.maydell@linaro.org, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.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" From: Kevin Wolf This introduces a .bdrv_parse_filename handler for iscsi which parses an URL if given and translates it to individual options. Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf Signed-off-by: Jeff Cody --- block/iscsi.c | 193 ++++++++++++++++++++++++++++++++++++++++++------------= ---- 1 file changed, 140 insertions(+), 53 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 2561be9..d61d3d8 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1483,20 +1483,6 @@ static void iscsi_readcapacity_sync(IscsiLun *iscsil= un, Error **errp) } } =20 -/* TODO Convert to fine grained options */ -static QemuOptsList runtime_opts =3D { - .name =3D "iscsi", - .head =3D QTAILQ_HEAD_INITIALIZER(runtime_opts.head), - .desc =3D { - { - .name =3D "filename", - .type =3D QEMU_OPT_STRING, - .help =3D "URL to the iscsi image", - }, - { /* end of list */ } - }, -}; - static struct scsi_task *iscsi_do_inquiry(struct iscsi_context *iscsi, int= lun, int evpd, int pc, void **inq, Er= ror **errp) { @@ -1618,20 +1604,102 @@ out: * We support iscsi url's on the form * iscsi://[%@][:]// */ +static void iscsi_parse_filename(const char *filename, QDict *options, + Error **errp) +{ + struct iscsi_url *iscsi_url; + const char *transport_name; + char *lun_str; + + iscsi_url =3D iscsi_parse_full_url(NULL, filename); + if (iscsi_url =3D=3D NULL) { + error_setg(errp, "Failed to parse URL : %s", filename); + return; + } + +#if LIBISCSI_API_VERSION >=3D (20160603) + switch (iscsi_url->transport) { + case TCP_TRANSPORT: + transport_name =3D "tcp"; + break; + case ISER_TRANSPORT: + transport_name =3D "iser"; + break; + default: + error_setg(errp, "Unknown transport type (%d)", + iscsi_url->transport); + return; + } +#else + transport_name =3D "tcp"; +#endif + + qdict_set_default_str(options, "transport", transport_name); + qdict_set_default_str(options, "portal", iscsi_url->portal); + qdict_set_default_str(options, "target", iscsi_url->target); + + lun_str =3D g_strdup_printf("%d", iscsi_url->lun); + qdict_set_default_str(options, "lun", lun_str); + g_free(lun_str); + + if (iscsi_url->user[0] !=3D '\0') { + qdict_set_default_str(options, "user", iscsi_url->user); + qdict_set_default_str(options, "password", iscsi_url->passwd); + } + + iscsi_destroy_url(iscsi_url); +} + +/* TODO Add -iscsi options */ +static QemuOptsList runtime_opts =3D { + .name =3D "iscsi", + .head =3D QTAILQ_HEAD_INITIALIZER(runtime_opts.head), + .desc =3D { + { + .name =3D "transport", + .type =3D QEMU_OPT_STRING, + }, + { + .name =3D "portal", + .type =3D QEMU_OPT_STRING, + }, + { + .name =3D "target", + .type =3D QEMU_OPT_STRING, + }, + { + .name =3D "user", + .type =3D QEMU_OPT_STRING, + }, + { + .name =3D "password", + .type =3D QEMU_OPT_STRING, + }, + { + .name =3D "lun", + .type =3D QEMU_OPT_NUMBER, + }, + { /* end of list */ } + }, +}; + static int iscsi_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { IscsiLun *iscsilun =3D bs->opaque; struct iscsi_context *iscsi =3D NULL; - struct iscsi_url *iscsi_url =3D NULL; struct scsi_task *task =3D NULL; struct scsi_inquiry_standard *inq =3D NULL; struct scsi_inquiry_supported_pages *inq_vpd; char *initiator_name =3D NULL; QemuOpts *opts; Error *local_err =3D NULL; - const char *filename; - int i, ret =3D 0, timeout =3D 0; + const char *transport_name, *portal, *target; + const char *user, *password; +#if LIBISCSI_API_VERSION >=3D (20160603) + enum iscsi_transport_type transport; +#endif + int i, ret =3D 0, timeout =3D 0, lun; =20 opts =3D qemu_opts_create(&runtime_opts, NULL, 0, &error_abort); qemu_opts_absorb_qdict(opts, options, &local_err); @@ -1641,18 +1709,41 @@ static int iscsi_open(BlockDriverState *bs, QDict *= options, int flags, goto out; } =20 - filename =3D qemu_opt_get(opts, "filename"); + transport_name =3D qemu_opt_get(opts, "transport"); + portal =3D qemu_opt_get(opts, "portal"); + target =3D qemu_opt_get(opts, "target"); + user =3D qemu_opt_get(opts, "user"); + password =3D qemu_opt_get(opts, "password"); + lun =3D qemu_opt_get_number(opts, "lun", 0); =20 - iscsi_url =3D iscsi_parse_full_url(iscsi, filename); - if (iscsi_url =3D=3D NULL) { - error_setg(errp, "Failed to parse URL : %s", filename); + if (!transport_name || !portal || !target) { + error_setg(errp, "Need all of transport, portal and target options= "); + ret =3D -EINVAL; + goto out; + } + if (user && !password) { + error_setg(errp, "If a user name is given, a password is required"= ); + ret =3D -EINVAL; + goto out; + } + + if (!strcmp(transport_name, "tcp")) { +#if LIBISCSI_API_VERSION >=3D (20160603) + transport =3D TCP_TRANSPORT; + } else if (!strcmp(transport_name, "iser")) { + transport =3D ISER_TRANSPORT; +#else + /* TCP is what older libiscsi versions always use */ +#endif + } else { + error_setg(errp, "Unknown transport: %s", transport_name); ret =3D -EINVAL; goto out; } =20 memset(iscsilun, 0, sizeof(IscsiLun)); =20 - initiator_name =3D parse_initiator_name(iscsi_url->target); + initiator_name =3D parse_initiator_name(target); =20 iscsi =3D iscsi_create_context(initiator_name); if (iscsi =3D=3D NULL) { @@ -1661,21 +1752,20 @@ static int iscsi_open(BlockDriverState *bs, QDict *= options, int flags, goto out; } #if LIBISCSI_API_VERSION >=3D (20160603) - if (iscsi_init_transport(iscsi, iscsi_url->transport)) { + if (iscsi_init_transport(iscsi, transport)) { error_setg(errp, ("Error initializing transport.")); ret =3D -EINVAL; goto out; } #endif - if (iscsi_set_targetname(iscsi, iscsi_url->target)) { + if (iscsi_set_targetname(iscsi, target)) { error_setg(errp, "iSCSI: Failed to set target name."); ret =3D -EINVAL; goto out; } =20 - if (iscsi_url->user[0] !=3D '\0') { - ret =3D iscsi_set_initiator_username_pwd(iscsi, iscsi_url->user, - iscsi_url->passwd); + if (user) { + ret =3D iscsi_set_initiator_username_pwd(iscsi, user, password); if (ret !=3D 0) { error_setg(errp, "Failed to set initiator username and passwor= d"); ret =3D -EINVAL; @@ -1684,7 +1774,7 @@ static int iscsi_open(BlockDriverState *bs, QDict *op= tions, int flags, } =20 /* check if we got CHAP username/password via the options */ - parse_chap(iscsi, iscsi_url->target, &local_err); + parse_chap(iscsi, target, &local_err); if (local_err !=3D NULL) { error_propagate(errp, local_err); ret =3D -EINVAL; @@ -1700,7 +1790,7 @@ static int iscsi_open(BlockDriverState *bs, QDict *op= tions, int flags, iscsi_set_header_digest(iscsi, ISCSI_HEADER_DIGEST_NONE_CRC32C); =20 /* check if we got HEADER_DIGEST via the options */ - parse_header_digest(iscsi, iscsi_url->target, &local_err); + parse_header_digest(iscsi, target, &local_err); if (local_err !=3D NULL) { error_propagate(errp, local_err); ret =3D -EINVAL; @@ -1708,7 +1798,7 @@ static int iscsi_open(BlockDriverState *bs, QDict *op= tions, int flags, } =20 /* timeout handling is broken in libiscsi before 1.15.0 */ - timeout =3D parse_timeout(iscsi_url->target); + timeout =3D parse_timeout(target); #if LIBISCSI_API_VERSION >=3D 20150621 iscsi_set_timeout(iscsi, timeout); #else @@ -1717,7 +1807,7 @@ static int iscsi_open(BlockDriverState *bs, QDict *op= tions, int flags, } #endif =20 - if (iscsi_full_connect_sync(iscsi, iscsi_url->portal, iscsi_url->lun) = !=3D 0) { + if (iscsi_full_connect_sync(iscsi, portal, lun) !=3D 0) { error_setg(errp, "iSCSI: Failed to connect to LUN : %s", iscsi_get_error(iscsi)); ret =3D -EINVAL; @@ -1726,7 +1816,7 @@ static int iscsi_open(BlockDriverState *bs, QDict *op= tions, int flags, =20 iscsilun->iscsi =3D iscsi; iscsilun->aio_context =3D bdrv_get_aio_context(bs); - iscsilun->lun =3D iscsi_url->lun; + iscsilun->lun =3D lun; iscsilun->has_write_same =3D true; =20 task =3D iscsi_do_inquiry(iscsilun->iscsi, iscsilun->lun, 0, 0, @@ -1829,9 +1919,6 @@ static int iscsi_open(BlockDriverState *bs, QDict *op= tions, int flags, out: qemu_opts_del(opts); g_free(initiator_name); - if (iscsi_url !=3D NULL) { - iscsi_destroy_url(iscsi_url); - } if (task !=3D NULL) { scsi_free_scsi_task(task); } @@ -2040,15 +2127,15 @@ static BlockDriver bdrv_iscsi =3D { .format_name =3D "iscsi", .protocol_name =3D "iscsi", =20 - .instance_size =3D sizeof(IscsiLun), - .bdrv_needs_filename =3D true, - .bdrv_file_open =3D iscsi_open, - .bdrv_close =3D iscsi_close, - .bdrv_create =3D iscsi_create, - .create_opts =3D &iscsi_create_opts, - .bdrv_reopen_prepare =3D iscsi_reopen_prepare, - .bdrv_reopen_commit =3D iscsi_reopen_commit, - .bdrv_invalidate_cache =3D iscsi_invalidate_cache, + .instance_size =3D sizeof(IscsiLun), + .bdrv_parse_filename =3D iscsi_parse_filename, + .bdrv_file_open =3D iscsi_open, + .bdrv_close =3D iscsi_close, + .bdrv_create =3D iscsi_create, + .create_opts =3D &iscsi_create_opts, + .bdrv_reopen_prepare =3D iscsi_reopen_prepare, + .bdrv_reopen_commit =3D iscsi_reopen_commit, + .bdrv_invalidate_cache =3D iscsi_invalidate_cache, =20 .bdrv_getlength =3D iscsi_getlength, .bdrv_get_info =3D iscsi_get_info, @@ -2075,15 +2162,15 @@ static BlockDriver bdrv_iser =3D { .format_name =3D "iser", .protocol_name =3D "iser", =20 - .instance_size =3D sizeof(IscsiLun), - .bdrv_needs_filename =3D true, - .bdrv_file_open =3D iscsi_open, - .bdrv_close =3D iscsi_close, - .bdrv_create =3D iscsi_create, - .create_opts =3D &iscsi_create_opts, - .bdrv_reopen_prepare =3D iscsi_reopen_prepare, - .bdrv_reopen_commit =3D iscsi_reopen_commit, - .bdrv_invalidate_cache =3D iscsi_invalidate_cache, + .instance_size =3D sizeof(IscsiLun), + .bdrv_parse_filename =3D iscsi_parse_filename, + .bdrv_file_open =3D iscsi_open, + .bdrv_close =3D iscsi_close, + .bdrv_create =3D iscsi_create, + .create_opts =3D &iscsi_create_opts, + .bdrv_reopen_prepare =3D iscsi_reopen_prepare, + .bdrv_reopen_commit =3D iscsi_reopen_commit, + .bdrv_invalidate_cache =3D iscsi_invalidate_cache, =20 .bdrv_getlength =3D iscsi_getlength, .bdrv_get_info =3D iscsi_get_info, --=20 2.9.3 From nobody Tue May 7 12:53:40 2024 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 14876958923691005.3698627044115; Tue, 21 Feb 2017 08:51:32 -0800 (PST) Received: from localhost ([::1]:46869 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgDf0-0005aZ-U5 for importer@patchew.org; Tue, 21 Feb 2017 11:51:30 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgCYu-0005tl-PR for qemu-devel@nongnu.org; Tue, 21 Feb 2017 10:41:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgCYt-0004MK-FN for qemu-devel@nongnu.org; Tue, 21 Feb 2017 10:41:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48868) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cgCYo-0004Ji-RZ; Tue, 21 Feb 2017 10:41:03 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EEEAD6AACA; Tue, 21 Feb 2017 15:41:01 +0000 (UTC) Received: from localhost (ovpn-116-19.phx2.redhat.com [10.3.116.19]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1LFf1NA021247 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 21 Feb 2017 10:41:01 -0500 From: Jeff Cody To: qemu-block@nongnu.org Date: Tue, 21 Feb 2017 10:40:50 -0500 Message-Id: <20170221154057.20313-3-jcody@redhat.com> In-Reply-To: <20170221154057.20313-1-jcody@redhat.com> References: <20170221154057.20313-1-jcody@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 21 Feb 2017 15:41:02 +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] [PULL 2/9] iscsi: Handle -iscsi user/password in bdrv_parse_filename() 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: peter.maydell@linaro.org, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.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" From: Kevin Wolf This splits the logic in the old parse_chap() function into a part that parses the -iscsi options into the new driver-specific options, and another part that actually applies those options (called apply_chap() now). Note that this means that username and password specified with -iscsi only take effect when a URL is provided. This is intentional, -iscsi is a legacy interface only supported for compatibility, new users should use the proper driver-specific options. Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf Signed-off-by: Jeff Cody --- block/iscsi.c | 78 +++++++++++++++++++++++++++++++++----------------------= ---- 1 file changed, 44 insertions(+), 34 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index d61d3d8..ec26fc6 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1245,29 +1245,14 @@ retry: return 0; } =20 -static void parse_chap(struct iscsi_context *iscsi, const char *target, +static void apply_chap(struct iscsi_context *iscsi, QemuOpts *opts, Error **errp) { - QemuOptsList *list; - QemuOpts *opts; const char *user =3D NULL; const char *password =3D NULL; const char *secretid; char *secret =3D NULL; =20 - list =3D qemu_find_opts("iscsi"); - if (!list) { - return; - } - - opts =3D qemu_opts_find(list, target); - if (opts =3D=3D NULL) { - opts =3D QTAILQ_FIRST(&list->head); - if (!opts) { - return; - } - } - user =3D qemu_opt_get(opts, "user"); if (!user) { return; @@ -1600,6 +1585,41 @@ out: } } =20 +static void iscsi_parse_iscsi_option(const char *target, QDict *options) +{ + QemuOptsList *list; + QemuOpts *opts; + const char *user, *password, *password_secret; + + list =3D qemu_find_opts("iscsi"); + if (!list) { + return; + } + + opts =3D qemu_opts_find(list, target); + if (opts =3D=3D NULL) { + opts =3D QTAILQ_FIRST(&list->head); + if (!opts) { + return; + } + } + + user =3D qemu_opt_get(opts, "user"); + if (user) { + qdict_set_default_str(options, "user", user); + } + + password =3D qemu_opt_get(opts, "password"); + if (password) { + qdict_set_default_str(options, "password", password); + } + + password_secret =3D qemu_opt_get(opts, "password-secret"); + if (password_secret) { + qdict_set_default_str(options, "password-secret", password_secret); + } +} + /* * We support iscsi url's on the form * iscsi://[%@][:]// @@ -1642,6 +1662,9 @@ static void iscsi_parse_filename(const char *filename= , QDict *options, qdict_set_default_str(options, "lun", lun_str); g_free(lun_str); =20 + /* User/password from -iscsi take precedence over those from the URL */ + iscsi_parse_iscsi_option(iscsi_url->target, options); + if (iscsi_url->user[0] !=3D '\0') { qdict_set_default_str(options, "user", iscsi_url->user); qdict_set_default_str(options, "password", iscsi_url->passwd); @@ -1676,6 +1699,10 @@ static QemuOptsList runtime_opts =3D { .type =3D QEMU_OPT_STRING, }, { + .name =3D "password-secret", + .type =3D QEMU_OPT_STRING, + }, + { .name =3D "lun", .type =3D QEMU_OPT_NUMBER, }, @@ -1695,7 +1722,6 @@ static int iscsi_open(BlockDriverState *bs, QDict *op= tions, int flags, QemuOpts *opts; Error *local_err =3D NULL; const char *transport_name, *portal, *target; - const char *user, *password; #if LIBISCSI_API_VERSION >=3D (20160603) enum iscsi_transport_type transport; #endif @@ -1712,8 +1738,6 @@ static int iscsi_open(BlockDriverState *bs, QDict *op= tions, int flags, transport_name =3D qemu_opt_get(opts, "transport"); portal =3D qemu_opt_get(opts, "portal"); target =3D qemu_opt_get(opts, "target"); - user =3D qemu_opt_get(opts, "user"); - password =3D qemu_opt_get(opts, "password"); lun =3D qemu_opt_get_number(opts, "lun", 0); =20 if (!transport_name || !portal || !target) { @@ -1721,11 +1745,6 @@ static int iscsi_open(BlockDriverState *bs, QDict *o= ptions, int flags, ret =3D -EINVAL; goto out; } - if (user && !password) { - error_setg(errp, "If a user name is given, a password is required"= ); - ret =3D -EINVAL; - goto out; - } =20 if (!strcmp(transport_name, "tcp")) { #if LIBISCSI_API_VERSION >=3D (20160603) @@ -1764,17 +1783,8 @@ static int iscsi_open(BlockDriverState *bs, QDict *o= ptions, int flags, goto out; } =20 - if (user) { - ret =3D iscsi_set_initiator_username_pwd(iscsi, user, password); - if (ret !=3D 0) { - error_setg(errp, "Failed to set initiator username and passwor= d"); - ret =3D -EINVAL; - goto out; - } - } - /* check if we got CHAP username/password via the options */ - parse_chap(iscsi, target, &local_err); + apply_chap(iscsi, opts, &local_err); if (local_err !=3D NULL) { error_propagate(errp, local_err); ret =3D -EINVAL; --=20 2.9.3 From nobody Tue May 7 12:53:40 2024 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 1487695301668628.5574191325276; Tue, 21 Feb 2017 08:41:41 -0800 (PST) Received: from localhost ([::1]:46808 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgDVS-0004cE-7I for importer@patchew.org; Tue, 21 Feb 2017 11:41:38 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55203) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgCYu-0005te-MG for qemu-devel@nongnu.org; Tue, 21 Feb 2017 10:41:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgCYt-0004MW-Mx for qemu-devel@nongnu.org; Tue, 21 Feb 2017 10:41:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60026) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cgCYp-0004Jl-6S; Tue, 21 Feb 2017 10:41:03 -0500 Received: from smtp.corp.redhat.com (int-mx16.intmail.prod.int.phx2.redhat.com [10.5.11.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D71A34E02A; Tue, 21 Feb 2017 15:41:02 +0000 (UTC) Received: from localhost (ovpn-116-19.phx2.redhat.com [10.3.116.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8B49E6D9AF; Tue, 21 Feb 2017 15:41:02 +0000 (UTC) From: Jeff Cody To: qemu-block@nongnu.org Date: Tue, 21 Feb 2017 10:40:51 -0500 Message-Id: <20170221154057.20313-4-jcody@redhat.com> In-Reply-To: <20170221154057.20313-1-jcody@redhat.com> References: <20170221154057.20313-1-jcody@redhat.com> X-Scanned-By: MIMEDefang 2.74 on 10.5.11.28 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 21 Feb 2017 15:41:02 +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] [PULL 3/9] iscsi: Add initiator-name option 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: peter.maydell@linaro.org, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.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" From: Kevin Wolf This was previously only available with -iscsi. Again, after this patch, the -iscsi option only takes effect if an URL is given. New users are supposed to use the new driver-specific option. Reviewed-by: Daniel P. Berrange Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf Signed-off-by: Jeff Cody --- block/iscsi.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index ec26fc6..6db5615 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1321,26 +1321,15 @@ static void parse_header_digest(struct iscsi_contex= t *iscsi, const char *target, } } =20 -static char *parse_initiator_name(const char *target) +static char *get_initiator_name(QemuOpts *opts) { - QemuOptsList *list; - QemuOpts *opts; const char *name; char *iscsi_name; UuidInfo *uuid_info; =20 - list =3D qemu_find_opts("iscsi"); - if (list) { - opts =3D qemu_opts_find(list, target); - if (!opts) { - opts =3D QTAILQ_FIRST(&list->head); - } - if (opts) { - name =3D qemu_opt_get(opts, "initiator-name"); - if (name) { - return g_strdup(name); - } - } + name =3D qemu_opt_get(opts, "initiator-name"); + if (name) { + return g_strdup(name); } =20 uuid_info =3D qmp_query_uuid(NULL); @@ -1589,7 +1578,7 @@ static void iscsi_parse_iscsi_option(const char *targ= et, QDict *options) { QemuOptsList *list; QemuOpts *opts; - const char *user, *password, *password_secret; + const char *user, *password, *password_secret, *initiator_name; =20 list =3D qemu_find_opts("iscsi"); if (!list) { @@ -1618,6 +1607,11 @@ static void iscsi_parse_iscsi_option(const char *tar= get, QDict *options) if (password_secret) { qdict_set_default_str(options, "password-secret", password_secret); } + + initiator_name =3D qemu_opt_get(opts, "initiator-name"); + if (initiator_name) { + qdict_set_default_str(options, "initiator-name", initiator_name); + } } =20 /* @@ -1706,6 +1700,10 @@ static QemuOptsList runtime_opts =3D { .name =3D "lun", .type =3D QEMU_OPT_NUMBER, }, + { + .name =3D "initiator-name", + .type =3D QEMU_OPT_STRING, + }, { /* end of list */ } }, }; @@ -1762,7 +1760,7 @@ static int iscsi_open(BlockDriverState *bs, QDict *op= tions, int flags, =20 memset(iscsilun, 0, sizeof(IscsiLun)); =20 - initiator_name =3D parse_initiator_name(target); + initiator_name =3D get_initiator_name(opts); =20 iscsi =3D iscsi_create_context(initiator_name); if (iscsi =3D=3D NULL) { --=20 2.9.3 From nobody Tue May 7 12:53:40 2024 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 1487695556962871.8848707989932; Tue, 21 Feb 2017 08:45:56 -0800 (PST) Received: from localhost ([::1]:46832 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgDZa-0000b6-Mz for importer@patchew.org; Tue, 21 Feb 2017 11:45:54 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgCYv-0005ty-32 for qemu-devel@nongnu.org; Tue, 21 Feb 2017 10:41:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgCYt-0004Mm-Up for qemu-devel@nongnu.org; Tue, 21 Feb 2017 10:41:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49758) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cgCYp-0004K8-Pg; Tue, 21 Feb 2017 10:41:03 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DE66E42BA0; Tue, 21 Feb 2017 15:41:03 +0000 (UTC) Received: from localhost (ovpn-116-19.phx2.redhat.com [10.3.116.19]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1LFf3s5004201 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 21 Feb 2017 10:41:03 -0500 From: Jeff Cody To: qemu-block@nongnu.org Date: Tue, 21 Feb 2017 10:40:52 -0500 Message-Id: <20170221154057.20313-5-jcody@redhat.com> In-Reply-To: <20170221154057.20313-1-jcody@redhat.com> References: <20170221154057.20313-1-jcody@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 21 Feb 2017 15:41:03 +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] [PULL 4/9] iscsi: Add header-digest option 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: peter.maydell@linaro.org, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.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" From: Kevin Wolf This was previously only available with -iscsi. Again, after this patch, the -iscsi option only takes effect if an URL is given. New users are supposed to use the new driver-specific option. Reviewed-by: Daniel P. Berrange Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf Signed-off-by: Jeff Cody --- block/iscsi.c | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 6db5615..11bbb93 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1283,32 +1283,15 @@ static void apply_chap(struct iscsi_context *iscsi,= QemuOpts *opts, g_free(secret); } =20 -static void parse_header_digest(struct iscsi_context *iscsi, const char *t= arget, +static void apply_header_digest(struct iscsi_context *iscsi, QemuOpts *opt= s, Error **errp) { - QemuOptsList *list; - QemuOpts *opts; const char *digest =3D NULL; =20 - list =3D qemu_find_opts("iscsi"); - if (!list) { - return; - } - - opts =3D qemu_opts_find(list, target); - if (opts =3D=3D NULL) { - opts =3D QTAILQ_FIRST(&list->head); - if (!opts) { - return; - } - } - digest =3D qemu_opt_get(opts, "header-digest"); if (!digest) { - return; - } - - if (!strcmp(digest, "CRC32C")) { + iscsi_set_header_digest(iscsi, ISCSI_HEADER_DIGEST_NONE_CRC32C); + } else if (!strcmp(digest, "CRC32C")) { iscsi_set_header_digest(iscsi, ISCSI_HEADER_DIGEST_CRC32C); } else if (!strcmp(digest, "NONE")) { iscsi_set_header_digest(iscsi, ISCSI_HEADER_DIGEST_NONE); @@ -1578,7 +1561,8 @@ static void iscsi_parse_iscsi_option(const char *targ= et, QDict *options) { QemuOptsList *list; QemuOpts *opts; - const char *user, *password, *password_secret, *initiator_name; + const char *user, *password, *password_secret, *initiator_name, + *header_digest; =20 list =3D qemu_find_opts("iscsi"); if (!list) { @@ -1612,6 +1596,11 @@ static void iscsi_parse_iscsi_option(const char *tar= get, QDict *options) if (initiator_name) { qdict_set_default_str(options, "initiator-name", initiator_name); } + + header_digest =3D qemu_opt_get(opts, "header-digest"); + if (header_digest) { + qdict_set_default_str(options, "header-digest", header_digest); + } } =20 /* @@ -1704,6 +1693,10 @@ static QemuOptsList runtime_opts =3D { .name =3D "initiator-name", .type =3D QEMU_OPT_STRING, }, + { + .name =3D "header-digest", + .type =3D QEMU_OPT_STRING, + }, { /* end of list */ } }, }; @@ -1795,10 +1788,8 @@ static int iscsi_open(BlockDriverState *bs, QDict *o= ptions, int flags, goto out; } =20 - iscsi_set_header_digest(iscsi, ISCSI_HEADER_DIGEST_NONE_CRC32C); - /* check if we got HEADER_DIGEST via the options */ - parse_header_digest(iscsi, target, &local_err); + apply_header_digest(iscsi, opts, &local_err); if (local_err !=3D NULL) { error_propagate(errp, local_err); ret =3D -EINVAL; --=20 2.9.3 From nobody Tue May 7 12:53:40 2024 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 1487694945567459.6354687285425; Tue, 21 Feb 2017 08:35:45 -0800 (PST) Received: from localhost ([::1]:46763 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgDPh-0007MJ-6K for importer@patchew.org; Tue, 21 Feb 2017 11:35:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55193) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgCYu-0005tB-Ao for qemu-devel@nongnu.org; Tue, 21 Feb 2017 10:41:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgCYt-0004MP-Fr for qemu-devel@nongnu.org; Tue, 21 Feb 2017 10:41:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49766) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cgCYq-0004KY-N5; Tue, 21 Feb 2017 10:41:04 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CBC8942BA3; Tue, 21 Feb 2017 15:41:04 +0000 (UTC) Received: from localhost (ovpn-116-19.phx2.redhat.com [10.3.116.19]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1LFf4BJ018525 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 21 Feb 2017 10:41:04 -0500 From: Jeff Cody To: qemu-block@nongnu.org Date: Tue, 21 Feb 2017 10:40:53 -0500 Message-Id: <20170221154057.20313-6-jcody@redhat.com> In-Reply-To: <20170221154057.20313-1-jcody@redhat.com> References: <20170221154057.20313-1-jcody@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 21 Feb 2017 15:41:04 +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] [PULL 5/9] iscsi: Add timeout option 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: peter.maydell@linaro.org, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.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" From: Kevin Wolf This was previously only available with -iscsi. Again, after this patch, the -iscsi option only takes effect if an URL is given. New users are supposed to use the new driver-specific option. All -iscsi options have a corresponding driver-specific option for the iscsi block driver now. Reviewed-by: Daniel P. Berrange Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf Signed-off-by: Jeff Cody --- block/iscsi.c | 37 +++++++++++-------------------------- 1 file changed, 11 insertions(+), 26 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 11bbb93..3adb9b1 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1327,29 +1327,6 @@ static char *get_initiator_name(QemuOpts *opts) return iscsi_name; } =20 -static int parse_timeout(const char *target) -{ - QemuOptsList *list; - QemuOpts *opts; - const char *timeout; - - list =3D qemu_find_opts("iscsi"); - if (list) { - opts =3D qemu_opts_find(list, target); - if (!opts) { - opts =3D QTAILQ_FIRST(&list->head); - } - if (opts) { - timeout =3D qemu_opt_get(opts, "timeout"); - if (timeout) { - return atoi(timeout); - } - } - } - - return 0; -} - static void iscsi_nop_timed_event(void *opaque) { IscsiLun *iscsilun =3D opaque; @@ -1562,7 +1539,7 @@ static void iscsi_parse_iscsi_option(const char *targ= et, QDict *options) QemuOptsList *list; QemuOpts *opts; const char *user, *password, *password_secret, *initiator_name, - *header_digest; + *header_digest, *timeout; =20 list =3D qemu_find_opts("iscsi"); if (!list) { @@ -1601,6 +1578,11 @@ static void iscsi_parse_iscsi_option(const char *tar= get, QDict *options) if (header_digest) { qdict_set_default_str(options, "header-digest", header_digest); } + + timeout =3D qemu_opt_get(opts, "timeout"); + if (timeout) { + qdict_set_default_str(options, "timeout", timeout); + } } =20 /* @@ -1656,7 +1638,6 @@ static void iscsi_parse_filename(const char *filename= , QDict *options, iscsi_destroy_url(iscsi_url); } =20 -/* TODO Add -iscsi options */ static QemuOptsList runtime_opts =3D { .name =3D "iscsi", .head =3D QTAILQ_HEAD_INITIALIZER(runtime_opts.head), @@ -1697,6 +1678,10 @@ static QemuOptsList runtime_opts =3D { .name =3D "header-digest", .type =3D QEMU_OPT_STRING, }, + { + .name =3D "timeout", + .type =3D QEMU_OPT_NUMBER, + }, { /* end of list */ } }, }; @@ -1797,7 +1782,7 @@ static int iscsi_open(BlockDriverState *bs, QDict *op= tions, int flags, } =20 /* timeout handling is broken in libiscsi before 1.15.0 */ - timeout =3D parse_timeout(target); + timeout =3D qemu_opt_get_number(opts, "timeout", 0); #if LIBISCSI_API_VERSION >=3D 20150621 iscsi_set_timeout(iscsi, timeout); #else --=20 2.9.3 From nobody Tue May 7 12:53:40 2024 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 1487697067969970.5391534524518; Tue, 21 Feb 2017 09:11:07 -0800 (PST) Received: from localhost ([::1]:47036 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgDxv-0007U3-Gm for importer@patchew.org; Tue, 21 Feb 2017 12:11:03 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55292) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgCYx-0005wm-Bn for qemu-devel@nongnu.org; Tue, 21 Feb 2017 10:41:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgCYw-0004OF-5R for qemu-devel@nongnu.org; Tue, 21 Feb 2017 10:41:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33350) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cgCYr-0004Kt-N4; Tue, 21 Feb 2017 10:41:05 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CA33C7FB96; Tue, 21 Feb 2017 15:41:05 +0000 (UTC) Received: from localhost (ovpn-116-19.phx2.redhat.com [10.3.116.19]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1LFf4t2004216 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 21 Feb 2017 10:41:05 -0500 From: Jeff Cody To: qemu-block@nongnu.org Date: Tue, 21 Feb 2017 10:40:54 -0500 Message-Id: <20170221154057.20313-7-jcody@redhat.com> In-Reply-To: <20170221154057.20313-1-jcody@redhat.com> References: <20170221154057.20313-1-jcody@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 21 Feb 2017 15:41:05 +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] [PULL 6/9] iscsi: Add blockdev-add support 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: peter.maydell@linaro.org, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.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" From: Kevin Wolf This adds blockdev-add support for iscsi devices. Reviewed-by: Daniel P. Berrange Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf Signed-off-by: Jeff Cody --- block/iscsi.c | 14 ++++++---- qapi/block-core.json | 75 ++++++++++++++++++++++++++++++++++++++++++++++++= ---- 2 files changed, 79 insertions(+), 10 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 3adb9b1..c4f813b 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1291,13 +1291,13 @@ static void apply_header_digest(struct iscsi_contex= t *iscsi, QemuOpts *opts, digest =3D qemu_opt_get(opts, "header-digest"); if (!digest) { iscsi_set_header_digest(iscsi, ISCSI_HEADER_DIGEST_NONE_CRC32C); - } else if (!strcmp(digest, "CRC32C")) { + } else if (!strcmp(digest, "crc32c")) { iscsi_set_header_digest(iscsi, ISCSI_HEADER_DIGEST_CRC32C); - } else if (!strcmp(digest, "NONE")) { + } else if (!strcmp(digest, "none")) { iscsi_set_header_digest(iscsi, ISCSI_HEADER_DIGEST_NONE); - } else if (!strcmp(digest, "CRC32C-NONE")) { + } else if (!strcmp(digest, "crc32c-none")) { iscsi_set_header_digest(iscsi, ISCSI_HEADER_DIGEST_CRC32C_NONE); - } else if (!strcmp(digest, "NONE-CRC32C")) { + } else if (!strcmp(digest, "none-crc32c")) { iscsi_set_header_digest(iscsi, ISCSI_HEADER_DIGEST_NONE_CRC32C); } else { error_setg(errp, "Invalid header-digest setting : %s", digest); @@ -1576,7 +1576,11 @@ static void iscsi_parse_iscsi_option(const char *tar= get, QDict *options) =20 header_digest =3D qemu_opt_get(opts, "header-digest"); if (header_digest) { - qdict_set_default_str(options, "header-digest", header_digest); + /* -iscsi takes upper case values, but QAPI only supports lower ca= se + * enum constant names, so we have to convert here. */ + char *qapi_value =3D g_ascii_strdown(header_digest, -1); + qdict_set_default_str(options, "header-digest", qapi_value); + g_free(qapi_value); } =20 timeout =3D qemu_opt_get(opts, "timeout"); diff --git a/qapi/block-core.json b/qapi/block-core.json index 932f5bb..ea9b04a 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -2110,16 +2110,17 @@ # @nfs: Since 2.8 # @replication: Since 2.8 # @ssh: Since 2.8 +# @iscsi: Since 2.9 # # Since: 2.0 ## { 'enum': 'BlockdevDriver', 'data': [ 'archipelago', 'blkdebug', 'blkverify', 'bochs', 'cloop', 'dmg', 'file', 'ftp', 'ftps', 'gluster', 'host_cdrom', - 'host_device', 'http', 'https', 'luks', 'nbd', 'nfs', 'null-ai= o', - 'null-co', 'parallels', 'qcow', 'qcow2', 'qed', 'quorum', 'raw= ', - 'replication', 'ssh', 'vdi', 'vhdx', 'vmdk', 'vpc', - 'vvfat' ] } + 'host_device', 'http', 'https', 'iscsi', 'luks', 'nbd', 'nfs', + 'null-aio', 'null-co', 'parallels', 'qcow', 'qcow2', 'qed', + 'quorum', 'raw', 'replication', 'ssh', 'vdi', 'vhdx', 'vmdk', + 'vpc', 'vvfat' ] } =20 ## # @BlockdevOptionsFile: @@ -2601,6 +2602,70 @@ '*logfile': 'str' } } =20 ## +# @IscsiTransport: +# +# An enumeration of libiscsi transport types +# +# Since: 2.9 +## +{ 'enum': 'IscsiTransport', + 'data': [ 'tcp', 'iser' ] } + +## +# @IscsiHeaderDigest: +# +# An enumeration of header digests supported by libiscsi +# +# Since: 2.9 +## +{ 'enum': 'IscsiHeaderDigest', + 'prefix': 'QAPI_ISCSI_HEADER_DIGEST', + 'data': [ 'crc32c', 'none', 'crc32c-none', 'none-crc32c' ] } + +## +# @BlockdevOptionsIscsi: +# +# @transport The iscsi transport type +# +# @portal The address of the iscsi portal +# +# @target The target iqn name +# +# @lun #optional LUN to connect to. Defaults to 0. +# +# @user #optional User name to log in with. If omitted, no CHAP +# authentication is performed. +# +# @password-secret #optional The ID of a QCryptoSecret object providing +# the password for the login. This option is required if +# @user is specified. +# +# @initiator-name #optional The iqn name we want to identify to the targ= et +# as. If this option is not specified, an initiator name= is +# generated automatically. +# +# @header-digest #optional The desired header digest. Defaults to +# none-crc32c. +# +# @timeout #optional Timeout in seconds after which a request will +# timeout. 0 means no timeout and is the default. +# +# Driver specific block device options for iscsi +# +# Since: 2.9 +## +{ 'struct': 'BlockdevOptionsIscsi', + 'data': { 'transport': 'IscsiTransport', + 'portal': 'str', + 'target': 'str', + '*lun': 'int', + '*user': 'str', + '*password-secret': 'str', + '*initiator-name': 'str', + '*header-digest': 'IscsiHeaderDigest', + '*timeout': 'int' } } + +## # @ReplicationMode: # # An enumeration of replication modes. @@ -2786,7 +2851,7 @@ 'host_device':'BlockdevOptionsFile', 'http': 'BlockdevOptionsCurl', 'https': 'BlockdevOptionsCurl', -# TODO iscsi: Wait for structured options + 'iscsi': 'BlockdevOptionsIscsi', 'luks': 'BlockdevOptionsLUKS', 'nbd': 'BlockdevOptionsNbd', 'nfs': 'BlockdevOptionsNfs', --=20 2.9.3 From nobody Tue May 7 12:53:40 2024 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 1487695218750326.5257590644409; Tue, 21 Feb 2017 08:40:18 -0800 (PST) Received: from localhost ([::1]:46792 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgDU7-0003Pk-EC for importer@patchew.org; Tue, 21 Feb 2017 11:40:15 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgCYw-0005vf-9V for qemu-devel@nongnu.org; Tue, 21 Feb 2017 10:41:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgCYv-0004Nr-Gj for qemu-devel@nongnu.org; Tue, 21 Feb 2017 10:41:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49784) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cgCYt-0004LC-0K; Tue, 21 Feb 2017 10:41:07 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BEC113D957; Tue, 21 Feb 2017 15:41:06 +0000 (UTC) Received: from localhost (ovpn-116-19.phx2.redhat.com [10.3.116.19]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1LFf5mb004227 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 21 Feb 2017 10:41:06 -0500 From: Jeff Cody To: qemu-block@nongnu.org Date: Tue, 21 Feb 2017 10:40:55 -0500 Message-Id: <20170221154057.20313-8-jcody@redhat.com> In-Reply-To: <20170221154057.20313-1-jcody@redhat.com> References: <20170221154057.20313-1-jcody@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 21 Feb 2017 15:41:06 +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] [PULL 7/9] QAPI: Fix blockdev-add example documentation 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: peter.maydell@linaro.org, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.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" Signed-off-by: Jeff Cody --- qapi/block-core.json | 50 +++++++++++++++++++++++++-----------------------= -- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index ea9b04a..5f82d35 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -2910,34 +2910,36 @@ # 1. # -> { "execute": "blockdev-add", # "arguments": { -# "options" : { "driver": "qcow2", -# "file": { "driver": "file", -# "filename": "test.qcow2" } } } } +# "driver": "qcow2", +# "node-name": "test1", +# "file": { +# "driver": "file", +# "filename": "test.qcow2" +# } +# } +# } # <- { "return": {} } # # 2. # -> { "execute": "blockdev-add", # "arguments": { -# "options": { -# "driver": "qcow2", -# "node-name": "node0", -# "discard": "unmap", -# "cache": { -# "direct": true, -# "writeback": true +# "driver": "qcow2", +# "node-name": "node0", +# "discard": "unmap", +# "cache": { +# "direct": true # }, # "file": { -# "driver": "file", -# "filename": "/tmp/test.qcow2" +# "driver": "file", +# "filename": "/tmp/test.qcow2" # }, # "backing": { -# "driver": "raw", -# "file": { -# "driver": "file", -# "filename": "/dev/fdset/4" +# "driver": "raw", +# "file": { +# "driver": "file", +# "filename": "/dev/fdset/4" # } # } -# } # } # } # @@ -2965,14 +2967,12 @@ # # -> { "execute": "blockdev-add", # "arguments": { -# "options": { -# "driver": "qcow2", -# "node-name": "node0", -# "file": { -# "driver": "file", -# "filename": "test.qcow2" -# } -# } +# "driver": "qcow2", +# "node-name": "node0", +# "file": { +# "driver": "file", +# "filename": "test.qcow2" +# } # } # } # <- { "return": {} } --=20 2.9.3 From nobody Tue May 7 12:53:40 2024 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 1487696795479439.5548243493222; Tue, 21 Feb 2017 09:06:35 -0800 (PST) Received: from localhost ([::1]:47003 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgDtY-00033g-2s for importer@patchew.org; Tue, 21 Feb 2017 12:06:32 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgCYx-0005wt-F2 for qemu-devel@nongnu.org; Tue, 21 Feb 2017 10:41:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgCYw-0004OW-Ib for qemu-devel@nongnu.org; Tue, 21 Feb 2017 10:41:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48934) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cgCYt-0004Lq-I9; Tue, 21 Feb 2017 10:41:07 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ADF4C7E9F1; Tue, 21 Feb 2017 15:41:07 +0000 (UTC) Received: from localhost (ovpn-116-19.phx2.redhat.com [10.3.116.19]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1LFf6Ic021293 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 21 Feb 2017 10:41:07 -0500 From: Jeff Cody To: qemu-block@nongnu.org Date: Tue, 21 Feb 2017 10:40:56 -0500 Message-Id: <20170221154057.20313-9-jcody@redhat.com> In-Reply-To: <20170221154057.20313-1-jcody@redhat.com> References: <20170221154057.20313-1-jcody@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 21 Feb 2017 15:41:07 +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] [PULL 8/9] mirror: do not increase offset during initial zero_or_discard phase 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: peter.maydell@linaro.org, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.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" From: Anton Nefedov If explicit zeroing out before mirroring is required for the target image, it moves the block job offset counter to EOF, then offset and len counters count the image size twice. There is no harm but stats are confusing, specifically the progress of the operation is always reported as 99% by management tools. The patch skips offset increase for the first "technical" pass over the image. This should not cause any further harm. Signed-off-by: Anton Nefedov Signed-off-by: Denis V. Lunev Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Message-id: 1486045515-8009-1-git-send-email-den@openvz.org CC: Jeff Cody CC: Kevin Wolf CC: Max Reitz CC: Eric Blake Signed-off-by: Jeff Cody --- block/mirror.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index 698a54e..ca8547b 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -69,6 +69,7 @@ typedef struct MirrorBlockJob { bool waiting_for_io; int target_cluster_sectors; int max_iov; + bool initial_zeroing_ongoing; } MirrorBlockJob; =20 typedef struct MirrorOp { @@ -117,9 +118,10 @@ static void mirror_iteration_done(MirrorOp *op, int re= t) if (s->cow_bitmap) { bitmap_set(s->cow_bitmap, chunk_num, nb_chunks); } - s->common.offset +=3D (uint64_t)op->nb_sectors * BDRV_SECTOR_SIZE; + if (!s->initial_zeroing_ongoing) { + s->common.offset +=3D (uint64_t)op->nb_sectors * BDRV_SECTOR_S= IZE; + } } - qemu_iovec_destroy(&op->qiov); g_free(op); =20 @@ -572,6 +574,7 @@ static int coroutine_fn mirror_dirty_init(MirrorBlockJo= b *s) return 0; } =20 + s->initial_zeroing_ongoing =3D true; for (sector_num =3D 0; sector_num < end; ) { int nb_sectors =3D MIN(end - sector_num, QEMU_ALIGN_DOWN(INT_MAX, s->granularity) >> BDRV_SECTOR_BI= TS); @@ -579,6 +582,7 @@ static int coroutine_fn mirror_dirty_init(MirrorBlockJo= b *s) mirror_throttle(s); =20 if (block_job_is_cancelled(&s->common)) { + s->initial_zeroing_ongoing =3D false; return 0; } =20 @@ -593,6 +597,7 @@ static int coroutine_fn mirror_dirty_init(MirrorBlockJo= b *s) } =20 mirror_wait_for_all_io(s); + s->initial_zeroing_ongoing =3D false; } =20 /* First part, loop on the sectors and initialize the dirty bitmap. */ --=20 2.9.3 From nobody Tue May 7 12:53:40 2024 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 1487695764554812.7181515524609; Tue, 21 Feb 2017 08:49:24 -0800 (PST) Received: from localhost ([::1]:46849 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgDcu-0003tA-U1 for importer@patchew.org; Tue, 21 Feb 2017 11:49:21 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55297) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgCYx-0005x6-Il for qemu-devel@nongnu.org; Tue, 21 Feb 2017 10:41:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgCYw-0004Od-QM for qemu-devel@nongnu.org; Tue, 21 Feb 2017 10:41:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35094) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cgCYu-0004Mi-Hd; Tue, 21 Feb 2017 10:41:08 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9E1B2C0273AD; Tue, 21 Feb 2017 15:41:08 +0000 (UTC) Received: from localhost (ovpn-116-19.phx2.redhat.com [10.3.116.19]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1LFf7X8018582 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 21 Feb 2017 10:41:08 -0500 From: Jeff Cody To: qemu-block@nongnu.org Date: Tue, 21 Feb 2017 10:40:57 -0500 Message-Id: <20170221154057.20313-10-jcody@redhat.com> In-Reply-To: <20170221154057.20313-1-jcody@redhat.com> References: <20170221154057.20313-1-jcody@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 21 Feb 2017 15:41:08 +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] [PULL 9/9] qemu-options: Fix broken sheepdog URL 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: peter.maydell@linaro.org, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.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" From: Thomas Huth The sheepdog URL is broken twice: First it uses a duplicated http:// prefix, second the website seems to have moved to https://sheepdog.github.io/sheepdog/ instead. Signed-off-by: Thomas Huth Signed-off-by: Jeff Cody --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index 1e815ef..9936cf3 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2586,7 +2586,7 @@ Example qemu-system-i386 --drive file=3Dsheepdog://192.0.2.1:30000/MyVirtualMachine @end example =20 -See also @url{http://http://www.osrg.net/sheepdog/}. +See also @url{https://sheepdog.github.io/sheepdog/}. =20 @item GlusterFS GlusterFS is a user space distributed file system. --=20 2.9.3