Re: [Qemu-block] [Qemu-devel] [PATCH for-2.12] block: handle invalid lseek returns gracefully

2018-04-03 Thread Jeff Cody
On Tue, Apr 03, 2018 at 07:57:14AM -0500, Eric Blake wrote: > On 04/02/2018 11:37 PM, Jeff Cody wrote: > > In commit 223a23c198787328ae75bc65d84edf5fde33c0b6, we implemented a > > workaround in the gluster driver to handle invalid values returned for > > SEEK_DATA or SEEK_H

[Qemu-block] [PATCH for-2.12] block: handle invalid lseek returns gracefully

2018-04-02 Thread Jeff Cody
pt in file-posix.c Signed-off-by: Jeff Cody --- block/file-posix.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index d7fb772c14..a2f6d8a8c8 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -2114,7 +2114,12 @@

Re: [Qemu-block] [PATCH] blockjob: use qapi enum helpers

2018-03-28 Thread Jeff Cody
On Tue, Mar 27, 2018 at 05:30:11PM +0200, Marc-André Lureau wrote: > QAPI generator provide #define helpers for looking up enum string. > > Signed-off-by: Marc-André Lureau > --- > blockjob.c | 14 +- > 1 file changed, 5 insertions(+), 9 deletions(-) > > diff --git a/blockjob.c b/bl

Re: [Qemu-block] [PATCH v2 1/1] blockjob: leak fix, remove from txn when failing early

2018-03-28 Thread Jeff Cody
On Wed, Mar 28, 2018 at 04:28:05PM +0200, Marc-André Lureau wrote: > On Wed, Mar 28, 2018 at 4:09 PM, Jeff Cody wrote: > > From: Marc-André Lureau > > > > This fixes leaks found by ASAN such as: > >

[Qemu-block] [PATCH v2 1/1] blockjob: leak fix, remove from txn when failing early

2018-03-28 Thread Jeff Cody
g_test_run ../glib/gtestutils.c:1692 #13 0x5584d270d6e2 in main /home/elmarco/src/qemu/tests/test-blockjob.c:377 #14 0x7f8843641f29 in __libc_start_main (/lib64/libc.so.6+0x20f29) Add an assert to make sure that the job doesn't have associated txn before free(). [Jeff Cody: N.B., used up

[Qemu-block] [PATCH v2 0/1] blockjob: leak fix, remove from txn when failing early

2018-03-28 Thread Jeff Cody
This is Marc-André's patch with the updated content provided by John. To make sure I've added John's bits to it in a way that both John and Marc-André agree is correct, I've dropped all S-o-B's until they provide them. Jeff Cody (1): blockjob: leak fix, remove fr

Re: [Qemu-block] [PATCH] blockjob: leak fix, remove from txn when failing early

2018-03-27 Thread Jeff Cody
On Tue, Mar 27, 2018 at 06:07:36PM +0200, Marc-André Lureau wrote: > This fixes leaks found by ASAN such as: > GTESTER tests/test-blockjob > = > ==31442==ERROR: LeakSanitizer: detected memory leaks > > Direct leak of 24 byte(s) in 1

Re: [Qemu-block] [PATCH] block: drop moderated sheepdog mailing list from MAINTAINERS file

2018-03-21 Thread Jeff Cody
> Signed-off-by: Daniel P. Berrangé Reviewed-by: Jeff Cody > --- > MAINTAINERS | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 354a18ce49..7eea869dcd 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -1871,7 +1871,6 @@ M: Hi

Re: [Qemu-block] [PATCH for-2.12 11/12] vhdx: Check for 4 GB maximum log size on creation

2018-03-21 Thread Jeff Cody
r spec, so I agree the implied max is UINT32_MAX Reviewed-by: Jeff Cody > Signed-off-by: Kevin Wolf > --- > block/vhdx.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/block/vhdx.c b/block/vhdx.c > index 0e48179b81..a1a0302799 100644 > --- a/block/vhdx.c > +

Re: [Qemu-block] [PATCH for-2.12 10/12] vhdx: Don't use error_setg_errno() with constant errno

2018-03-21 Thread Jeff Cody
t; } > if (block_size > VHDX_BLOCK_SIZE_MAX) { > -error_setg_errno(errp, EINVAL, "Block size must not exceed %d", > - VHDX_BLOCK_SIZE_MAX); > +error_setg(errp, "Block size must not exceed %d", > VHDX_BLOCK_SIZE_MAX); > return -EINVAL; > } > > -- > 2.13.6 > Reviewed-by: Jeff Cody

Re: [Qemu-block] [PATCH for-2.12 09/12] vhdx: Require power-of-two block size on create

2018-03-21 Thread Jeff Cody
On Tue, Mar 20, 2018 at 06:36:29PM +0100, Kevin Wolf wrote: > Images with a non-power-of-two block size are invalid and cannot be > opened. Reject such block sizes when creating an image. > Good catch. Reviewed-by: Jeff Cody > Signed-off-by: Kevin Wolf > --- > block/vh

Re: [Qemu-block] [PATCH v3 04/16] block/mirror: Pull out mirror_perform()

2018-03-19 Thread Jeff Cody
} > assert(io_bytes); > offset += io_bytes; > @@ -638,7 +645,7 @@ static int coroutine_fn mirror_dirty_init(MirrorBlockJob > *s) > continue; > } > > -mirror_do_zero_or_discard(s, offset, bytes, false); > +mirror_perform(s, offset, bytes, MIRROR_METHOD_ZERO); > offset += bytes; > } > > -- > 2.14.3 > > Reviewed-by: Jeff Cody

Re: [Qemu-block] [PATCH v3 02/16] block: BDS deletion in bdrv_do_drained_begin()

2018-03-19 Thread Jeff Cody
{ > aio_disable_external(bdrv_get_aio_context(bs)); > @@ -315,6 +330,10 @@ void bdrv_do_drained_begin(BlockDriverState *bs, bool > recursive, > bdrv_do_drained_begin(child->bs, true, child); > } > } > + > +if (add_ref) { > +bdrv_unref(bs); > +} > } > > void bdrv_drained_begin(BlockDriverState *bs) > -- > 2.14.3 > > Reviewed-by: Jeff Cody

Re: [Qemu-block] [PATCH v3 01/16] block: BDS deletion during bdrv_drain_recurse

2018-03-19 Thread Jeff Cody
QLIST_INSERT_HEAD(&bs_list, bs2d, next); > +} > + > +while (!QLIST_EMPTY(&bs_list)) { > +struct BDSToDrain *bs2d = QLIST_FIRST(&bs_list); > +QLIST_REMOVE(bs2d, next); > + > +assert(bs2d->bs->refcnt > 0); > + > +waited |= bdrv_drain_recurse(bs2d->bs); > if (in_main_loop) { > -bdrv_unref(bs); > +bdrv_unref(bs2d->bs); > } > + > +g_free(bs2d); > } > > return waited; > -- > 2.14.3 > > Reviewed-by: Jeff Cody

Re: [Qemu-block] [PATCH v2 for-2.12] iotests: Avoid realpath, for CentOS 6

2018-03-15 Thread Jeff Cody
hen > @@ -587,7 +587,7 @@ if [ -z $QEMU_NBD_PROG ]; then > _init_error "qemu-nbd not found" > fi > fi > -export QEMU_NBD_PROG=$(realpath -- "$(type -p "$QEMU_NBD_PROG")") > +export QEMU_NBD_PROG="$(type -p "$QEMU_NBD_PROG")" > > if [ -z "$QEMU_VXHS_PROG" ]; then >export QEMU_VXHS_PROG="`set_prog_path qnio_server`" > @@ -811,7 +811,7 @@ do > else > echo " - output mismatch (see $seq.out.bad)" > mv $tmp.out $seq.out.bad > -$diff -w "$reference" $(realpath $seq.out.bad) > +$diff -w "$reference" "$PWD"/$seq.out.bad > err=true > fi > fi > -- > 2.14.3 > > Reviewed-by: Jeff Cody

[Qemu-block] [PULL 1/1] block: include original filename when reporting invalid URIs

2018-03-13 Thread Jeff Cody
"driver": "gluster", "path": "luks.qcow2", "server.0.type": "tcp", "server.0.port": "24007", "volume": "gv0"} Of course the root cause problem still exists, but now we know what actual

[Qemu-block] [PULL 0/1] Block patches

2018-03-13 Thread Jeff Cody
The following changes since commit 834eddf22ec762839b724538c7be1d1d3b2d9d3b: Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2018-03-13 10:49:02 +) are available in the git repository at: git://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-r

[Qemu-block] [PATCH v3 1/1] block/mirror: change the semantic of 'force' of block-job-cancel

2018-03-13 Thread Jeff Cody
ile is not in sync, and the command completes immediately), we can just improve the documentation to make the force flag obviously useful. Cc: Paolo Bonzini Cc: Jeff Cody Cc: Kevin Wolf Cc: Max Reitz Cc: Eric Blake Cc: John Snow Reported-by: Huaitong Han Signed-off-by: Huaitong Han Signed-of

Re: [Qemu-block] [PATCH v2 resend] block/mirror: change the semantic of 'force' of block-job-cancel

2018-03-12 Thread Jeff Cody
sed.  However, since quitting a paused job has > >> the same effect as abandoning a backup in a non-paused job (namely, the > >> destination file is not in sync, and the command completes immediately), > >> we can just improve the documentation to make the force flag obviously

Re: [Qemu-block] [PATCH 3/7] qcow: Support .bdrv_co_create

2018-03-12 Thread Jeff Cody
} > + > +/* Now get the QAPI type BlockdevCreateOptions */ > +qdict_put_str(qdict, "driver", "qcow"); > +qdict_put_str(qdict, "file", bs->node_name); > + > +qobj = qdict_crumple(qdict, errp); > +QDECREF(qdict); > +qdict = qobject_to_qdict(qobj); > +if (qdict == NULL) { > +ret = -EINVAL; > +goto fail; > +} > + > +v = qobject_input_visitor_new_keyval(QOBJECT(qdict)); > +visit_type_BlockdevCreateOptions(v, NULL, &create_options, &local_err); > +visit_free(v); > + > +if (local_err) { > +error_propagate(errp, local_err); > +ret = -EINVAL; > +goto fail; > +} > + > +/* Silently round up size */ > +assert(create_options->driver == BLOCKDEV_DRIVER_QCOW); > +create_options->u.qcow.size = > +ROUND_UP(create_options->u.qcow.size, BDRV_SECTOR_SIZE); > + > +/* Create the qcow image (format layer) */ > +ret = qcow_co_create(create_options, errp); > +if (ret < 0) { > +goto fail; > +} > + > +ret = 0; > +fail: > +QDECREF(qdict); > +bdrv_unref(bs); > +qapi_free_BlockdevCreateOptions(create_options); > return ret; > } > > @@ -1128,6 +1191,7 @@ static BlockDriver bdrv_qcow = { > .bdrv_close = qcow_close, > .bdrv_child_perm= bdrv_format_default_perms, > .bdrv_reopen_prepare= qcow_reopen_prepare, > +.bdrv_co_create = qcow_co_create, > .bdrv_co_create_opts= qcow_co_create_opts, > .bdrv_has_zero_init = bdrv_has_zero_init_1, > .supports_backing = true, > -- > 2.13.6 > Reviewed-by: Jeff Cody

Re: [Qemu-block] [PATCH 2/7] qemu-iotests: Enable write tests for parallels

2018-03-12 Thread Jeff Cody
s/qemu-iotests/check > index e6b6ff7a04..469142cd58 100755 > --- a/tests/qemu-iotests/check > +++ b/tests/qemu-iotests/check > @@ -284,7 +284,6 @@ testlist options > > -parallels) > IMGFMT=parallels > -IMGFMT_GENERIC=false > xpand=false > ;; > > -- > 2.13.6 > Reviewed-by: Jeff Cody

Re: [Qemu-block] [PATCH 1/7] parallels: Support .bdrv_co_create

2018-03-12 Thread Jeff Cody
er_size, BDRV_SECTOR_SIZE); > + > +/* Create the Parallels image (format layer) */ > +ret = parallels_co_create(create_options, errp); > +if (ret < 0) { > +goto done; > +} > +ret = 0; > + > +done: > + QDECREF(qdict); > +bdrv_unref(bs); > +qapi_free_BlockdevCreateOptions(create_options); > +return ret; > } > > > @@ -771,25 +892,6 @@ static void parallels_close(BlockDriverState *bs) > error_free(s->migration_blocker); > } > > -static QemuOptsList parallels_create_opts = { > -.name = "parallels-create-opts", > -.head = QTAILQ_HEAD_INITIALIZER(parallels_create_opts.head), > -.desc = { > -{ > -.name = BLOCK_OPT_SIZE, > -.type = QEMU_OPT_SIZE, > -.help = "Virtual disk size", > -}, > -{ > -.name = BLOCK_OPT_CLUSTER_SIZE, > -.type = QEMU_OPT_SIZE, > -.help = "Parallels image cluster size", > -.def_value_str = stringify(DEFAULT_CLUSTER_SIZE), > -}, > -{ /* end of list */ } > -} > -}; > - > static BlockDriver bdrv_parallels = { > .format_name = "parallels", > .instance_size = sizeof(BDRVParallelsState), > @@ -803,6 +905,7 @@ static BlockDriver bdrv_parallels = { > .bdrv_co_readv = parallels_co_readv, > .bdrv_co_writev = parallels_co_writev, > .supports_backing = true, > +.bdrv_co_create = parallels_co_create, > .bdrv_co_create_opts = parallels_co_create_opts, > .bdrv_co_check = parallels_co_check, > .create_opts= ¶llels_create_opts, > -- > 2.13.6 > Reviewed-by: Jeff Cody

[Qemu-block] [PATCH 1/1] block: fix iotest 146 output expectations

2018-03-12 Thread Jeff Cody
Commit bff5554843 added "force_size" into the common.filter for _filter_img_create(), but test 146 still expects it in the output. Signed-off-by: Jeff Cody --- tests/qemu-iotests/146.out | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/146.out b/

Re: [Qemu-block] [PATCH 6/7] vhdx: Support .bdrv_co_create

2018-03-12 Thread Jeff Cody
vhdx"); > +qdict_put_str(qdict, "file", bs->node_name); > + > +qobj = qdict_crumple(qdict, errp); > +QDECREF(qdict); > +qdict = qobject_to_qdict(qobj); > +if (qdict == NULL) { > +ret = -EINVAL; > +goto fail; > +} > + > +v = qobject_input_visitor_new_keyval(QOBJECT(qdict)); > +visit_type_BlockdevCreateOptions(v, NULL, &create_options, &local_err); > +visit_free(v); > + > +if (local_err) { > +error_propagate(errp, local_err); > +ret = -EINVAL; > +goto fail; > +} > + > +/* Silently round up size */ > +assert(create_options->driver == BLOCKDEV_DRIVER_VHDX); > +create_options->u.vhdx.size = > +ROUND_UP(create_options->u.vhdx.size, BDRV_SECTOR_SIZE); > + > +/* Create the vhdx image (format layer) */ > +ret = vhdx_co_create(create_options, errp); > + > +fail: > +QDECREF(qdict); > +bdrv_unref(bs); > +qapi_free_BlockdevCreateOptions(create_options); > +return ret; > +} > + > /* If opened r/w, the VHDX driver will automatically replay the log, > * if one is present, inside the vhdx_open() call. > * > @@ -2005,6 +2092,7 @@ static BlockDriver bdrv_vhdx = { > .bdrv_child_perm= bdrv_format_default_perms, > .bdrv_co_readv = vhdx_co_readv, > .bdrv_co_writev = vhdx_co_writev, > +.bdrv_co_create = vhdx_co_create, > .bdrv_co_create_opts= vhdx_co_create_opts, > .bdrv_get_info = vhdx_get_info, > .bdrv_co_check = vhdx_co_check, > -- > 2.13.6 > VHDX image files created look correct, so aside from the minor typo: Reviewed-by: Jeff Cody

Re: [Qemu-block] [PATCH v5 01/21] blockjobs: fix set-speed kick

2018-03-12 Thread Jeff Cody
t; Error **errp) > } > > job->speed = speed; > -if (speed <= old_speed) { > +if (speed && speed <= old_speed) { > return; > } > > -- > 2.14.3 > Reviewed-by: Jeff Cody

Re: [Qemu-block] [PATCH] block: include original filename when reporting invalid URIs

2018-03-06 Thread Jeff Cody
On Tue, Feb 06, 2018 at 10:52:04AM +, Daniel P. Berrangé wrote: > Consider passing a JSON based block driver to "qemu-img commit" > > $ qemu-img commit 'json:{"driver":"qcow2","file":{"driver":"gluster",\ > "volume":"gv0","path":"sn1.qcow2", > "server":[{"ty

Re: [Qemu-block] [Qemu-devel] [PATCH 8/9] iotests: add file_path helper

2018-02-19 Thread Jeff Cody
On Fri, Feb 16, 2018 at 02:46:35PM -0600, Eric Blake wrote: > On 02/15/2018 07:51 AM, Vladimir Sementsov-Ogievskiy wrote: > >Simple way to have auto generated filenames with auto clenup. Like > > s/clenup/cleanup/ > > >FilePath but without using 'with' statement and without additional > >indentat

[Qemu-block] [PULL 1/2] block/ssh: fix possible segmentation fault when .desc is not null-terminated

2018-01-31 Thread Jeff Cody
ed by http://lists.nongnu.org/archive/html/qemu-devel/2018-01/msg00883.html. Fixes: 8a6a80896d6af03b8ee0c17cdf37219eca2588a7 ("block/ssh: Use QemuOpts for runtime options") Cc: Max Reitz Cc: Eric Blake Signed-off-by: Murilo Opsfelder Araujo Reviewed-by: Eric Blake Reviewed-by: Jeff Cody Sign

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

2018-01-31 Thread Jeff Cody
The following changes since commit b05631954d6dfe93340d516660397e2c1a2a5dd6: Merge remote-tracking branch 'remotes/rth/tags/pull-hppa-20180131' into staging (2018-01-31 15:50:29 +) are available in the git repository at: git://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-reques

[Qemu-block] [PULL 2/2] iotests: Make 200 run on tmpfs

2018-01-31 Thread Jeff Cody
ne by cache=$CACHEMODE. Signed-off-by: Max Reitz Reviewed-by: Jeff Cody Message-id: 20180117135015.15051-1-mre...@redhat.com Signed-off-by: Jeff Cody --- tests/qemu-iotests/200 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/200 b/tests/qemu-iotests/200

Re: [Qemu-block] [PATCH v2] iotests: Make 200 run on tmpfs

2018-01-17 Thread Jeff Cody
On Wed, Jan 17, 2018 at 02:50:15PM +0100, Max Reitz wrote: > 200 currently fails on tmpfs because it sets cache=none. However, > without that (and aio=native), the test still works now and it fails > before Jeff's series (on fc7dbc119e0852a70dc9fa68bb41a318e49e4cd6). So > we can probably remove t

Re: [Qemu-block] [PATCH v2] iotests: Make 200 run on tmpfs

2018-01-17 Thread Jeff Cody
n probably remove the aio=native safely, and replace cache=none by > cache=$CACHEMODE. > > Signed-off-by: Max Reitz Tested-by, and: Reviewed-by: Jeff Cody > --- > v2: Use cache=$CACHEMODE instead of dropping it altogether [Stefan] > --- > tests/qemu-iotests/200 | 2 +

Re: [Qemu-block] [PATCH] block/ssh: fix possible segmentation fault when .desc is not null-terminated

2018-01-07 Thread Jeff Cody
On Fri, Jan 05, 2018 at 12:44:40PM -0200, Murilo Opsfelder Araujo wrote: > This patch prevents a possible segmentation fault when .desc members are > checked > against NULL. > > The ssh_runtime_opts was added by commit > 8a6a80896d6af03b8ee0c17cdf37219eca2588a7 ("block/ssh: Use QemuOpts for runti

Re: [Qemu-block] [Qemu-devel] [PATCH v6 14/20] sheepdog: Switch to .bdrv_co_block_status()

2018-01-02 Thread Jeff Cody
> .bdrv_co_flush_to_disk = sd_co_flush_to_disk, > .bdrv_co_pdiscard = sd_co_pdiscard, > -.bdrv_co_get_block_status = sd_co_get_block_status, > +.bdrv_co_block_status = sd_co_block_status, > > .bdrv_snapshot_create = sd_snapshot_create, > .bdrv_snapshot_goto = sd_snapshot_goto, > -- > 2.14.3 > > Minor conflicts here with head, but straightforward to fix. Reviewed-by: Jeff Cody

Re: [Qemu-block] [PATCH v6 06/20] iscsi: Switch iscsi_allocmap_update() to byte-based

2018-01-02 Thread Jeff Cody
On Thu, Dec 07, 2017 at 02:30:22PM -0600, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Convert all uses of > the allocmap (no semantic change). Callers that already had bytes > available are simpler, and callers

Re: [Qemu-block] [PATCH 3/7] blockjob: create block_job_throttle

2018-01-02 Thread Jeff Cody
ock_job_yield(BlockJob *job); > > +/** > + * block_job_throttle: > + * @job: The job that calls the function. > + * > + * Yield if it has been SLICE_TIME nanoseconds since the last yield. > + * Otherwise, check if we need to pause (and update the yield counter). > + */ > +void block_job_throttle(BlockJob *job); > + > /** > * block_job_pause_all: > * > -- > 2.14.3 > Reviewed-by: Jeff Cody

Re: [Qemu-block] [PATCH 2/7] blockjob: consolidate SLICE_TIME definition

2018-01-02 Thread Jeff Cody
ckJob { > BlockJob common; > RateLimit limit; > diff --git a/include/block/blockjob_int.h b/include/block/blockjob_int.h > index c9b23b0cc9..209fa1bb3e 100644 > --- a/include/block/blockjob_int.h > +++ b/include/block/blockjob_int.h > @@ -29,6 +29,8 @@ > #include "block/blockjob.h" > #include "block/block.h" > > +#define SLICE_TIME 1ULL /* ns */ > + > /** > * BlockJobDriver: > * > -- > 2.14.3 > Reviewed-by: Jeff Cody

Re: [Qemu-block] [PATCH v3] ssh: switch from libssh2 to libssh

2017-12-19 Thread Jeff Cody
On Mon, Dec 18, 2017 at 09:31:40PM +, Richard W.M. Jones wrote: > On Mon, Dec 18, 2017 at 01:43:39PM -0500, John Snow wrote: > > Hi, friendly ping: > > > > It's been over a month with no replies, so it's safe to say this has > > gotten lost in the 2.11 release shuffle. > > > > Recommend you r

[Qemu-block] [PULL 08/10] block/sheepdog: code beautification

2017-12-18 Thread Jeff Cody
No functional changes, just whitespace manipulation. Signed-off-by: Jeff Cody Reviewed-by: Eric Blake Reviewed-by: Darren Kenny Signed-off-by: Jeff Cody --- block/sheepdog.c | 164 +++ 1 file changed, 82 insertions(+), 82 deletions(-) diff

[Qemu-block] [PULL 06/10] blockjob: kick jobs on set-speed

2017-12-18 Thread Jeff Cody
to allow it to recalculate its delay. Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 20171213204611.26276-1-js...@redhat.com Signed-off-by: Jeff Cody --- blockjob.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/blockjob.c b

[Qemu-block] [PULL 10/10] block/curl: fix minor memory leaks

2017-12-18 Thread Jeff Cody
Signed-off-by: Jeff Cody Reviewed-by: Richard W.M. Jones 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-block] [PULL 05/10] backup: use copy_bitmap in incremental backup

2017-12-18 Thread Jeff Cody
: Stefan Hajnoczi Reviewed-by: John Snow Reviewed-by: Jeff Cody Message-id: 20171012135313.227864-6-vsement...@virtuozzo.com Signed-off-by: Jeff Cody --- block/backup.c | 55 +-- 1 file changed, 17 insertions(+), 38 deletions(-) diff --git a

[Qemu-block] [PULL 04/10] backup: simplify non-dirty bits progress processing

2017-12-18 Thread Jeff Cody
l with other copying requests. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Reviewed-by: Stefan Hajnoczi Reviewed-by: Jeff Cody Message-id: 20171012135313.227864-5-vsement...@virtuozzo.com Signed-off-by: Jeff Cody --- block/backup.c | 18 +++--- 1 file changed,

[Qemu-block] [PULL 03/10] backup: init copy_bitmap from sync_bitmap for incremental

2017-12-18 Thread Jeff Cody
From: Vladimir Sementsov-Ogievskiy We should not copy non-dirty clusters in write notifiers. So, initialize copy_bitmap from sync_bitmap. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Reviewed-by: Jeff Cody Reviewed-by: Stefan Hajnoczi Message-id: 20171012135313.227864

[Qemu-block] [PULL 09/10] block/curl: check error return of curl_global_init()

2017-12-18 Thread Jeff Cody
it a bool Signed-off-by: Jeff Cody Reviewed-by: Eric Blake Reviewed-by: Richard W.M. Jones Reviewed-by: Darren Kenny 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..00a9

[Qemu-block] [PULL 07/10] block/sheepdog: remove spurious NULL check

2017-12-18 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 Reviewed-by: Eric Blake Reviewed-by: Darren Kenny Signed-off-by: Jeff Cody --- block/sheepdog.c | 2 +- 1

[Qemu-block] [PULL 02/10] backup: move from done_bitmap to copy_bitmap

2017-12-18 Thread Jeff Cody
From: Vladimir Sementsov-Ogievskiy Use HBitmap copy_bitmap instead of done_bitmap. This is needed to improve incremental backup in following patches and to unify backup loop for full/incremental modes in future patches. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Jeff Cody

[Qemu-block] [PULL 00/10] Block patches

2017-12-18 Thread Jeff Cody
ol patches ---- Jeff Cody (4): block/sheepdog: remove spurious NULL check block/sheepdog: code beautification block/curl: check error return of curl_global_init() block/curl: fix minor memory leaks John Snow (1): blockjob: kick jobs on set-speed Vladimir Sementsov-Og

[Qemu-block] [PULL 01/10] hbitmap: add next_zero function

2017-12-18 Thread Jeff Cody
From: Vladimir Sementsov-Ogievskiy The function searches for next zero bit. Also add interface for BdrvDirtyBitmap and unit test. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Message-id: 20171012135313.227864-2-vsement...@virtuozzo.com Signed-off-by: Jeff Cody

Re: [Qemu-block] [PATCH v3 0/7] Code cleanup and minor fixes (for 2.11)

2017-12-18 Thread Jeff Cody
On Tue, Nov 07, 2017 at 05:27:17PM -0500, Jeff Cody wrote: > Changes from v2 -> v3: > > Patch 1: Return -EIO for ssh_state_init() (Thanks Eric) > Patch 4: fixed missed line (Thanks Eric) > Patch 7: fixed opaque pointer assignment (Thanks Eric) > > git-backport-dif

Re: [Qemu-block] [Qemu-devel] [PATCH v3] ssh: switch from libssh2 to libssh

2017-12-18 Thread Jeff Cody
On Wed, Nov 15, 2017 at 05:26:48PM +0100, Pino Toscano wrote: > Rewrite the implementation of the ssh block driver to use libssh instead > of libssh2. The libssh library has various advantages over libssh2: > - easier API for authentication (for example for using ssh-agent) > - easier API for know

Re: [Qemu-block] [PATCH v2] blockjob: kick jobs on set-speed

2017-12-14 Thread Jeff Cody
On Wed, Dec 13, 2017 at 03:46:11PM -0500, John Snow wrote: > If users set an unreasonably low speed (like one byte per second), the > calculated delay may exceed many hours. While we like to punish users > for asking for stupid things, we do also like to allow users to correct > their wicked ways.

Re: [Qemu-block] [PATCH] blockjob: kick jobs on set-speed

2017-12-11 Thread Jeff Cody
On Mon, Dec 11, 2017 at 06:46:09PM -0500, John Snow wrote: > If users set an unreasonably low speed (like one byte per second), the > calculated delay may exceed many hours. While we like to punish users > for asking for stupid things, we do also like to allow users to correct > their wicked ways.

Re: [Qemu-block] [PATCH for-2.11 1/1] blockjob: Make block_job_pause_all() keep a reference to the jobs

2017-11-30 Thread Jeff Cody
On Thu, Nov 30, 2017 at 03:43:35PM +0100, Kevin Wolf wrote: > Am 30.11.2017 um 15:35 hat Alberto Garcia geschrieben: > > On Thu 30 Nov 2017 01:27:32 PM CET, Kevin Wolf wrote: > > > > >> Destroying a paused block job during bdrv_reopen_multiple() has two > > >> consequences: > > >> > > >>1) Th

Re: [Qemu-block] [PATCH for-2.12] iotests: Make 200 run on tmpfs

2017-11-29 Thread Jeff Cody
n probably remove it safely. > > Signed-off-by: Max Reitz Reviewed-by: Jeff Cody > --- > tests/qemu-iotests/200 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/qemu-iotests/200 b/tests/qemu-iotests/200 > index d8787ddb46..0e814c9b6c 1007

Re: [Qemu-block] [PATCH 4/4] blockjob: reimplement block_job_sleep_ns to allow cancellation

2017-11-29 Thread Jeff Cody
On Wed, Nov 29, 2017 at 03:21:37PM +0100, Kevin Wolf wrote: > Am 29.11.2017 um 14:56 hat Jeff Cody geschrieben: > > On Wed, Nov 29, 2017 at 11:25:13AM +0100, Paolo Bonzini wrote: > > > This reverts the effects of commit 4afeffc857 ("blockjob: do not allow > > >

Re: [Qemu-block] [PATCH 4/4] blockjob: reimplement block_job_sleep_ns to allow cancellation

2017-11-29 Thread Jeff Cody
QLIST_ENTRY(BlockJob) txn_list; > diff --git a/include/block/blockjob_int.h b/include/block/blockjob_int.h > index f7ab183a39..c9b23b0cc9 100644 > --- a/include/block/blockjob_int.h > +++ b/include/block/blockjob_int.h > @@ -142,8 +142,8 @@ void *block_job_create(const char *job_id, const > BlockJobDriver *driver, > * @ns: How many nanoseconds to stop for. > * > * Put the job to sleep (assuming that it wasn't canceled) for @ns > - * %QEMU_CLOCK_REALTIME nanoseconds. Canceling the job will not interrupt > - * the wait, so the cancel will not process until the coroutine wakes up. > + * %QEMU_CLOCK_REALTIME nanoseconds. Canceling the job will immediately > + * interrupt the wait. > */ > void block_job_sleep_ns(BlockJob *job, int64_t ns); > > -- > 2.14.3 > My only concerns were regarding comments, and Kevin can fix them when applying if he wants. So: Reviewed-by: Jeff Cody

Re: [Qemu-block] [PATCH 4/4] blockjob: reimplement block_job_sleep_ns to allow cancellation

2017-11-29 Thread Jeff Cody
On Wed, Nov 29, 2017 at 01:54:39PM +0100, Kevin Wolf wrote: > Am 29.11.2017 um 11:25 hat Paolo Bonzini geschrieben: > > This reverts the effects of commit 4afeffc857 ("blockjob: do not allow > > coroutine double entry or entry-after-completion", 2017-11-21) > > > > This fixed the symptom of a bug

Re: [Qemu-block] [PATCH 3/4] blockjob: introduce block_job_do_yield

2017-11-29 Thread Jeff Cody
lo Bonzini Reviewed-by: Jeff Cody > --- > blockjob.c | 24 > 1 file changed, 16 insertions(+), 8 deletions(-) > > diff --git a/blockjob.c b/blockjob.c > index db9e4fc89a..4d22b7d2fb 100644 > --- a/blockjob.c > +++ b/blockjob.c > @@ -729

Re: [Qemu-block] [PATCH 2/4] blockjob: remove clock argument from block_job_sleep_ns

2017-11-29 Thread Jeff Cody
zini Reviewed-by: Jeff Cody > --- > block/backup.c | 4 ++-- > block/commit.c | 2 +- > block/mirror.c | 6 +++--- > block/stream.c | 2 +- > blockjob.c | 5 +++-- > include/block/blockjob_int.h | 7

Re: [Qemu-block] [PATCH 0/4] blockjob: reinstate busy=false/busy=true in block_job_sleep_ns

2017-11-29 Thread Jeff Cody
| 5 ++- > include/block/blockjob_int.h | 7 ++-- > tests/test-blockjob-txn.c| 2 +- > 9 files changed, 79 insertions(+), 33 deletions(-) > > -- > 2.14.3 > For the series: Tested-By: Jeff Cody

Re: [Qemu-block] Block layer complexity: what to do to keep it under control?

2017-11-28 Thread Jeff Cody
On Wed, Nov 29, 2017 at 11:55:02AM +0800, Fam Zheng wrote: > Hi all, > > As we move forwards with new features in the block layer, the chances of > tricky > bugs happening have been increasing alongside - block jobs, coroutines, > throttling, AioContext, op blockers and image locking combined tog

Re: [Qemu-block] [Qemu-devel] [PATCH v2 0/5] backup improvements part 1

2017-11-28 Thread Jeff Cody
On Tue, Nov 14, 2017 at 12:00:06AM -0500, Jeff Cody wrote: > On Mon, Nov 13, 2017 at 05:41:13PM -0500, John Snow wrote: > > Jeff, I think this ought to go through your tree, but I'll sign off on it. > > > > Fam: Do you agree? > > > > (Probably -next materi

Re: [Qemu-block] [PATCH for-2.11 1/4] Revert "coroutine: abort if we try to schedule or enter a pending coroutine"

2017-11-28 Thread Jeff Cody
On Tue, Nov 28, 2017 at 06:19:31PM +0100, Kevin Wolf wrote: > Am 28.11.2017 um 18:01 hat Paolo Bonzini geschrieben: > > On 28/11/2017 17:37, Kevin Wolf wrote: > > >> > > >> It can also conflict badly with another aio_co_schedule(). Your patch > > >> here removes the assertion in this case, and pat

Re: [Qemu-block] [PATCH for-2.11 3/4] coroutine: Cancel aio_co_schedule() on direct entry

2017-11-28 Thread Jeff Cody
On Tue, Nov 28, 2017 at 05:51:21PM +0100, Paolo Bonzini wrote: > On 28/11/2017 17:42, Jeff Cody wrote: > > On Tue, Nov 28, 2017 at 05:28:50PM +0100, Kevin Wolf wrote: > >> Am 28.11.2017 um 17:14 hat Paolo Bonzini geschrieben: > >>> On 28/11/2017 16:43, Kevin Wolf w

Re: [Qemu-block] [PATCH for-2.11 3/4] coroutine: Cancel aio_co_schedule() on direct entry

2017-11-28 Thread Jeff Cody
On Tue, Nov 28, 2017 at 05:28:50PM +0100, Kevin Wolf wrote: > Am 28.11.2017 um 17:14 hat Paolo Bonzini geschrieben: > > On 28/11/2017 16:43, Kevin Wolf wrote: > > > +/* Make sure that a coroutine that can alternatively reentered from > > > two > > > + * different sources isn't reentered mo

Re: [Qemu-block] [PATCH for-2.11 3/4] coroutine: Cancel aio_co_schedule() on direct entry

2017-11-28 Thread Jeff Cody
On Tue, Nov 28, 2017 at 04:43:49PM +0100, Kevin Wolf wrote: > If a coroutine can be reentered from multiple possible sources, we need > to be careful in the case that two sources try to reenter it at the same > time. > > There are two different cases where this can happen: > > 1. A coroutine spaw

Re: [Qemu-block] [PATCH for-2.11 4/4] block: Expect graph changes in bdrv_parent_drained_begin/end

2017-11-28 Thread Jeff Cody
t_parent) { > +QLIST_FOREACH_SAFE(c, &bs->parents, next_parent, next) { > if (c->role->drained_end) { > c->role->drained_end(c); > } > -- > 2.13.6 > Reviewed-by: Jeff Cody

Re: [Qemu-block] [PATCH for-2.11 2/4] Revert "blockjob: do not allow coroutine double entry or entry-after-completion"

2017-11-28 Thread Jeff Cody
orrectly across AioContexts, which we'll do in a minute. > > Signed-off-by: Kevin Wolf Reviewed-by: Jeff Cody > --- > include/block/blockjob_int.h | 3 +-- > blockjob.c | 7 ++- > 2 files changed, 3 insertions(+), 7 deletions(-) > > diff --git a/

Re: [Qemu-block] [PATCH for-2.11 1/4] Revert "coroutine: abort if we try to schedule or enter a pending coroutine"

2017-11-28 Thread Jeff Cody
. > > In particular, reentering a coroutine during co_aio_sleep_ns() is fine; > the function is explicitly written to allow this. > > aio_co_schedule() can indeed conflict with direct coroutine invocations, > but this is exactky what we want to fix, so remove that check again,

Re: [Qemu-block] [PATCH for-2.11 0/4] Fix qemu-iotests failures

2017-11-28 Thread Jeff Cody
ne.c| 31 +-- > 7 files changed, 41 insertions(+), 60 deletions(-) > > -- > 2.13.6 > Tested-by: Jeff Cody

Re: [Qemu-block] [PATCH 0/1] block: Workaround for the iotests errors

2017-11-27 Thread Jeff Cody
On Tue, Nov 28, 2017 at 12:29:09AM +0100, Kevin Wolf wrote: > Am 23.11.2017 um 18:57 hat Fam Zheng geschrieben: > > Jeff's block job patch made the latent drain bug visible, and I find this > > patch, which by itself also makes some sense, can hide it again. :) With it > > applied we are at least b

Re: [Qemu-block] [PATCH 0/1] block: Workaround for the iotests errors

2017-11-23 Thread Jeff Cody
On Fri, Nov 24, 2017 at 01:57:46AM +0800, Fam Zheng wrote: > Jeff's block job patch made the latent drain bug visible, and I find this > patch, which by itself also makes some sense, can hide it again. :) With it > applied we are at least back to the ground where patchew's iotests (make > docker-te

[Qemu-block] [PULL 3/4] qemu-iotests: add option in common.qemu for mismatch only

2017-11-21 Thread Jeff Cody
Add option to echo response to QMP / HMP command only on mismatch. Useful for ignore all normal responses, but catching things like segfaults. Signed-off-by: Jeff Cody Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/common.qemu | 8 +++- 1 file changed, 7 insertions(+), 1 deletion

[Qemu-block] [PULL 4/4] qemu-iotest: add test for blockjob coroutine race condition

2017-11-21 Thread Jeff Cody
Signed-off-by: Jeff Cody Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/200 | 99 ++ tests/qemu-iotests/200.out | 14 +++ tests/qemu-iotests/group | 1 + 3 files changed, 114 insertions(+) create mode 100755 tests/qemu-iotests/200

[Qemu-block] [PULL 2/4] coroutine: abort if we try to schedule or enter a pending coroutine

2017-11-21 Thread Jeff Cody
off-by: Jeff Cody Reviewed-by: Stefan Hajnoczi --- include/qemu/coroutine_int.h | 13 ++--- util/async.c | 13 + util/qemu-coroutine-sleep.c | 12 util/qemu-coroutine.c| 14 ++ 4 files changed, 49 insertions(+), 3 deletions(-) d

[Qemu-block] [PULL 1/4] blockjob: do not allow coroutine double entry or entry-after-completion

2017-11-21 Thread Jeff Cody
gi?id=1508708 Signed-off-by: Jeff Cody Reviewed-by: Stefan Hajnoczi --- blockjob.c | 7 +-- include/block/blockjob_int.h | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/blockjob.c b/blockjob.c index 3a0c491..ff9a614 100644 --- a/blockjob.c +++

[Qemu-block] [PULL 0/4] Late blockjob / coroutine patches for -rc2

2017-11-21 Thread Jeff Cody
Jeff Cody (4): blockjob: do not allow coroutine double entry or entry-after-completion coroutine: abort if we try to schedule or enter a pending coroutine qemu-iotests: add option in common.qemu for mismatch only qemu-iotest: add test for blockjob coroutine race condition

Re: [Qemu-block] [PATCH v3 for-2.11 0/4] Fix segfault in blockjob race condition

2017-11-21 Thread Jeff Cody
On Tue, Nov 21, 2017 at 10:38:49AM -0500, Jeff Cody wrote: > Changes from v2 -> v3: > --- > > Patch 1: Updated commit message to include why immediate cancel is > ok to remove (Thanks Paolo) > > Dropped useless hunk (Thanks Stef

[Qemu-block] [PATCH v3 for-2.11 4/4] qemu-iotest: add test for blockjob coroutine race condition

2017-11-21 Thread Jeff Cody
Signed-off-by: Jeff Cody --- tests/qemu-iotests/200 | 99 ++ tests/qemu-iotests/200.out | 14 +++ tests/qemu-iotests/group | 1 + 3 files changed, 114 insertions(+) create mode 100755 tests/qemu-iotests/200 create mode 100644 tests/qemu

[Qemu-block] [PATCH v3 for-2.11 3/4] qemu-iotests: add option in common.qemu for mismatch only

2017-11-21 Thread Jeff Cody
Add option to echo response to QMP / HMP command only on mismatch. Useful for ignore all normal responses, but catching things like segfaults. Signed-off-by: Jeff Cody --- tests/qemu-iotests/common.qemu | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/qemu

[Qemu-block] [PATCH v3 for-2.11 1/4] blockjob: do not allow coroutine double entry or entry-after-completion

2017-11-21 Thread Jeff Cody
gi?id=1508708 Signed-off-by: Jeff Cody --- blockjob.c | 7 +-- include/block/blockjob_int.h | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/blockjob.c b/blockjob.c index 3a0c491..ff9a614 100644 --- a/blockjob.c +++ b/blockjob.c @@ -797,11 +7

[Qemu-block] [PATCH v3 for-2.11 2/4] coroutine: abort if we try to schedule or enter a pending coroutine

2017-11-21 Thread Jeff Cody
re-entry to catch this, as the coroutine may run and exit with COROUTINE_TERMINATE before the scheduled coroutine executes. (This is the scenario that was occurring and fixed in the previous patch). Signed-off-by: Jeff Cody --- include/qemu/coroutine_int.h | 6 ++ util/asyn

[Qemu-block] [PATCH v3 for-2.11 0/4] Fix segfault in blockjob race condition

2017-11-21 Thread Jeff Cody
o try and catch this sort of scenario with an abort, before a segfault or memory corruption occurs. Jeff Cody (4): blockjob: do not allow coroutine double entry or entry-after-completion coroutine: abort if we try to schedule or enter a pending coroutine qemu-iotests: add option in common

Re: [Qemu-block] [PATCH v2 for-2.11 1/4] blockjob: do not allow coroutine double entry or entry-after-completion

2017-11-21 Thread Jeff Cody
On Tue, Nov 21, 2017 at 02:12:32PM +0100, Paolo Bonzini wrote: > On 21/11/2017 11:49, Stefan Hajnoczi wrote: > > On Mon, Nov 20, 2017 at 09:23:23PM -0500, Jeff Cody wrote: > >> @@ -291,10 +291,10 @@ void block_job_start(BlockJob *job) > >> { > >> assert(j

[Qemu-block] [PATCH v2 for-2.11 3/4] qemu-iotests: add option in common.qemu for mismatch only

2017-11-20 Thread Jeff Cody
Add option to echo response to QMP / HMP command only on mismatch. Useful for ignore all normal responses, but catching things like segfaults. Signed-off-by: Jeff Cody --- tests/qemu-iotests/common.qemu | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/qemu

[Qemu-block] [PATCH v2 for-2.11 4/4] qemu-iotest: add test for blockjob coroutine race condition

2017-11-20 Thread Jeff Cody
Signed-off-by: Jeff Cody --- tests/qemu-iotests/200 | 99 ++ tests/qemu-iotests/200.out | 14 +++ tests/qemu-iotests/group | 1 + 3 files changed, 114 insertions(+) create mode 100755 tests/qemu-iotests/200 create mode 100644 tests/qemu

[Qemu-block] [PATCH v2 for-2.11 1/4] blockjob: do not allow coroutine double entry or entry-after-completion

2017-11-20 Thread Jeff Cody
fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1508708 Also, in block_job_start(), set the relevant job flags (.busy, .paused) before creating the coroutine, not just before executing it. Signed-off-by: Jeff Cody --- blockjob.c | 9 ++--- include/block/blockjob_int.h | 3 ++- 2 fil

[Qemu-block] [PATCH v2 for-2.11 2/4] coroutine: abort if we try to schedule or enter a pending coroutine

2017-11-20 Thread Jeff Cody
re-entry to catch this, as the coroutine may run and exit with COROUTINE_TERMINATE before the scheduled coroutine executes. (This is the scenario that was occuring and fixed in the previous patch). Signed-off-by: Jeff Cody --- include/qemu/coroutine_int.h | 6 ++ util/async.c |

[Qemu-block] [PATCH v2 for-2.11 0/4] Fix segfault in blockjob race condition

2017-11-20 Thread Jeff Cody
iotest in this series is a reproducer, as is the reproducer script attached in this bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1508708 There are two additional patches to try and catch this sort of scenario with an abort, before a segfault or memory corruption occurs. Jeff Cody (4):

Re: [Qemu-block] [PATCH 3/5] coroutines: abort if we try to enter a still-sleeping coroutine

2017-11-20 Thread Jeff Cody
On Tue, Nov 21, 2017 at 12:13:46AM +0100, Paolo Bonzini wrote: > On 21/11/2017 00:08, Jeff Cody wrote: > > @@ -34,6 +36,7 @@ void coroutine_fn co_aio_sleep_ns(AioContext *ctx, > > QEMUClockType type, > > CoSleepCB sleep_cb = { > > .co = qemu_coroutine_self

Re: [Qemu-block] [PATCH 3/5] coroutines: abort if we try to enter a still-sleeping coroutine

2017-11-20 Thread Jeff Cody
On Mon, Nov 20, 2017 at 11:47:09PM +0100, Paolo Bonzini wrote: > On 20/11/2017 23:35, Jeff Cody wrote: > >> Is this a different "state" (in Stefan's parlance) than scheduled? In > >> practice both means that someone may call qemu_(aio_)coroutine_enter > >

Re: [Qemu-block] [PATCH 3/5] coroutines: abort if we try to enter a still-sleeping coroutine

2017-11-20 Thread Jeff Cody
On Mon, Nov 20, 2017 at 11:30:39PM +0100, Paolo Bonzini wrote: > On 20/11/2017 03:46, Jeff Cody wrote: > > Once a coroutine is "sleeping", the timer callback will either enter the > > coroutine, or schedule it for the next AioContext if using iothreads. > >

Re: [Qemu-block] [PATCH 3/5] coroutines: abort if we try to enter a still-sleeping coroutine

2017-11-20 Thread Jeff Cody
On Mon, Nov 20, 2017 at 11:43:34AM +, Stefan Hajnoczi wrote: > On Sun, Nov 19, 2017 at 09:46:44PM -0500, Jeff Cody wrote: > > diff --git a/include/qemu/coroutine_int.h b/include/qemu/coroutine_int.h > > index 931cdc9..b071217 100644 > > --- a/include/qemu/coroutine_int.h &

Re: [Qemu-block] [PATCH 2/5] coroutine: abort if we try to enter coroutine scheduled for another ctx

2017-11-20 Thread Jeff Cody
On Mon, Nov 20, 2017 at 11:28:26AM +, Stefan Hajnoczi wrote: > On Sun, Nov 19, 2017 at 09:46:43PM -0500, Jeff Cody wrote: > > diff --git a/include/qemu/coroutine_int.h b/include/qemu/coroutine_int.h > > index cb98892..931cdc9 100644 > > --- a/include/qemu/coroutine_int.h &

Re: [Qemu-block] [PATCH 1/5] blockjob: do not allow coroutine double entry or entry-after-completion

2017-11-20 Thread Jeff Cody
On Mon, Nov 20, 2017 at 11:16:53AM +, Stefan Hajnoczi wrote: > On Sun, Nov 19, 2017 at 09:46:42PM -0500, Jeff Cody wrote: > > --- a/blockjob.c > > +++ b/blockjob.c > > @@ -291,10 +291,10 @@ void block_job_start(BlockJob *job) > > { > > assert(job &&am

[Qemu-block] [PATCH 4/5] qemu-iotests: add option in common.qemu for mismatch only

2017-11-19 Thread Jeff Cody
Add option to echo response to QMP / HMP command only on mismatch. Useful for ignore all normal responses, but catching things like segfaults. Signed-off-by: Jeff Cody --- tests/qemu-iotests/common.qemu | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/qemu

[Qemu-block] [PATCH 5/5] qemu-iotest: add test for blockjob coroutine race condition

2017-11-19 Thread Jeff Cody
Signed-off-by: Jeff Cody --- tests/qemu-iotests/200 | 99 ++ tests/qemu-iotests/200.out | 14 +++ tests/qemu-iotests/group | 1 + 3 files changed, 114 insertions(+) create mode 100755 tests/qemu-iotests/200 create mode 100644 tests/qemu

[Qemu-block] [PATCH 2/5] coroutine: abort if we try to enter coroutine scheduled for another ctx

2017-11-19 Thread Jeff Cody
the scenario that was occuring and fixed in the previous patch). Signed-off-by: Jeff Cody --- include/qemu/coroutine_int.h | 3 +++ util/async.c | 7 +++ util/qemu-coroutine.c| 9 + 3 files changed, 19 insertions(+) diff --git a/include/qemu/coroutine_int.h b/incl

[Qemu-block] [PATCH 3/5] coroutines: abort if we try to enter a still-sleeping coroutine

2017-11-19 Thread Jeff Cody
sleep_cb(), because any doubly entry attempt after point should be caught by either the co->scheduled or co->caller checks. Signed-off-by: Jeff Cody --- include/qemu/coroutine_int.h | 2 ++ util/qemu-coroutine-sleep.c | 3 +++ util/qemu-coroutine.c| 5 + 3 files changed, 10 in

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