]> git.proxmox.com Git - mirror_qemu.git/commit
block/rbd: parse all options via bdrv_parse_filename
authorJeff Cody <jcody@redhat.com>
Sun, 26 Feb 2017 22:50:42 +0000 (17:50 -0500)
committerJeff Cody <jcody@redhat.com>
Tue, 28 Feb 2017 16:32:31 +0000 (11:32 -0500)
commitc7cacb3e7a2e9fdf929c993b98268e4179147cbb
treef974de34a3517e63127b0d8e339c97dab4b4488c
parent0f9d252de4a377cbdd9f05537b4b0b8893ab7979
block/rbd: parse all options via bdrv_parse_filename

Get rid of qemu_rbd_parsename in favor of bdrv_parse_filename.
This simplifies a lot of the parsing as well, as we can treat everything
a bit simpler since nonexistent options are simply NULL pointers instead
of empty strings.

An important item to note:

Ceph has many extra option values that can be specified as key/value
pairs.  This was handled previously in the driver by extracting the
values that the QEMU driver cared about, and then blindly passing all
extra options to rbd after splitting them into key/value pairs, and
cleaning up any special character escaping.

The practice is continued in this patch; there is an option
"keyvalue-pairs" that is populated with all the key/value pairs that the
QEMU driver does not care about.  These key/value pairs will override
any settings in the 'conf' configuration file, just as they did before.

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
block/rbd.c