All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-block@nongnu.org, jcody@redhat.com, pl@kamp.de,
	ptoscano@redhat.com, ronniesahlberg@gmail.com,
	pbonzini@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC PATCH 0/6] iscsi: Add blockdev-add support
Date: Thu, 8 Dec 2016 13:55:27 +0000	[thread overview]
Message-ID: <20161208135527.GH26641@redhat.com> (raw)
In-Reply-To: <1481203391-9523-1-git-send-email-kwolf@redhat.com>

On Thu, Dec 08, 2016 at 02:23:05PM +0100, Kevin Wolf wrote:
> This adds blockdev-add support to the iscsi block driver.
> 
> Note that this is only compile tested at this point. Jeff is going to
> take over from here and bring the series to a mergable state.
> 
> Kevin Wolf (6):
>   iscsi: Split URL into individual options
>   iscsi: Handle -iscsi user/password in bdrv_parse_filename()
>   iscsi: Add initiator-name option
>   iscsi: Add header-digest option
>   iscsi: Add timeout option
>   iscsi: Add blockdev-add support
> 
>  block/iscsi.c        | 342 ++++++++++++++++++++++++++++++---------------------
>  qapi/block-core.json |  74 ++++++++++-
>  2 files changed, 272 insertions(+), 144 deletions(-)

This series works as well as my series does, once you apply this fix
for the crash bug I mention:

diff --git a/block/iscsi.c b/block/iscsi.c
index 6a11cdd..320e56a 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -1524,7 +1524,7 @@ static void iscsi_parse_iscsi_option(const char *target, QDict *options)
 {
     QemuOptsList *list;
     QemuOpts *opts;
-    const char *user, *initiator_name, *header_digest, *timeout;
+    const char *user, *initiator_name, *header_digest, *timeout, *password, *password_secret;
 
     list = qemu_find_opts("iscsi");
     if (!list) {
@@ -1542,10 +1542,14 @@ static void iscsi_parse_iscsi_option(const char *target, QDict *options)
     user = qemu_opt_get(opts, "user");
     if (user) {
         qdict_set_default_str(options, "user", user);
-        qdict_set_default_str(options, "password",
-                              qemu_opt_get(opts, "password"));
-        qdict_set_default_str(options, "password-secret",
-                              qemu_opt_get(opts, "password-secret"));
+    }
+    password = qemu_opt_get(opts, "password");
+    if (password) {
+        qdict_set_default_str(options, "password", password);
+    }
+    password_secret = qemu_opt_get(opts, "password-secret");
+    if (password_secret) {
+        qdict_set_default_str(options, "password-secret", password_secret);
     }
 
     initiator_name = qemu_opt_get(opts, "initiator-name");


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

  parent reply	other threads:[~2016-12-08 13:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-08 13:23 [Qemu-devel] [RFC PATCH 0/6] iscsi: Add blockdev-add support Kevin Wolf
2016-12-08 13:23 ` [Qemu-devel] [RFC PATCH 1/6] iscsi: Split URL into individual options Kevin Wolf
2016-12-08 14:10   ` Daniel P. Berrange
2016-12-08 14:31     ` Kevin Wolf
2016-12-08 13:23 ` [Qemu-devel] [RFC PATCH 2/6] iscsi: Handle -iscsi user/password in bdrv_parse_filename() Kevin Wolf
2016-12-08 13:42   ` Daniel P. Berrange
2016-12-08 13:23 ` [Qemu-devel] [RFC PATCH 3/6] iscsi: Add initiator-name option Kevin Wolf
2016-12-08 14:16   ` Daniel P. Berrange
2016-12-08 13:23 ` [Qemu-devel] [RFC PATCH 4/6] iscsi: Add header-digest option Kevin Wolf
2016-12-08 14:13   ` Daniel P. Berrange
2016-12-08 13:23 ` [Qemu-devel] [RFC PATCH 5/6] iscsi: Add timeout option Kevin Wolf
2016-12-08 14:14   ` Daniel P. Berrange
2016-12-08 13:23 ` [Qemu-devel] [RFC PATCH 6/6] iscsi: Add blockdev-add support Kevin Wolf
2016-12-08 14:15   ` Daniel P. Berrange
2016-12-08 16:31   ` Eric Blake
2016-12-08 13:55 ` Daniel P. Berrange [this message]
2016-12-08 14:42   ` [Qemu-devel] [RFC PATCH 0/6] " Kevin Wolf
2017-01-24 11:35 ` Daniel P. Berrange
2017-01-24 13:50   ` Jeff Cody

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=20161208135527.GH26641@redhat.com \
    --to=berrange@redhat.com \
    --cc=jcody@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=pl@kamp.de \
    --cc=ptoscano@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=ronniesahlberg@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.