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
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 @@
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
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:
> >
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
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
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
> 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
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
> +
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
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
}
> 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
{
> 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
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
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
"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
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
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
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
}
> +
> +/* 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
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
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
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/
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
t; Error **errp)
> }
>
> job->speed = speed;
> -if (speed <= old_speed) {
> +if (speed && speed <= old_speed) {
> return;
> }
>
> --
> 2.14.3
>
Reviewed-by: 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
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
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
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
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
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
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 +
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
> .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
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
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
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
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
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
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
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
: 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
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,
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
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
'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
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
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
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
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
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
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.
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.
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
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
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
> > >
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
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
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
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
| 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
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
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
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
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
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
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
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
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/
.
>
> 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,
ne.c| 31 +--
> 7 files changed, 41 insertions(+), 60 deletions(-)
>
> --
> 2.13.6
>
Tested-by: 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
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
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
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
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
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
+++
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
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
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
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
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
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
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
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
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
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
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
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 |
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):
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
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
> >
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.
> >
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
&
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
&
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
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
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
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
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
201 - 300 of 1251 matches
Mail list logo