Re: [Qemu-block] [Qemu-devel] Regression from 2.8: stuck in bdrv_drain()

2017-04-12 Thread Jeff Cody
On Wed, Apr 12, 2017 at 09:11:09PM -0400, Jeff Cody wrote: > On Thu, Apr 13, 2017 at 07:54:20AM +0800, Fam Zheng wrote: > > On Wed, 04/12 18:22, Jeff Cody wrote: > > > On Wed, Apr 12, 2017 at 05:38:17PM -0400, John Snow wrote: > > > > > > > > >

Re: [Qemu-block] [Qemu-devel] Regression from 2.8: stuck in bdrv_drain()

2017-04-12 Thread Jeff Cody
On Thu, Apr 13, 2017 at 07:54:20AM +0800, Fam Zheng wrote: > On Wed, 04/12 18:22, Jeff Cody wrote: > > On Wed, Apr 12, 2017 at 05:38:17PM -0400, John Snow wrote: > > > > > > > > > On 04/12/2017 04:46 PM, Jeff Cody wrote: > > > > >

Re: [Qemu-block] [Qemu-devel] Regression from 2.8: stuck in bdrv_drain()

2017-04-12 Thread Jeff Cody
On Wed, Apr 12, 2017 at 05:38:17PM -0400, John Snow wrote: > > > On 04/12/2017 04:46 PM, Jeff Cody wrote: > > > > This occurs on v2.9.0-rc4, but not on v2.8.0. > > > > When running QEMU with an iothread, and then performing a block-mirror, if > > we do a

[Qemu-block] Regression from 2.8: stuck in bdrv_drain()

2017-04-12 Thread Jeff Cody
This occurs on v2.9.0-rc4, but not on v2.8.0. When running QEMU with an iothread, and then performing a block-mirror, if we do a system-reset after the BLOCK_JOB_READY event has emitted, qemu becomes deadlocked. The block job is not paused, nor cancelled, so we are stuck in the while loop in blo

[Qemu-block] [PATCH v2 for-2.10 4/8] block: code movement

2017-04-07 Thread Jeff Cody
Move bdrv_is_read_only() up with its friends. Reviewed-by: Stefan Hajnoczi Reviewed-by: John Snow Signed-off-by: Jeff Cody --- block.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block.c b/block.c index 68a18b0..a05ad48 100644 --- a/block.c +++ b/block.c

[Qemu-block] [PATCH v2 for-2.10 8/8] block/rbd: Add support for reopen()

2017-04-07 Thread Jeff Cody
This adds support for reopen in rbd, for changing between r/w and r/o. Note, that this is only a flag change, but we will block a change from r/o to r/w if we are using an RBD internal snapshot. Reviewed-by: Stefan Hajnoczi Signed-off-by: Jeff Cody --- block/rbd.c | 21

[Qemu-block] [PATCH v2 for-2.10 7/8] block/rbd - update variable names to more apt names

2017-04-07 Thread Jeff Cody
image_t value returned by rbd_open(). Reviewed-by: Stefan Hajnoczi Signed-off-by: Jeff Cody --- block/rbd.c | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/block/rbd.c b/block/rbd.c index 1c43171..35853c9 100644 --- a/block/rbd.c +++ b/block/r

[Qemu-block] [PATCH v2 for-2.10 6/8] block: use bdrv_can_set_read_only() during reopen

2017-04-07 Thread Jeff Cody
Signed-off-by: Jeff Cody --- block.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/block.c b/block.c index 1514ae9..5d560f5 100644 --- a/block.c +++ b/block.c @@ -2785,6 +2785,7 @@ int bdrv_reopen_prepare(BDRVReopenState *reopen_state, BlockReopenQueue

[Qemu-block] [PATCH v2 for-2.10 3/8] block: honor BDRV_O_ALLOW_RDWR when clearing bs->read_only

2017-04-07 Thread Jeff Cody
The BDRV_O_ALLOW_RDWR flag allows / prohibits the changing of the BDS 'read_only' state, but there are a few places where it is ignored. In the bdrv_set_read_only() helper, make sure to honor the flag. Signed-off-by: Jeff Cody --- block.c | 7 +++ 1 file changed, 7 insertion

[Qemu-block] [PATCH v2 for-2.10 5/8] block: introduce bdrv_can_set_read_only()

2017-04-07 Thread Jeff Cody
Introduce check function for setting read_only flags. Will return < 0 on error, with appropriate Error value set. Does not alter any flags. Signed-off-by: Jeff Cody --- block.c | 14 +- include/block/block.h | 1 + 2 files changed, 14 insertions(+), 1 delet

[Qemu-block] [PATCH v2 for-2.10 2/8] block: do not set BDS read_only if copy_on_read enabled

2017-04-07 Thread Jeff Cody
arameter would result in a writable image: "-drive format=vvfat,dir=/tmp/vvfat,rw,if=virtio,readonly=on" This is not correct. Now, attempting to use the above -drive parameter will result in an error (i.e., 'rw' is incompatible with 'readonly=on'). Signed-off-by: Jeff

[Qemu-block] [PATCH v2 for-2.10 0/8] RBD reopen, read_only cleanup

2017-04-07 Thread Jeff Cody
o that it is done consistently (and rules are applied consistently), and 2.) Adds .bdrv_reopen_prepare() implementation for RBD, so that block jobs can be run on backing chains that have rbd protocol nodes. Jeff Cody (8): block: add bdrv_set_read_only() helper function block: do

[Qemu-block] [PATCH v2 for-2.10 1/8] block: add bdrv_set_read_only() helper function

2017-04-07 Thread Jeff Cody
We have a helper wrapper for checking for the BDS read_only flag, add a helper wrapper to set the read_only flag as well. Reviewed-by: Stefan Hajnoczi Signed-off-by: Jeff Cody --- block.c | 5 + block/bochs.c | 2 +- block/cloop.c | 2 +- block/dmg.c

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.10 3/9] block: honor BDRV_O_ALLOW_RDWR when clearing bs->read_only

2017-04-05 Thread Jeff Cody
On Wed, Apr 05, 2017 at 08:20:28PM -0400, Jeff Cody wrote: > On Wed, Apr 05, 2017 at 02:26:53PM -0500, Eric Blake wrote: > > On 04/05/2017 02:20 PM, John Snow wrote: > > > > > Conceptually straightforward. > > > > > > looks like this might change behav

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.10 6/9] block: use bdrv_try_set_read_only() during reopen

2017-04-05 Thread Jeff Cody
On Wed, Apr 05, 2017 at 04:25:39PM -0400, John Snow wrote: > > > On 04/05/2017 02:28 PM, Jeff Cody wrote: > > Signed-off-by: Jeff Cody > > --- > > block.c | 14 -- > > 1 file changed, 8 insertions(+), 6 deletions(-) > > > > diff --git a

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.10 5/9] block: introduce bdrv_try_set_read_only()

2017-04-05 Thread Jeff Cody
On Wed, Apr 05, 2017 at 04:28:44PM -0400, John Snow wrote: > > > On 04/05/2017 02:28 PM, Jeff Cody wrote: > > Introduce try function for setting read_only flags. Will return < 0 on > > error, with appropriate Error value set. Does not alter any flags. > >

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.10 3/9] block: honor BDRV_O_ALLOW_RDWR when clearing bs->read_only

2017-04-05 Thread Jeff Cody
On Wed, Apr 05, 2017 at 02:26:53PM -0500, Eric Blake wrote: > On 04/05/2017 02:20 PM, John Snow wrote: > > > Conceptually straightforward. > > > > looks like this might change behavior for... RBD and vvfat, right? > > RBD is the subject of this series so we'll just assume that was broken > > and

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.10 2/9] block: do not set BDS read_only if copy_on_read enabled

2017-04-05 Thread Jeff Cody
On Wed, Apr 05, 2017 at 03:16:38PM -0400, John Snow wrote: > > > On 04/05/2017 02:28 PM, Jeff Cody wrote: > > A few block drivers will set the BDS read_only flag from their > > .bdrv_open() function. This means the bs->read_only flag could > > be set after

[Qemu-block] [PATCH for-2.10 5/9] block: introduce bdrv_try_set_read_only()

2017-04-05 Thread Jeff Cody
Introduce try function for setting read_only flags. Will return < 0 on error, with appropriate Error value set. Does not alter any flags. Signed-off-by: Jeff Cody --- block.c | 14 +- include/block/block.h | 1 + 2 files changed, 14 insertions(+), 1 delet

[Qemu-block] [PATCH for-2.10 8/9] block/rbd: do not blindly set bs->read_only

2017-04-05 Thread Jeff Cody
We do not want to just blindly set bs->read_only. The only time we need to set it with the current rbd driver, is if we are using an rbd snapshot. In that case, we must set it to read-only. Signed-off-by: Jeff Cody --- block/rbd.c | 13 + 1 file changed, 9 insertions(+)

[Qemu-block] [PATCH for-2.10 4/9] block: code movement

2017-04-05 Thread Jeff Cody
Move bdrv_is_read_only() up with its friends. Signed-off-by: Jeff Cody --- block.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block.c b/block.c index 4a61ff0..8bfe7f4 100644 --- a/block.c +++ b/block.c @@ -192,6 +192,11 @@ void path_combine(char *dest, int

[Qemu-block] [PATCH for-2.10 2/9] block: do not set BDS read_only if copy_on_read enabled

2017-04-05 Thread Jeff Cody
d_only(), and an error will be return if we try to set the BDS to read_only while copy_on_read is enabled. Signed-off-by: Jeff Cody --- block.c | 10 +- block/bochs.c | 5 - block/cloop.c | 5 - block/dmg.c | 6 +- block/rbd.c

[Qemu-block] [PATCH for-2.10 3/9] block: honor BDRV_O_ALLOW_RDWR when clearing bs->read_only

2017-04-05 Thread Jeff Cody
The BDRV_O_ALLOW_RDWR flag allows / prohibits the changing of the BDS 'read_only' state, but there are a few places where it is ignored. In the bdrv_set_read_only() helper, make sure to honor the flag. Signed-off-by: Jeff Cody --- block.c | 7 +++ 1 file changed, 7 insertion

[Qemu-block] [PATCH for-2.10 9/9] block/rbd: Add support for reopen()

2017-04-05 Thread Jeff Cody
This adds support for reopen in rbd, for changing between r/w and r/o. Note, that this is only a flag change, but we will block a change from r/o to r/w if we are using an RBD internal snapshot. Signed-off-by: Jeff Cody --- block/rbd.c | 21 + 1 file changed, 21 insertions

[Qemu-block] [PATCH for-2.10 6/9] block: use bdrv_try_set_read_only() during reopen

2017-04-05 Thread Jeff Cody
Signed-off-by: Jeff Cody --- block.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/block.c b/block.c index ad958b9..3245fae 100644 --- a/block.c +++ b/block.c @@ -2785,6 +2785,7 @@ int bdrv_reopen_prepare(BDRVReopenState *reopen_state, BlockReopenQueue

[Qemu-block] [PATCH for-2.10 7/9] block/rbd - update variable names to more apt names

2017-04-05 Thread Jeff Cody
age_t value returned by rbd_open(). Signed-off-by: Jeff Cody --- block/rbd.c | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/block/rbd.c b/block/rbd.c index 328e4a9..c5e1aeb 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -94,7 +94,7 @@

[Qemu-block] [PATCH for-2.10 1/9] block: add bdrv_set_read_only() helper function

2017-04-05 Thread Jeff Cody
We have a helper wrapper for checking for the BDS read_only flag, add a helper wrapper to set the read_only flag as well. Signed-off-by: Jeff Cody --- block.c | 5 + block/bochs.c | 2 +- block/cloop.c | 2 +- block/dmg.c | 2 +- block/rbd.c

[Qemu-block] [PATCH for-2.10 0/9] RBD reopen, read_only cleanup

2017-04-05 Thread Jeff Cody
on backing chains that have rbd protocol nodes. Jeff Cody (9): block: add bdrv_set_read_only() helper function block: do not set BDS read_only if copy_on_read enabled block: honor BDRV_O_ALLOW_RDWR when clearing bs->read_only block: code movement block: introduce bdrv_try_set_read_o

[Qemu-block] [PULL for-2.9 3/3] block/curl: Check protocol prefix

2017-03-31 Thread Jeff Cody
lippe Mathieu-Daudé Reviewed-by: Jeff Cody Reviewed-by: Eric Blake Message-id: 20170331120431.1767-3-mre...@redhat.com Signed-off-by: Jeff Cody --- block/curl.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/block/curl.c b/block/curl.c index 34dbd33..2708d57 100644 --- a/block/c

[Qemu-block] [PULL for-2.9 1/3] rbd: Fix regression in legacy key/values containing escaped :

2017-03-31 Thread Jeff Cody
=drive-virtio-disk0,'\ 'serial=ea141b5c-cdb3-4765-910d-e7008b209a70,cache=writeback' Even without an RBD setup, this serves a test of whether we get the incorrect parser error of: qemu-system-x86_64: -drive file=rbd:...cache=writeback: conf option 6789 has no value or the correc

[Qemu-block] [PULL for-2.9 2/3] qapi/curl: Extend and fix blockdev-add schema

2017-03-31 Thread Jeff Cody
From: Max Reitz The curl block driver accepts more options than just "filename"; also, the URL is actually expected to be passed through the "url" option instead of "filename". Signed-off-by: Max Reitz Reviewed-by: Jeff Cody Reviewed-by: Eric Blake Message

[Qemu-block] [PULL for-2.9 0/3] Block patches

2017-03-31 Thread Jeff Cody
The following changes since commit 95b31d709ba343ad237c3630047ee7438bac4065: Merge remote-tracking branch 'remotes/awilliam/tags/vfio-updates-20170331.0' into staging (2017-03-31 18:06:13 +0100) are available in the git repository at: git://github.com/codyprime/qemu-kvm-jtc.git tags/block-p

Re: [Qemu-block] [PATCH for-2.9 1/2] qapi/curl: Extend and fix blockdev-add schema

2017-03-31 Thread Jeff Cody
On Fri, Mar 31, 2017 at 02:04:30PM +0200, Max Reitz wrote: > The curl block driver accepts more options than just "filename"; also, > the URL is actually expected to be passed through the "url" option > instead of "filename". > > Signed-off-by: Max Reitz > --- > qapi/block-core.json | 103 > +++

Re: [Qemu-block] [PATCH for-2.9 0/2] curl: Extend and fix blockdev-add schema

2017-03-31 Thread Jeff Cody
On Fri, Mar 31, 2017 at 02:04:29PM +0200, Max Reitz wrote: > Yes, it's yet another episode in our popular > get-blockdev-add-ready-for-2.9 drama! > > Right now, the schema for the curl block driver is seriously lacking. > This series improves things at least a bit. > > To improve things seriously

Re: [Qemu-block] [PATCH for-2.9 2/2] block/curl: Check protocol prefix

2017-03-31 Thread Jeff Cody
by > surprise. > > Signed-off-by: Max Reitz Reviewed-by: Jeff Cody > --- > block/curl.c | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/block/curl.c b/block/curl.c > index 34dbd335f4..2708d57c2f 100644 > --- a/block/curl.c > +++ b/block/cu

Re: [Qemu-block] [PATCH for-2.9 1/2] qapi/curl: Extend and fix blockdev-add schema

2017-03-31 Thread Jeff Cody
On Fri, Mar 31, 2017 at 02:04:30PM +0200, Max Reitz wrote: > The curl block driver accepts more options than just "filename"; also, > the URL is actually expected to be passed through the "url" option > instead of "filename". > > Signed-off-by: Max R

Re: [Qemu-block] [PATCH for-2.9] rbd: Fix regression in legacy key/values containing escaped :

2017-03-31 Thread Jeff Cody
On Fri, Mar 31, 2017 at 10:27:30AM -0500, Eric Blake wrote: > Commit c7cacb3 accidentally broke legacy key-value parsing through > pseudo-filename parsing of -drive file=rbd://..., for any key that > contains an escaped ':'. Such a key is surprisingly common, thanks > to mon_host specifying a 'hos

Re: [Qemu-block] [PATCH for-2.9] rbd: Fix regression in legacy key/values containing escaped :

2017-03-31 Thread Jeff Cody
s_t cluster, const char *keypairs_json, > Error **errp) > { > -char *p, *buf; > -char *name; > -char *value; > +QList *keypairs; > +QString *name; > +QString *value; > +const char *key; > +size_t remaining; >

Re: [Qemu-block] [for-2.9 5/8] gluster: Prepare for SocketAddressFlat extension

2017-03-29 Thread Jeff Cody
S_FLAT_TYPE__MAX, -1, NULL); > +if (type != SOCKET_ADDRESS_FLAT_TYPE_INET > +&& type != SOCKET_ADDRESS_FLAT_TYPE_UNIX) { > +error_setg(&local_err, > + "Parameter '%s' may be 'inet' or 'unix'", > + GLUSTER_OPT_TYPE); > error_append_hint(&local_err, GERR_INDEX_HINT, i); > goto out; > } > +gsconf->type = type; > qemu_opts_del(opts); > > if (gsconf->type == SOCKET_ADDRESS_FLAT_TYPE_INET) { > -- > 2.7.4 > Reviewed-by: Jeff Cody

[Qemu-block] [PULL for-2.9 09/10] rbd: Revert -blockdev parameter password-secret

2017-03-28 Thread Jeff Cody
ert the feature for 2.9. Note that users can still configure an authentication key with a configuration file. They probably do that anyway if they use Ceph outside QEMU as well. Signed-off-by: Markus Armbruster Reviewed-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Jeff Cody Message-id: 1490

[Qemu-block] [PULL for-2.9 05/10] rbd: Don't accept -drive driver=rbd, keyvalue-pairs=...

2017-03-28 Thread Jeff Cody
ccessible. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Max Reitz Reviewed-by: Jeff Cody Message-id: 1490691368-32099-6-git-send-email-arm...@redhat.com Signed-off-by: Jeff Cody --- block/rbd.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --

[Qemu-block] [PULL for-2.9 08/10] rbd: Revert -blockdev and -drive parameter auth-supported

2017-03-28 Thread Jeff Cody
that this doesn't affect use of key "auth-supported" in -drive file=rbd:...:key=value. qemu_rbd_array_opts()'s parameter @type now must be RBD_MON_HOST, which is silly. This will be cleaned up shortly. Signed-off-by: Markus Armbruster Reviewed-by: Max Reitz Reviewed-by: Eric Blake Reviewe

[Qemu-block] [PULL for-2.9 10/10] rbd: Fix bugs around -drive parameter "server"

2017-03-28 Thread Jeff Cody
t and port instead of silently ignoring them. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Jeff Cody Message-id: 1490691368-32099-11-git-send-email-arm...@redhat.com Signed-off-by: Jeff Cody --- block/rbd.c | 127 +++---

[Qemu-block] [PULL for-2.9 06/10] rbd: Clean up runtime_opts, fix -drive to reject filename

2017-03-28 Thread Jeff Cody
"filename", because none of the three users actually uses it. This fixes -drive to reject parameter filename instead of silently ignoring it. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Max Reitz Reviewed-by: Jeff Cody Message-id: 1490691368-32099-7-git-send

[Qemu-block] [PULL for-2.9 07/10] rbd: Clean up qemu_rbd_create()'s detour through QemuOpts

2017-03-28 Thread Jeff Cody
From: Markus Armbruster The conversion from QDict to QemuOpts is pointless. Simply get the stuff straight from the QDict. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Reviewed-by: Jeff Cody Message-id: 1490691368-32099-8-git-send-email-arm...@redhat.com

[Qemu-block] [PULL for-2.9 02/10] rbd: Fix to cleanly reject -drive without pool or image

2017-03-28 Thread Jeff Cody
t -blockdev, because pool and image are mandatory in the QAPI schema. Fix by adding the missing checks. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Max Reitz Reviewed-by: Jeff Cody Message-id: 1490691368-32099-3-git-send-email-arm...@redhat.com Signed-off-by: Jeff Cody -

[Qemu-block] [PULL for-2.9 00/10] Block patches for -rc2

2017-03-28 Thread Jeff Cody
The following changes since commit 142b9ca51d7260d20f6e87bd7f2020ac0a7d95d9: Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2017-03-28 11:10:36 +0100) are available in the git repository at: git://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-r

[Qemu-block] [PULL for-2.9 01/10] rbd: Reject -blockdev server.*.{numeric, to, ipv4, ipv6}

2017-03-28 Thread Jeff Cody
4" and "ipv6" are now rejected. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Max Reitz Reviewed-by: Jeff Cody Message-id: 1490691368-32099-2-git-send-email-arm...@redhat.com Signed-off-by: Jeff Cody --- qapi-schema.json | 21 ++--- qapi/

[Qemu-block] [PULL for-2.9 04/10] rbd: Clean up after the previous commit

2017-03-28 Thread Jeff Cody
iewed-by: Jeff Cody Message-id: 1490691368-32099-5-git-send-email-arm...@redhat.com Signed-off-by: Jeff Cody --- block/rbd.c | 24 +--- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/block/rbd.c b/block/rbd.c index 0fea348..182a5a3 100644 --- a/block/rbd.c +++

[Qemu-block] [PULL for-2.9 03/10] rbd: Don't limit length of parameter values

2017-03-28 Thread Jeff Cody
Max Reitz Reviewed-by: Jeff Cody Message-id: 1490691368-32099-4-git-send-email-arm...@redhat.com Signed-off-by: Jeff Cody --- block/rbd.c | 91 ++--- 1 file changed, 14 insertions(+), 77 deletions(-) diff --git a/block/rbd.c b/block/rbd.c ind

Re: [Qemu-block] [PATCH v4 for-2.9 00/10] rbd: Clean up API and code

2017-03-28 Thread Jeff Cody
On Tue, Mar 28, 2017 at 10:55:58AM +0200, Markus Armbruster wrote: > I really, really want to correct a few issues in external interfaces > before while I can. Bonus: several minor bug fixes. > > Thanks to Jeff Cody for testing this series. > > v4: > * PATCH 01,04-06 u

Re: [Qemu-block] [PATCH v4 for-2.9 10/10] rbd: Fix bugs around -drive parameter "server"

2017-03-28 Thread Jeff Cody
ut > server.*.host is absent. > > Fixes -drive to reject invalid server.*.*. > > Permits cleaning up runtime_opts. Do that, and fix -drive to reject > bogus parameters host and port instead of silently ignoring them

Re: [Qemu-block] [PATCH v4 for-2.9 07/10] rbd: Clean up qemu_rbd_create()'s detour through QemuOpts

2017-03-28 Thread Jeff Cody
On Tue, Mar 28, 2017 at 10:56:05AM +0200, Markus Armbruster wrote: > The conversion from QDict to QemuOpts is pointless. Simply get the > stuff straight from the QDict. > > Signed-off-by: Markus Armbruster > Reviewed-by: Eric Blake > Reviewed-by: Kevin Wolf Revi

[Qemu-block] [PULL for-2.9 4/4] blockjob: add devops to blockjob backends

2017-03-22 Thread Jeff Cody
: John Snow Reviewed-by: Jeff Cody Message-id: 20170316212351.13797-4-js...@redhat.com Signed-off-by: Jeff Cody --- blockjob.c | 29 - 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/blockjob.c b/blockjob.c index 0e9ed03..9b619f385 100644 --- a

[Qemu-block] [PULL for-2.9 3/4] block-backend: add drained_begin / drained_end ops

2017-03-22 Thread Jeff Cody
Reviewed-by: Jeff Cody Message-id: 20170316212351.13797-3-js...@redhat.com Signed-off-by: Jeff Cody --- block/block-backend.c | 24 ++-- include/sysemu/block-backend.h | 8 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/block/block-backend.c b

[Qemu-block] [PULL for-2.9 0/4] Block patches

2017-03-22 Thread Jeff Cody
The following changes since commit 55a19ad8b2d0797e3a8fe90ab99a9bb713824059: Update version for v2.9.0-rc1 release (2017-03-21 17:13:29 +) are available in the git repository at: https://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-request for you to fetch changes up to 600ac6a

[Qemu-block] [PULL for-2.9 2/4] blockjob: add block_job_start_shim

2017-03-22 Thread Jeff Cody
pause only if necessary. We could avoid requiring a wrapper, but all jobs would need to do it, so it's been factored out here. Signed-off-by: John Snow Reviewed-by: Jeff Cody Message-id: 20170316212351.13797-2-js...@redhat.com Signed-off-by: Jeff Cody --- blockjob.c | 26 ++

[Qemu-block] [PULL for-2.9 1/4] blockjob: avoid recursive AioContext locking

2017-03-22 Thread Jeff Cody
is therefore enough to skip the second acquisition when the two AioContexts are one and the same. Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Reviewed-by: Jeff Cody Message-id: 1490118490-5597-1-git-send-email-pbonz...@redhat.com Signed-off-by: Jeff Cody --- blockjob.c | 8

Re: [Qemu-block] [Qemu-devel] [PATCH v2 0/3] block: pause block jobs for bdrv_drain_begin/end

2017-03-22 Thread Jeff Cody
On Thu, Mar 16, 2017 at 02:28:47PM -0700, no-re...@patchew.org wrote: > Hi, > > This series seems to have some coding style problems. See output below for > more information: > > Type: series > Subject: [Qemu-devel] [PATCH v2 0/3] block: pause block jobs for > bdrv_drain_begin/end > Message-id:

Re: [Qemu-block] [Qemu-devel] [PATCH v2 0/3] block: pause block jobs for bdrv_drain_begin/end

2017-03-22 Thread Jeff Cody
On Wed, Mar 22, 2017 at 12:05:26PM -0400, John Snow wrote: > > > On 03/22/2017 12:01 PM, Jeff Cody wrote: > > On Wed, Mar 22, 2017 at 11:37:15AM -0400, John Snow wrote: > >> ping, is this the only issue? Any feedback? If this can hit 2.9 that > >> would be goo

Re: [Qemu-block] [PATCH v2 1/3] blockjob: add block_job_start_shim

2017-03-22 Thread Jeff Cody
On Wed, Mar 22, 2017 at 08:57:51AM -0400, Jeff Cody wrote: > On Thu, Mar 16, 2017 at 05:23:49PM -0400, John Snow wrote: > > The purpose of this shim is to allow us to pause pre-started jobs. > > The purpose of *that* is to allow us to buffer a pause request that > > will b

Re: [Qemu-block] [PATCH v2 3/3] blockjob: add devops to blockjob backends

2017-03-22 Thread Jeff Cody
RM_ALL, &error_abort); > bs->job = job; > > + blk_set_dev_ops(blk, &block_job_dev_ops, job); > +bdrv_op_unblock(bs, BLOCK_OP_TYPE_DATAPLANE, job->blocker); > + > QLIST_INSERT_HEAD(&block_jobs, job, job_list); > > blk_add_aio_context_notifier(blk, block_job_attached_aio_context, > -- > 2.9.3 > Reviewed-by: Jeff Cody

Re: [Qemu-block] [PATCH v2 2/3] block-backend: add drained_begin / drained_end ops

2017-03-22 Thread Jeff Cody
e size changed (e.g. monitor command block_resize) > */ > void (*resize_cb)(void *opaque); > + /* > + * Runs when the backend receives a drain request. > + */ > +void (*drained_begin)(void *opaque); > +/* > + * Runs when the backend's last drain request ends. > + */ > +void (*drained_end)(void *opaque); > } BlockDevOps; > > /* This struct is embedded in (the private) BlockBackend struct and contains > -- > 2.9.3 > Reviewed-by: Jeff Cody

Re: [Qemu-block] [Qemu-devel] [PATCH v2 0/3] block: pause block jobs for bdrv_drain_begin/end

2017-03-22 Thread Jeff Cody
On Wed, Mar 22, 2017 at 11:37:15AM -0400, John Snow wrote: > ping, is this the only issue? Any feedback? If this can hit 2.9 that > would be good. > The series looks fine to me, and I can patch up the nit from patchew when applying. But do you happen to have a qemu-iotest for this case, or is it

Re: [Qemu-block] [PATCH for-2.9?] block/file-posix.c: Fix unused variable warning on OpenBSD

2017-03-22 Thread Jeff Cody
+/* Try a few ioctls to get the right size */ > +for (i = 0; i < ARRAY_SIZE(ioctl_list); i++) { > + if (ioctl(fd, ioctl_list[i], §or_size) >= 0) { > +*sector_size_p = sector_size; > +success = true; > +} > +} > > return success ? 0 : -errno; > } > -- > 2.7.4 > > Reviewed-by: Jeff Cody

Re: [Qemu-block] [PATCH v2 1/3] blockjob: add block_job_start_shim

2017-03-22 Thread Jeff Cody
On Thu, Mar 16, 2017 at 05:23:49PM -0400, John Snow wrote: > The purpose of this shim is to allow us to pause pre-started jobs. > The purpose of *that* is to allow us to buffer a pause request that > will be able to take effect before the job ever does any work, allowing > us to create jobs during

Re: [Qemu-block] [PATCH for-2.9] blockjob: avoid recursive AioContext locking

2017-03-22 Thread Jeff Cody
On Tue, Mar 21, 2017 at 06:48:10PM +0100, Paolo Bonzini wrote: > Streaming or any other block job hangs when performed on a block device > that has a non-default iothread. This happens because the AioContext > is acquired twice by block_job_defer_to_main_loop_bh and then released > only once by BD

Re: [Qemu-block] [PATCH for-2.9] blockjob: avoid recursive AioContext locking

2017-03-22 Thread Jeff Cody
o_main_loop = false; > data->fn(data->job, data->opaque); > > -aio_context_release(aio_context); > +if (aio_context != data->aio_context) { > + aio_context_release(aio_context); > +} > > aio_context_release(data->aio_context); > > -- > 1.8.3.1 > > Reviewed-by: Jeff Cody

[Qemu-block] [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-block] [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-block] [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-block] [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

[Qemu-block] [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-block] [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-block] [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

Re: [Qemu-block] [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-block] [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-block] [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 +++

Re: [Qemu-block] [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-block] [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-block] [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

[Qemu-block] [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-block] [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

[Qemu-block] [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

Re: [Qemu-block] [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-block] [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-block] [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-block] [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-block] [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

[Qemu-block] [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-block] [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-block] [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-block] [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-block] [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-block] [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-block] [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

Re: [Qemu-block] [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-block] [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 '

Re: [Qemu-block] [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

[Qemu-block] [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

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