Re: [Qemu-devel] [PATCH 4/4] block/rbd: Add blockdev-add support

2017-02-27 Thread Jeff Cody
On Mon, Feb 27, 2017 at 01:30:46PM +, Daniel P. Berrange wrote: > On Mon, Feb 27, 2017 at 08:18:59AM -0500, Jeff Cody wrote: > > On Mon, Feb 27, 2017 at 09:31:21AM +, Daniel P. Berrange wrote: > > > On Mon, Feb 27, 2017 at 02:36:13AM -0500, Jeff Cody wrote: > > >

Re: [Qemu-devel] [PATCH 4/4] block/rbd: Add blockdev-add support

2017-02-27 Thread Jeff Cody
On Mon, Feb 27, 2017 at 01:45:47PM +, Daniel P. Berrange wrote: > On Mon, Feb 27, 2017 at 02:30:41AM -0500, Jeff Cody wrote: > > Signed-off-by: Jeff Cody > > --- > > qapi/block-core.json | 47 --- > > 1 file changed, 44

Re: [Qemu-devel] [PATCH 1/4] block/rbd: don't copy strings in qemu_rbd_next_tok()

2017-02-27 Thread Jeff Cody
On Mon, Feb 27, 2017 at 05:39:45PM +0100, Markus Armbruster wrote: > Jeff Cody writes: > > > 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 p

[Qemu-devel] [PATCH v2 2/5] block/rbd: add all the currently supported runtime_opts

2017-02-27 Thread Jeff Cody
rbd driver merely unescapes, and passes along blindly to rados. Signed-off-by: Jeff Cody --- block/rbd.c | 62 ++--- 1 file changed, 43 insertions(+), 19 deletions(-) diff --git a/block/rbd.c b/block/rbd.c index 33c21d8..ff5def4 100644 --- a/b

[Qemu-devel] [PATCH v2 0/5] RBD: blockdev-add

2017-02-27 Thread Jeff Cody
rbd_set_keypairs(), because the strings have already been unescaped by the time they hit this function. Patch 4: * 'rbd-id' becomes 'user' * drop the 'keyvalue-pairs' from the QAPI (both, thanks Daniel) Patch 5: * new patch * Adds the 'server' (mon_h

[Qemu-devel] [PATCH v2 1/5] block/rbd: don't copy strings in qemu_rbd_next_tok()

2017-02-27 Thread Jeff Cody
, 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. Signed-off-by: Jeff Cody --- block/rbd.c | 99

[Qemu-devel] [PATCH v2 3/5] block/rbd: parse all options via bdrv_parse_filename

2017-02-27 Thread Jeff Cody
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. Signed-off-by: Jeff Co

[Qemu-devel] [PATCH v2 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI

2017-02-27 Thread Jeff Cody
This adds support for two additional options that may be specified by QAPI in blockdev-add: mon_host: servername and port auth_supported: either 'cephx' or 'none' Signed-off-by: Jeff Cody --- block/rbd.c | 39 +++ qapi/

[Qemu-devel] [PATCH v2 4/5] block/rbd: add blockdev-add support

2017-02-27 Thread Jeff Cody
Signed-off-by: Jeff Cody --- qapi/block-core.json | 34 +++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 5f82d35..5b311ff 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -2111,6

Re: [Qemu-devel] [PATCH] block/mirror: fix broken sparseness detection

2017-02-27 Thread Jeff Cody
On Mon, Feb 27, 2017 at 12:13:14PM -0500, John Snow wrote: > int64_t is in all likelihood the actual scalar type we want. > Yep, really. > > Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1219541 > > Signed-off-by: John Snow > --- > block/mirror.c | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [Qemu-devel] [PATCH] block/mirror: fix broken sparseness detection

2017-02-27 Thread Jeff Cody
_acct; > BlockDriverState *file; > enum MirrorMethod { > -- > 2.9.3 > Reviewed-by: Jeff Cody

Re: [Qemu-devel] [PATCH v2 2/5] block/rbd: add all the currently supported runtime_opts

2017-02-27 Thread Jeff Cody
On Mon, Feb 27, 2017 at 04:18:57PM -0600, Eric Blake wrote: > On 02/27/2017 12:58 PM, Jeff Cody wrote: > > 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 dur

Re: [Qemu-devel] [PATCH v2 3/5] block/rbd: parse all options via bdrv_parse_filename

2017-02-27 Thread Jeff Cody
On Mon, Feb 27, 2017 at 04:35:58PM -0600, Eric Blake wrote: > On 02/27/2017 12:58 PM, Jeff Cody wrote: > > 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 no

Re: [Qemu-devel] [PATCH v2 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI

2017-02-27 Thread Jeff Cody
On Mon, Feb 27, 2017 at 04:47:54PM -0600, Eric Blake wrote: > On 02/27/2017 12:58 PM, Jeff Cody wrote: > > This adds support for two additional options that may be specified > > by QAPI in blockdev-add: > > > > mon_host: servername and port > > auth_s

Re: [Qemu-devel] [PATCH v2 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI

2017-02-27 Thread Jeff Cody
On Mon, Feb 27, 2017 at 04:47:54PM -0600, Eric Blake wrote: > On 02/27/2017 12:58 PM, Jeff Cody wrote: > > This adds support for two additional options that may be specified > > by QAPI in blockdev-add: > > > > mon_host: servername and port > > auth_s

[Qemu-devel] [PATCH v3 2/5] block/rbd: add all the currently supported runtime_opts

2017-02-27 Thread Jeff Cody
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 Signed-off-by: Jeff Cody --- block/rbd.c | 68 -

[Qemu-devel] [PATCH v3 0/5] RBD: blockdev-add (for 2.9?)

2017-02-27 Thread Jeff Cody
* Removed the string unescape from qemu_rbd_set_keypairs(), because the strings have already been unescaped by the time they hit this function. Patch 4: * 'rbd-id' becomes 'user' * drop the 'keyvalue-pairs' from the QAPI (both, thanks Daniel) Patch 5: * ne

[Qemu-devel] [PATCH v3 1/5] block/rbd: don't copy strings in qemu_rbd_next_tok()

2017-02-27 Thread Jeff Cody
, 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 Reviewed-by: Markus Armbruster Signed-off-by: Jeff Cody

[Qemu-devel] [PATCH v3 3/5] block/rbd: parse all options via bdrv_parse_filename

2017-02-27 Thread Jeff Cody
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

[Qemu-devel] [PATCH v3 4/5] block/rbd: add blockdev-add support

2017-02-27 Thread Jeff Cody
Reviewed-by: Eric Blake Signed-off-by: Jeff Cody --- qapi/block-core.json | 33 +++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 5f82d35..f152953 100644 --- a/qapi/block-core.json +++ b/qapi/block

[Qemu-devel] [PATCH v3 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI

2017-02-27 Thread Jeff Cody
array items are join as a single string with a ';' character as a delimiter when setting the configuration values. Signed-off-by: Jeff Cody --- block/rbd.c | 119 +++ qapi/block-core.json | 29 + 2 files changed, 1

[Qemu-devel] [PATCH 1/1] iscsi: add missing colons to the qapi docs

2017-02-27 Thread Jeff Cody
The missing colons make the iscsi part of the documentation not render quite as nicely, so add those in. Signed-off-by: Jeff Cody --- qapi/block-core.json | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index

Re: [Qemu-devel] [PATCH 1/1] iscsi: add missing colons to the qapi docs

2017-02-27 Thread Jeff Cody
On Mon, Feb 27, 2017 at 11:29:07PM -0500, Jeff Cody wrote: > The missing colons make the iscsi part of the documentation not render > quite as nicely, so add those in. > > Signed-off-by: Jeff Cody > --- > qapi/block-core.json | 18 +- > 1 file change

[Qemu-devel] [PULL 0/2] Block patches

2017-02-27 Thread Jeff Cody
es for 2.9 ---- Jeff Cody (1): iscsi: add missing colons to the qapi docs John Snow (1): block/mirror: fix broken sparseness detection block/mirror.c | 2 +- qapi/block-core.json | 18 +- 2 files changed, 10 insertions(+), 10 deletions(-) -- 2.9.3

[Qemu-devel] [PULL 2/2] iscsi: add missing colons to the qapi docs

2017-02-27 Thread Jeff Cody
The missing colons make the iscsi part of the documentation not render quite as nicely, so add those in. Signed-off-by: Jeff Cody --- qapi/block-core.json | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index

[Qemu-devel] [PULL 1/2] block/mirror: fix broken sparseness detection

2017-02-27 Thread Jeff Cody
From: John Snow int64_t is in all likelihood the actual scalar type we want. Yep, really. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1219541 Signed-off-by: John Snow Reviewed-by: Jeff Cody Signed-off-by: Jeff Cody --- block/mirror.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [Qemu-devel] [PATCH v2 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI

2017-02-28 Thread Jeff Cody
On Tue, Feb 28, 2017 at 10:28:49AM +, Daniel P. Berrange wrote: > On Tue, Feb 28, 2017 at 10:16:51AM +, Daniel P. Berrange wrote: > > On Mon, Feb 27, 2017 at 10:57:44PM -0500, Jeff Cody wrote: > > > On Mon, Feb 27, 2017 at 04:47:54PM -0600, Eric Blake wrote: > > &g

Re: [Qemu-devel] [PATCH v3 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI

2017-02-28 Thread Jeff Cody
On Tue, Feb 28, 2017 at 03:34:10PM +0100, Markus Armbruster wrote: > Starting with just the QAPI schema. > > Jeff Cody writes: > > > This adds support for three additional options that may be specified > > by QAPI in blockdev-add: > > > > server: ho

Re: [Qemu-devel] [PATCH v3 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI

2017-02-28 Thread Jeff Cody
On Tue, Feb 28, 2017 at 04:07:14PM +0100, Markus Armbruster wrote: > Jeff Cody writes: > > > This adds support for three additional options that may be specified > > by QAPI in blockdev-add: > > > > server: host, port > > auth method: either '

[Qemu-devel] [PATCH v4 2/5] block/rbd: add all the currently supported runtime_opts

2017-02-28 Thread Jeff Cody
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 Signed-off-by: Jeff Cody --- block/rbd.c | 68 -

[Qemu-devel] [PATCH v4 1/5] block/rbd: don't copy strings in qemu_rbd_next_tok()

2017-02-28 Thread Jeff Cody
, 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 Reviewed-by: Markus Armbruster Signed-off-by: Jeff Cody

[Qemu-devel] [PATCH v4 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI

2017-02-28 Thread Jeff Cody
array items are join as a single string with a ';' character as a delimiter when setting the configuration values. Signed-off-by: Jeff Cody --- block/rbd.c | 134 +++ qapi/block-core.json | 29 +++ 2 files changed, 1

[Qemu-devel] [PATCH v4 3/5] block/rbd: parse all options via bdrv_parse_filename

2017-02-28 Thread Jeff Cody
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

[Qemu-devel] [PATCH v4 0/5] RBD: blockdev-add (for 2.9?)

2017-02-28 Thread Jeff Cody
changes in patch 2 * Removed the string unescape from qemu_rbd_set_keypairs(), because the strings have already been unescaped by the time they hit this function. Patch 4: * 'rbd-id' becomes 'user' * drop the 'keyvalue-pairs' from the QAPI (both, thanks Daniel) Patc

[Qemu-devel] [PATCH v4 4/5] block/rbd: add blockdev-add support

2017-02-28 Thread Jeff Cody
Reviewed-by: Eric Blake Signed-off-by: Jeff Cody --- qapi/block-core.json | 33 +++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index cf24c04..803edc3 100644 --- a/qapi/block-core.json +++ b/qapi/block

[Qemu-devel] [PULL 2/5] block/rbd: add all the currently supported runtime_opts

2017-02-28 Thread Jeff Cody
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 mer

[Qemu-devel] [PULL 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI

2017-02-28 Thread Jeff Cody
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

Re: [Qemu-devel] [PATCH v4 0/5] RBD: blockdev-add (for 2.9?)

2017-02-28 Thread Jeff Cody
On Tue, Feb 28, 2017 at 10:51:02AM -0500, Jeff Cody wrote: > > This series adds blockdev-add for rbd. > > > Changes from v3: > > Patch 5: Encapsulate ipv6 addresses with '[]' (Thanks Daniel, Eric, Markus) > Free auth_supported (Thanks

[Qemu-devel] [PULL 1/5] block/rbd: don't copy strings in qemu_rbd_next_tok()

2017-02-28 Thread Jeff Cody
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, a

[Qemu-devel] [PULL 4/5] block/rbd: add blockdev-add support

2017-02-28 Thread Jeff Cody
Reviewed-by: Eric Blake --- qapi/block-core.json | 33 +++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index cf24c04..803edc3 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -2111,6 +2111,

[Qemu-devel] [PULL 0/5] Block patches for 2.9

2017-02-28 Thread Jeff Cody
for 2.9, for rbd blockdev-add ---- Jeff Cody (5): block/rbd: don't copy strings in qemu_rbd_next_tok() block/rbd: add all the currently supported runtime_opts block/rbd: parse all options via bdrv_parse_filename block/rbd: add blockdev-a

[Qemu-devel] [PULL v2 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI

2017-02-28 Thread Jeff Cody
array items are join as a single string with a ';' character as a delimiter when setting the configuration values. Reviewed-by: Markus Armbruster Signed-off-by: Jeff Cody --- block/rbd.c | 134 +++ qapi/block-core.json | 29 +++

[Qemu-devel] [PULL 3/5] block/rbd: parse all options via bdrv_parse_filename

2017-02-28 Thread Jeff Cody
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

[Qemu-devel] [PULL v2 0/5] Block patches for 2.9

2017-02-28 Thread Jeff Cody
d blockdev-add. Added s-o-b's. ---- Jeff Cody (5): block/rbd: don't copy strings in qemu_rbd_next_tok() block/rbd: add all the currently supported runtime_opts block/rbd: parse all options via bdrv_parse_filename block/r

[Qemu-devel] [PULL v2 2/5] block/rbd: add all the currently supported runtime_opts

2017-02-28 Thread Jeff Cody
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 Signed-off-by: Jeff Cody --- block/rbd.c | 68 -

[Qemu-devel] [PULL v2 4/5] block/rbd: add blockdev-add support

2017-02-28 Thread Jeff Cody
Reviewed-by: Eric Blake Signed-off-by: Jeff Cody --- qapi/block-core.json | 33 +++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index cf24c04..803edc3 100644 --- a/qapi/block-core.json +++ b/qapi/block

[Qemu-devel] [PULL v2 1/5] block/rbd: don't copy strings in qemu_rbd_next_tok()

2017-02-28 Thread Jeff Cody
, 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 Reviewed-by: Markus Armbruster Signed-off-by: Jeff Cody

Re: [Qemu-devel] [PULL 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI

2017-02-28 Thread Jeff Cody
On Tue, Feb 28, 2017 at 10:26:49AM -0600, Eric Blake wrote: > On 02/28/2017 10:15 AM, Jeff Cody wrote: > > This adds support for three additional options that may be specified > > by QAPI in blockdev-add: > > > > server: host, port > > auth method: eith

[Qemu-devel] [PULL v2 3/5] block/rbd: parse all options via bdrv_parse_filename

2017-02-28 Thread Jeff Cody
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

Re: [Qemu-devel] [PULL v2 0/5] Block patches for 2.9

2017-02-28 Thread Jeff Cody
On Tue, Feb 28, 2017 at 09:31:41AM -0800, no-re...@patchew.org wrote: > Hi, > > This series failed build test on s390x host. Please find the details below. > > Type: series > Subject: [Qemu-devel] [PULL v2 0/5] Block patches for 2.9 > Message-id: 20170228163436.31357-1-jc...@redhat.com > [...]

[Qemu-devel] [PULL v3 2/5] block/rbd: add all the currently supported runtime_opts

2017-03-01 Thread Jeff Cody
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 Signed-off-by: Jeff Cody --- block/rbd.c | 68 -

[Qemu-devel] [PULL v3 0/5] Block patches for 2.9

2017-03-01 Thread Jeff Cody
D blockdev-add patches for 2.9 ---- Jeff Cody (5): block/rbd: don't copy strings in qemu_rbd_next_tok() block/rbd: add all the currently supported runtime_opts block/rbd: parse all options via bdrv_parse_filename block/rbd: add blockdev-add support b

[Qemu-devel] [PULL v3 1/5] block/rbd: don't copy strings in qemu_rbd_next_tok()

2017-03-01 Thread Jeff Cody
, 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 Reviewed-by: Markus Armbruster Signed-off-by: Jeff Cody

[Qemu-devel] [PULL v3 4/5] block/rbd: add blockdev-add support

2017-03-01 Thread Jeff Cody
Reviewed-by: Eric Blake Signed-off-by: Jeff Cody --- qapi/block-core.json | 33 +++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index cf24c04..803edc3 100644 --- a/qapi/block-core.json +++ b/qapi/block

[Qemu-devel] [PULL v3 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI

2017-03-01 Thread Jeff Cody
array items are join as a single string with a ';' character as a delimiter when setting the configuration values. Reviewed-by: Markus Armbruster Signed-off-by: Jeff Cody --- block/rbd.c | 135 +++ qapi/block-core.json | 29 +++

Re: [Qemu-devel] [PULL v2 0/5] Block patches for 2.9

2017-03-01 Thread Jeff Cody
On Wed, Mar 01, 2017 at 04:30:55PM +, Peter Maydell wrote: > On 28 February 2017 at 16:34, Jeff Cody wrote: > > The following changes since commit c8c0a1a784cdf70ecea50e93213137c6c89337a7: > > > > Merge remote-tracking branch 'remotes/cody/tags/block-pull-request&#

[Qemu-devel] [PULL v3 3/5] block/rbd: parse all options via bdrv_parse_filename

2017-03-01 Thread Jeff Cody
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

Re: [Qemu-devel] Is the use of bdrv_getlength() in vhdx*.c kosher?

2017-08-04 Thread Jeff Cody
On Fri, Aug 04, 2017 at 02:49:42PM +0200, Markus Armbruster wrote: > bdrv_getlength() can fail. There are several calls in vhdx*.c that > don't seem to check. Bug or not? Most definitely a bug. Shall I queue up some patches, or do you already have some?

Re: [Qemu-devel] [Qemu-block] [PATCH v2] qemu-img: Clarify about relative backing file options

2017-08-04 Thread Jeff Cody
name}. > + > @var{cache} specifies the cache mode to be used for @var{filename}, whereas > @var{src_cache} specifies the cache mode for reading backing files. > > -- > 2.13.3 > > Reviewed-by: Jeff Cody

Re: [Qemu-devel] [Qemu-block] [PATCH] block/null: Remove 'filename' option

2017-08-04 Thread Jeff Cody
> > .bdrv_file_open = null_file_open, > +.bdrv_parse_filename= null_co_parse_filename, > .bdrv_close = null_close, > .bdrv_getlength = null_getlength, > > @@ -261,6 +281,7 @@ static BlockDriver bdrv_null_aio = { > .instance_size = sizeof(BDRVNullState), > > .bdrv_file_open = null_file_open, > +.bdrv_parse_filename= null_aio_parse_filename, > .bdrv_close = null_close, > .bdrv_getlength = null_getlength, > > -- > 2.13.3 > > Reviewed-by: Jeff Cody

[Qemu-devel] [PATCH 0/2] VHDX cleanup

2017-08-06 Thread Jeff Cody
Two VHDX items cleaned up: 1. Check for error when calling bdrv_getlength() [Markus] 2. Check for overflow in offset prior to calling bdrv_truncate(). Jeff Cody (2): block/vhdx: check error return of bdrv_getlength() block/vhdx: check for offset overflow to bdrv_truncate() block/vhdx

[Qemu-devel] [PATCH 1/2] block/vhdx: check error return of bdrv_getlength()

2017-08-06 Thread Jeff Cody
Calls to bdrv_getlength() were not checking for error. In vhdx.c, this can lead to truncating an image file, so it is a definite bug. In vhdx-log.c, the path for improper behavior is less clear, but it is best to check in any case. Reported-by: Markus Armbruster Signed-off-by: Jeff Cody

[Qemu-devel] [PATCH 2/2] block/vhdx: check for offset overflow to bdrv_truncate()

2017-08-06 Thread Jeff Cody
spec to be 64TB. Signed-off-by: Jeff Cody --- block/vhdx-log.c | 4 block/vhdx.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/block/vhdx-log.c b/block/vhdx-log.c index fd4e7af..3b74e5d 100644 --- a/block/vhdx-log.c +++ b/block/vhdx-log.c @@ -554,6 +554,10 @@ static int

Re: [Qemu-devel] [PATCH 2/2] block/vhdx: check for offset overflow to bdrv_truncate()

2017-08-07 Thread Jeff Cody
On Mon, Aug 07, 2017 at 06:24:30AM -0500, Eric Blake wrote: > On 08/06/2017 10:08 PM, Jeff Cody wrote: > > VHDX uses uint64_t types for most offsets, following the VHDX spec. > > However, bdrv_truncate() takes an int64_t value for the truncating > > offset. Check for ov

Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] block/vhdx: check error return of bdrv_getlength()

2017-08-07 Thread Jeff Cody
On Mon, Aug 07, 2017 at 12:46:30PM +0200, Kevin Wolf wrote: > Am 07.08.2017 um 05:08 hat Jeff Cody geschrieben: > > Calls to bdrv_getlength() were not checking for error. In vhdx.c, this > > can lead to truncating an image file, so it is a definite bug. In > > vhdx-log.c,

[Qemu-devel] [PATCH v2 for-2.10 0/4] VHDX bugfixes

2017-08-07 Thread Jeff Cody
ing bdrv_getlength() [Markus] 2. Check for overflow in offset prior to calling bdrv_truncate(). Jeff Cody (4): block/vhdx: check error return of bdrv_getlength() block/vhdx: check for offset overflow to bdrv_truncate() block/vhdx: check error return of bdrv_flush() block/vhdx: check error r

[Qemu-devel] [PATCH v2 for-2.10 2/4] block/vhdx: check for offset overflow to bdrv_truncate()

2017-08-07 Thread Jeff Cody
this is not an issue, as the maximum VHDX image size is defined per the spec to be 64TB. Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Signed-off-by: Jeff Cody --- block/vhdx-log.c | 6 +- block/vhdx.c | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/block/vhdx

[Qemu-devel] [PATCH v2 for-2.10 1/4] block/vhdx: check error return of bdrv_getlength()

2017-08-07 Thread Jeff Cody
. Reported-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Jeff Cody --- block/vhdx-log.c | 23 ++- block/vhdx.c | 9 - 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/block/vhdx-log.c b/block/vhdx-log.c index 01278f3..2e26fd4 100644

[Qemu-devel] [PATCH v2 for-2.10 4/4] block/vhdx: check error return of bdrv_truncate()

2017-08-07 Thread Jeff Cody
Signed-off-by: Jeff Cody --- block/vhdx-log.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/block/vhdx-log.c b/block/vhdx-log.c index a27dc05..14b724e 100644 --- a/block/vhdx-log.c +++ b/block/vhdx-log.c @@ -558,7 +558,11 @@ static int vhdx_log_flush(BlockDriverState

[Qemu-devel] [PATCH v2 for-2.10 3/4] block/vhdx: check error return of bdrv_flush()

2017-08-07 Thread Jeff Cody
Reported-by: Kevin Wolf Signed-off-by: Jeff Cody --- block/vhdx-log.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/block/vhdx-log.c b/block/vhdx-log.c index 9597223..a27dc05 100644 --- a/block/vhdx-log.c +++ b/block/vhdx-log.c @@ -565,7 +565,10

[Qemu-devel] [PATCH for-2.10] block/nfs: fix mutex assertion in nfs_file_close()

2017-08-07 Thread Jeff Cody
y, we should be able to get rid of the memset(), as it isn't necessary. Signed-off-by: Jeff Cody --- block/nfs.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/block/nfs.c b/block/nfs.c index d8db419..bec16b7 100644 --- a/block/nfs.c +++ b/block/nfs.c

Re: [Qemu-devel] [Qemu-block] [PATCH 1/4] vpc: Check failure of bdrv_getlength()

2017-08-07 Thread Jeff Cody
+error_setg_errno(errp, -bs_size, "unable to learn image size"); > +ret = bs_size; > +goto fail; > +} > +if (s->free_data_block_offset > bs_size) { > error_setg(errp, "block-vpc: free_data_block_offset points after > " > "the end of file. The image has been > truncated."); > ret = -EINVAL; > -- > 2.13.4 > > Reviewed-by: Jeff Cody

Re: [Qemu-devel] [Qemu-block] [PATCH 2/4] qcow: Check failure of bdrv_getlength() and bdrv_truncate()

2017-08-07 Thread Jeff Cody
> Signed-off-by: Eric Blake Reviewed-by: Jeff Cody > --- > block/qcow.c | 64 > ++-- > 1 file changed, 45 insertions(+), 19 deletions(-) > > diff --git a/block/qcow.c b/block/qcow.c > index c08cdc4a7b..937023d

Re: [Qemu-devel] [Qemu-block] [PATCH 4/4] qcow2: Check failure of bdrv_getlength()

2017-08-07 Thread Jeff Cody
On Mon, Aug 07, 2017 at 03:30:07PM -0500, Eric Blake wrote: > qcow2_co_pwritev_compressed() should not call bdrv_truncate() > if determining the size failed. > > Reported-by: Markus Armbruster > Signed-off-by: Eric Blake Reviewed-by: Jeff Cody > --- > block/qcow2.

Re: [Qemu-devel] [Qemu-block] [PATCH 2/4] qcow: Check failure of bdrv_getlength() and bdrv_truncate()

2017-08-07 Thread Jeff Cody
On Mon, Aug 07, 2017 at 03:30:05PM -0500, Eric Blake wrote: > This also requires changing the return type of get_cluster_offset() > and adjusting all callers. > > Use osdep.h macros instead of open-coded rounding while in the > area. > > Reported-by: Markus Armbruster > Signed-off-by: Eric Blake

Re: [Qemu-devel] [Qemu-block] [PATCH 3/4] qcow2: Drop debugging dump_refcounts()

2017-08-07 Thread Jeff Cody
> Signed-off-by: Eric Blake Reviewed-by: Jeff Cody > --- > block/qcow2.c | 21 - > 1 file changed, 21 deletions(-) > > diff --git a/block/qcow2.c b/block/qcow2.c > index d7c600b5a2..99407403ea 100644 > --- a/block/qcow2.c > +++ b/block/qcow2.c

[Qemu-devel] [PATCH for-2.11 2/7] block/ssh: make compliant with coding guidelines

2017-08-08 Thread Jeff Cody
Signed-off-by: Jeff Cody --- block/ssh.c | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/block/ssh.c b/block/ssh.c index cbb0e34..97f7673 100644 --- a/block/ssh.c +++ b/block/ssh.c @@ -241,7 +241,7 @@ static int parse_uri(const char

[Qemu-devel] [PATCH for-2.11 1/7] block/ssh: don't call libssh2_init() in block_init()

2017-08-08 Thread Jeff Cody
We don't need libssh2 failure to be fatal (we could just opt to not register the driver on failure). But, it is probably a good idea to avoid external library calls during the block_init(), and call the libssh2 global init function on the first usage, returning any errors. Signed-off-by:

[Qemu-devel] [PATCH for-2.11 7/7] block/curl: code cleanup to comply with coding style

2017-08-08 Thread Jeff Cody
This addresses non-functional changes to help curl.c better comply with the coding styles (comments, indentation, brackets, etc.). One minor code change is the combination of two if statements into a single if statement. Signed-off-by: Jeff Cody --- block/curl.c | 100

[Qemu-devel] [PATCH for-2.11 3/7] block/sheepdog: remove spurious NULL check

2017-08-08 Thread Jeff Cody
'tag' is already checked in the lines immediately preceding this check, and set to non-NULL if NULL. No need to check again, it hasn't changed. Signed-off-by: Jeff Cody --- block/sheepdog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/sheepdog.c b/b

[Qemu-devel] [PATCH for-2.11 0/7] Code cleanup and minor fixes

2017-08-08 Thread Jeff Cody
Some minor cleanup for a few network protocols, with a few bug fixes thrown in. I don't think there is anything in here that needs to be for 2.10, however. Jeff Cody (7): block/ssh: don't call libssh2_init() in block_init() block/ssh: make compliant with coding guidelines bloc

[Qemu-devel] [PATCH for-2.11 5/7] block/curl: check error return of curl_global_init()

2017-08-08 Thread Jeff Cody
it a bool Signed-off-by: Jeff Cody --- block/curl.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/block/curl.c b/block/curl.c index 2a244e2..00a9879 100644 --- a/block/curl.c +++ b/block/curl.c @@ -89,6 +89,8 @@ static CURLMcode __curl_multi_socket_ac

[Qemu-devel] [PATCH for-2.11 4/7] block/sheepdog: code beautification

2017-08-08 Thread Jeff Cody
No functional changes, just whitespace manipulation. Signed-off-by: Jeff Cody --- block/sheepdog.c | 162 +++ 1 file changed, 81 insertions(+), 81 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index bbbfa72..ad461f1 100644

[Qemu-devel] [PATCH for-2.11 6/7] block/curl: fix minor memory leaks

2017-08-08 Thread Jeff Cody
Signed-off-by: Jeff Cody --- block/curl.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/block/curl.c b/block/curl.c index 00a9879..35cf417 100644 --- a/block/curl.c +++ b/block/curl.c @@ -857,6 +857,9 @@ out_noclean: qemu_mutex_destroy(&s->mutex); g_free(s-

Re: [Qemu-devel] [Qemu-block] [PATCH v3 for-2.10 0/4] improved --version/--help tweaks

2017-08-08 Thread Jeff Cody
On Tue, Aug 08, 2017 at 08:50:55AM -0500, Eric Blake wrote: > On 08/07/2017 07:08 PM, John Snow wrote: > > > > > > On 08/03/2017 12:33 PM, Eric Blake wrote: > >> Not sure if this should go through Kevin's block tree, Paolo's > >> miscellaneous patches, or if I should just do a pull request > >> m

[Qemu-devel] [PATCH v3 5/5] qemu-iotests: add option to save temp files on error

2017-08-30 Thread Jeff Cody
. Signed-off-by: Jeff Cody --- tests/qemu-iotests/check | 10 +- tests/qemu-iotests/common | 6 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index f6ca85d..8a5fc0d 100755 --- a/tests/qemu-iotests/check +++ b/tests

[Qemu-devel] [PATCH v3 3/5] qemu-iotests: add 'blind_remove' for python tests

2017-08-30 Thread Jeff Cody
Add a function to attempt to 'blindly' remove a file, without throwing an error if the file doesn't exist. Signed-off-by: Jeff Cody --- tests/qemu-iotests/iotests.py | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/i

[Qemu-devel] [PATCH v3 1/5] qemu-iotests: set TEST_DIR to a unique dir for each test

2017-08-30 Thread Jeff Cody
Reviewed-by: Eric Blake Signed-off-by: Jeff Cody --- tests/qemu-iotests/check | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index d504b6e..f6ca85d 100755 --- a/tests/qemu-iotests/check +++ b/tests/qe

[Qemu-devel] [PATCH v3 4/5] qemu-iotests: make python tests attempt to leave intermediate files

2017-08-30 Thread Jeff Cody
using file droppings from previous runs. We must use 'blind_remove' then for these, as the files might not exist yet, but we don't want to throw an error for that. Signed-off-by: Jeff Cody --- tests/qemu-iotests/030 | 8 +++--- tests/qemu-iotests/040 | 35 ++

[Qemu-devel] [PATCH v3 0/5] qemu-iotests: place output in unique dir

2017-08-30 Thread Jeff Cody
irectory for each test 2.) Has './check' be responsible for removing temporary files 3.) Add option to './check' to retain temporary files in case of error Jeff Cody (5): qemu-iotests: set TEST_DIR to a unique dir for each test qemu-iotests: remove file cleanup from bash tes

[Qemu-devel] [PATCH v3 2/5] qemu-iotests: remove file cleanup from bash tests

2017-08-30 Thread Jeff Cody
eanup_qemu. Reviewed-by: Eric Blake Signed-off-by: Jeff Cody --- tests/qemu-iotests/001 | 6 -- tests/qemu-iotests/002 | 6 -- tests/qemu-iotests/003 | 6 -- tests/qemu-iotests/004 | 6 -- tests/qemu-iotests/005 | 6 -- tests/qemu-iotests/00

[Qemu-devel] [PATCH v2 1/7] block/ssh: don't call libssh2_init() in block_init()

2017-08-30 Thread Jeff Cody
We don't need libssh2 failure to be fatal (we could just opt to not register the driver on failure). But, it is probably a good idea to avoid external library calls during the block_init(), and call the libssh2 global init function on the first usage, returning any errors. Signed-off-by:

[Qemu-devel] [PATCH v2 5/7] block/curl: check error return of curl_global_init()

2017-08-30 Thread Jeff Cody
it a bool Signed-off-by: Jeff Cody --- block/curl.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/block/curl.c b/block/curl.c index 2a244e2..00a9879 100644 --- a/block/curl.c +++ b/block/curl.c @@ -89,6 +89,8 @@ static CURLMcode __curl_multi_socket_ac

[Qemu-devel] [PATCH v2 0/7] Code cleanup and minor fixes

2017-08-30 Thread Jeff Cody
Minor bug fixes and code cleanup. Changes from v1 -> v2: Rebased to v2.10.0 Jeff Cody (7): block/ssh: don't call libssh2_init() in block_init() block/ssh: make compliant with coding guidelines block/sheepdog: remove spurious NULL check block/sheepdog: code beautification bl

[Qemu-devel] [PATCH v2 2/7] block/ssh: make compliant with coding guidelines

2017-08-30 Thread Jeff Cody
Signed-off-by: Jeff Cody --- block/ssh.c | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/block/ssh.c b/block/ssh.c index cbb0e34..97f7673 100644 --- a/block/ssh.c +++ b/block/ssh.c @@ -241,7 +241,7 @@ static int parse_uri(const char

[Qemu-devel] [PATCH v2 3/7] block/sheepdog: remove spurious NULL check

2017-08-30 Thread Jeff Cody
'tag' is already checked in the lines immediately preceding this check, and set to non-NULL if NULL. No need to check again, it hasn't changed. Signed-off-by: Jeff Cody --- block/sheepdog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/sheepdog.c b/b

[Qemu-devel] [PATCH v2 6/7] block/curl: fix minor memory leaks

2017-08-30 Thread Jeff Cody
Signed-off-by: Jeff Cody --- block/curl.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/block/curl.c b/block/curl.c index 00a9879..35cf417 100644 --- a/block/curl.c +++ b/block/curl.c @@ -857,6 +857,9 @@ out_noclean: qemu_mutex_destroy(&s->mutex); g_free(s-

[Qemu-devel] [PATCH v2 7/7] block/curl: code cleanup to comply with coding style

2017-08-30 Thread Jeff Cody
This addresses non-functional changes to help curl.c better comply with the coding styles (comments, indentation, brackets, etc.). One minor code change is the combination of two if statements into a single if statement. Signed-off-by: Jeff Cody --- block/curl.c | 100

[Qemu-devel] [PATCH v2 1/3] configure: Add option in configure to disable live block ops

2017-08-30 Thread Jeff Cody
From: Jeffrey Cody This adds in the option to disable the live block operations. The resultant config option is not checked until subsequent patches. Signed-off-by: Jeff Cody --- configure | 11 +++ 1 file changed, 11 insertions(+) diff --git a/configure b/configure index dd73cce

[Qemu-devel] [PATCH v2 4/7] block/sheepdog: code beautification

2017-08-30 Thread Jeff Cody
No functional changes, just whitespace manipulation. Signed-off-by: Jeff Cody --- block/sheepdog.c | 162 +++ 1 file changed, 81 insertions(+), 81 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index bbbfa72..ad461f1 100644

<    1   2   3   4   5   6   7   8   9   10   >