iscsi: Fix iscsi_create
commit2ec9a782d159e2bc6655fc0b783deda197bbe0b7
authorFam Zheng <famz@redhat.com>
Mon, 10 Apr 2017 07:54:51 +0000 (10 15:54 +0800)
committerMax Reitz <mreitz@redhat.com>
Tue, 11 Apr 2017 13:33:00 +0000 (11 15:33 +0200)
tree4a9a1f180a593ff5a930250641862fcdea063c82
parent1606e4cf8a976513ecac70ad6642a7ec45744cf5
iscsi: Fix iscsi_create

Since d5895fcb (iscsi: Split URL into individual options), creating
qcow2 image on an iscsi LUN fails:

    qemu-img create -f qcow2 iscsi://$SERVER/$IQN/0 1G
    qemu-img: iscsi://$SERVER/$IQN/0: Could not create image: Invalid
        argument

The problem is iscsi_open now expects that transport_name, portal and
target are already parsed into structured options by
iscsi_parse_filename, but it is not called in iscsi_create.

Signed-off-by: Fam Zheng <famz@redhat.com>
Message-id: 20170410075451.21329-1-famz@redhat.com
Reviewed-by: Eric Blake <eblake@redhat.com>
[mreitz: Dropped now superfluous
         qdict_put(bs_options, "filename", ...)]
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/iscsi.c