qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 7830f9: block/rbd: don't copy strings in qemu


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 7830f9: block/rbd: don't copy strings in qemu_rbd_next_tok...
Date: Fri, 03 Mar 2017 02:15:11 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 7830f909981361a3d694f4899d5cd7b159841d9e
      
https://github.com/qemu/qemu/commit/7830f909981361a3d694f4899d5cd7b159841d9e
  Author: Jeff Cody <address@hidden>
  Date:   2017-02-28 (Tue, 28 Feb 2017)

  Changed paths:
    M block/rbd.c

  Log Message:
  -----------
  block/rbd: don't copy strings in qemu_rbd_next_tok()

This patch is prep work for parsing options for .bdrv_parse_filename,
and using QDict options.

The function qemu_rbd_next_tok() searched for various key/value pairs,
and copied them into buffers.  This will soon be an unnecessary extra
step, so we will now return found strings by reference only, and
offload the responsibility for safely handling/coping these strings to
the caller.

This also cleans up error handling some, as the callers now rely on
the Error object to determine if there is a parse error.

Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Jeff Cody <address@hidden>


  Commit: 0f9d252de4a377cbdd9f05537b4b0b8893ab7979
      
https://github.com/qemu/qemu/commit/0f9d252de4a377cbdd9f05537b4b0b8893ab7979
  Author: Jeff Cody <address@hidden>
  Date:   2017-02-28 (Tue, 28 Feb 2017)

  Changed paths:
    M block/rbd.c

  Log Message:
  -----------
  block/rbd: add all the currently supported runtime_opts

This adds all the currently supported runtime opts, which
are the options as parsed from the filename.  All of these
options are explicitly checked for during during runtime,
with an exception to the "keyvalue-pairs" option.

This option contains all the key/value pairs that the QEMU rbd
driver merely unescapes, and passes along blindly to rados.  This
option is a "legacy" option, and will not be exposed in the QAPI
or available for introspection.

Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Jeff Cody <address@hidden>


  Commit: c7cacb3e7a2e9fdf929c993b98268e4179147cbb
      
https://github.com/qemu/qemu/commit/c7cacb3e7a2e9fdf929c993b98268e4179147cbb
  Author: Jeff Cody <address@hidden>
  Date:   2017-02-28 (Tue, 28 Feb 2017)

  Changed paths:
    M block/rbd.c

  Log Message:
  -----------
  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 <address@hidden>
Signed-off-by: Jeff Cody <address@hidden>


  Commit: 8a47e8eb592b30b010fe143eb2393d4033f0a79c
      
https://github.com/qemu/qemu/commit/8a47e8eb592b30b010fe143eb2393d4033f0a79c
  Author: Jeff Cody <address@hidden>
  Date:   2017-02-28 (Tue, 28 Feb 2017)

  Changed paths:
    M qapi/block-core.json

  Log Message:
  -----------
  block/rbd: add blockdev-add support

Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Jeff Cody <address@hidden>


  Commit: 0a55679b4a5061f4d74bdb1a0e81611ba3390b00
      
https://github.com/qemu/qemu/commit/0a55679b4a5061f4d74bdb1a0e81611ba3390b00
  Author: Jeff Cody <address@hidden>
  Date:   2017-03-01 (Wed, 01 Mar 2017)

  Changed paths:
    M block/rbd.c
    M qapi/block-core.json

  Log Message:
  -----------
  block/rbd: add support for 'mon_host', 'auth_supported' via QAPI

This adds support for three additional options that may be specified
by QAPI in blockdev-add:

    server: host, port
    auth method: either 'cephx' or 'none'

The "server" and "auth-supported" QAPI parameters are arrays.  To conform
with the rados API, the array items are join as a single string with a ';'
character as a delimiter when setting the configuration values.

Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Jeff Cody <address@hidden>


  Commit: 54639aed97bc1faa2f3a5dc4ea69fd7b527fe573
      
https://github.com/qemu/qemu/commit/54639aed97bc1faa2f3a5dc4ea69fd7b527fe573
  Author: Peter Maydell <address@hidden>
  Date:   2017-03-02 (Thu, 02 Mar 2017)

  Changed paths:
    M block/rbd.c
    M qapi/block-core.json

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into 
staging

# gpg: Signature made Thu 02 Mar 2017 03:42:59 GMT
# gpg:                using RSA key 0xBDBE7B27C0DE3057
# gpg: Good signature from "Jeffrey Cody <address@hidden>"
# gpg:                 aka "Jeffrey Cody <address@hidden>"
# gpg:                 aka "Jeffrey Cody <address@hidden>"
# Primary key fingerprint: 9957 4B4D 3474 90E7 9D98  D624 BDBE 7B27 C0DE 3057

* remotes/cody/tags/block-pull-request:
  block/rbd: add support for 'mon_host', 'auth_supported' via QAPI
  block/rbd: add blockdev-add support
  block/rbd: parse all options via bdrv_parse_filename
  block/rbd: add all the currently supported runtime_opts
  block/rbd: don't copy strings in qemu_rbd_next_tok()

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/ecb24d334af1...54639aed97bc

reply via email to

[Prev in Thread] Current Thread [Next in Thread]