[PULL 17/19] test-write-threshold: drop extra tests

2021-05-14 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Testing set/get of one 64bit variable doesn't seem necessary. We have a lot of such variables. Also remaining tests do test set/get anyway. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20210506090621.11848-7-vsem

[PULL 16/19] block/write-threshold: drop extra APIs

2021-05-14 Thread Max Reitz
off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20210506090621.11848-5-vsement...@virtuozzo.com> Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi [mreitz: Adjusted commit message as per Eric's suggestion] Signed-off-by: Max Reitz --- include/block/write-threshold

[PULL 15/19] test-write-threshold: rewrite test_threshold_(not_)trigger tests

2021-05-14 Thread Max Reitz
->write_threshold_offset cleared or not (it's cleared iff threshold triggered). Also we get rid of BdrvTrackedRequest use here. Note, that paranoiac bdrv_check_request() calls were added in 8b1170012b1 to protect BdrvTrackedRequest. Drop them now. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Re

[PULL 09/19] qemu-iotests: fix case of SOCK_DIR already in the environment

2021-05-14 Thread Max Reitz
.476887-6-pbonz...@redhat.com> Signed-off-by: Max Reitz --- tests/qemu-iotests/testenv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/testenv.py b/tests/qemu-iotests/testenv.py index cd0e39b789..0c3fe75636 100644 --- a/tests/qemu-iotests/testenv.py +++

[PULL 14/19] block: drop write notifiers

2021-05-14 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy They are unused now. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20210506090621.11848-3-vsement...@virtuozzo.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Max Reitz --- include/block/block_int.

[PULL 12/19] qemu-iotests: fix pylint 2.8 consider-using-with error

2021-05-14 Thread Max Reitz
roduce a warning in pre-2.8 pylint versions] Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py| 65 tests/qemu-iotests/pylintrc | 3 ++ tests/qemu-iotests/testrunner.py | 22 +-- 3 files changed, 47 insertions(+), 43 deletions(-) diff --git a

[PULL 10/19] Document qemu-img options data_file and data_file_raw

2021-05-14 Thread Max Reitz
-by: Han Han Suggested-by: Max Reitz [ Max: provided description of data_file_raw behavior ] Signed-off-by: Connor Kuehl Message-Id: <20210505195512.391128-1-cku...@redhat.com> Signed-off-by: Max Reitz --- docs/tools/qemu-img.rst | 31 +++ 1 file changed, 31 inse

[PULL 03/19] monitor: hmp_qemu_io: acquire aio contex, fix crash

2021-05-14 Thread Max Reitz
we have iothread here. Next, note that AIO_WAIT_WHILE() documents that ctx must be acquired exactly once by caller. But where is it acquired in the call stack? Seems nowhere. qemuio_command do acquire aio context.. But we need context acquired around blk_unref() as well and actually around blk_

[PULL 07/19] qemu-iotests: move command line and environment handling from TestRunner to TestEnv

2021-05-14 Thread Max Reitz
: Vladimir Sementsov-Ogievskiy Signed-off-by: Paolo Bonzini Tested-by: Emanuele Giuseppe Esposito Message-Id: <20210323181928.311862-4-pbonz...@redhat.com> Message-Id: <20210503110110.476887-4-pbonz...@redhat.com> Signed-off-by: Max Reitz --- tests/qemu-iotests/testenv.py| 17 ++

[PULL 08/19] qemu-iotests: let "check" spawn an arbitrary test command

2021-05-14 Thread Max Reitz
m> Message-Id: <20210503110110.476887-5-pbonz...@redhat.com> Signed-off-by: Max Reitz --- tests/qemu-iotests/check | 19 ++- tests/qemu-iotests/testenv.py| 3 ++- tests/qemu-iotests/testrunner.py | 1 - 3 files changed, 20 insertions(+), 3 deletions(-) diff --gi

[PULL 13/19] block/write-threshold: don't use write notifiers

2021-05-14 Thread Max Reitz
-notifiers) So, create a new direct interface for bdrv_co_write_req_prepare() and drop all write-notifier related logic from write-threshold.c. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20210506090621.11848-2-vsement...@virtuozzo.com> Reviewed-by: Eric

[PULL 04/19] mirror: stop cancelling in-flight requests on non-force cancel in READY

2021-05-14 Thread Max Reitz
-by: Vladimir Sementsov-Ogievskiy Message-Id: <20210421075858.40197-1-vsement...@virtuozzo.com> Signed-off-by: Max Reitz --- include/block/block_int.h | 2 +- include/qemu/job.h| 2 +- block/backup.c| 2 +- block/mirror.c| 6 -- job.c | 2 +-

[PULL 01/19] iotests/231: Update expected deprecation message

2021-05-14 Thread Max Reitz
From: Connor Kuehl The deprecation message in the expected output has technically been wrong since the wrong version of a patch was applied to it. Because of this, the test fails. Correct the expected output so that it passes. Signed-off-by: Connor Kuehl Reviewed-by: Max Reitz Reviewed

[PULL 05/19] qemu-iotests: do not buffer the test output

2021-05-14 Thread Max Reitz
-Ogievskiy Tested-by: Emanuele Giuseppe Esposito Message-Id: <20210323181928.311862-2-pbonz...@redhat.com> Message-Id: <20210503110110.476887-2-pbonz...@redhat.com> Signed-off-by: Max Reitz --- tests/qemu-iotests/240.out| 8 ++-- tests/qemu-iotests/245.out| 8 ++-- tests/qemu

[PULL 02/19] block/rbd: Add an escape-aware strchr helper

2021-05-14 Thread Max Reitz
://bugzilla.redhat.com/1873913 Signed-off-by: Connor Kuehl Message-Id: <20210421212343.85524-3-cku...@redhat.com> Reviewed-by: Stefano Garzarella Signed-off-by: Max Reitz --- block/rbd.c| 32 +--- tests/qemu-iotests/231 | 4 tests/qemu-iotests/231.ou

[PULL 00/19] Block patches

2021-05-14 Thread Max Reitz
The following changes since commit 96662996eda78c48aa4e76d8615c7eb72d80: Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20210513a' into staging (2021-05-14 12:03:47 +0100) are available in the Git repository at: https://github.com/XanClic/qemu.git

[PULL 19/19] write-threshold: deal with includes

2021-05-14 Thread Max Reitz
-Ogievskiy Message-Id: <20210506090621.11848-9-vsement...@virtuozzo.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Max Reitz --- include/block/write-threshold.h | 2 +- block/write-threshold.c | 2 -- tests/unit/test-write-threshold.c | 1 - 3 files changed, 1 insertion(+), 4 de

[PULL 18/19] test-write-threshold: drop extra TestStruct structure

2021-05-14 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy We don't need this extra logic: it doesn't make code simpler. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20210506090621.11848-8-vsement...@virtuozzo.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Max Reitz ---

[PULL 11/19] block/copy-on-read: use bdrv_drop_filter() and drop s->active

2021-05-14 Thread Max Reitz
: <20210506194143.394141-1-vsement...@virtuozzo.com> Signed-off-by: Max Reitz --- block/copy-on-read.c | 33 + 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/block/copy-on-read.c b/block/copy-on-read.c index 9cad9e1b8c..c428682272 100644 --- a/block/copy-on-read.c

[PULL 06/19] qemu-iotests: allow passing unittest.main arguments to the test scripts

2021-05-14 Thread Max Reitz
age-Id: <20210323181928.311862-3-pbonz...@redhat.com> Message-Id: <20210503110110.476887-3-pbonz...@redhat.com> Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests/iotest

[PATCH v3 0/4] iotests/297: Cover tests/

2021-05-14 Thread Max Reitz
: Cover tests/' Max Reitz (4): iotests/297: Drop 169 and 199 from the skip list migrate-bitmaps-postcopy-test: Fix pylint warnings migrate-bitmaps-test: Fix pylint warnings iotests/297: Cover tests/ tests/qemu-iotests/297| 7 ++-- .../tests/migrate-bitmaps-postcopy

[PATCH v3 4/4] iotests/297: Cover tests/

2021-05-14 Thread Max Reitz
297 so far does not check the named tests, which reside in the tests/ directory (i.e. full path tests/qemu-iotests/tests). Fix it. Thanks to the previous two commits, all named tests pass its scrutiny, so we do not have to add anything to SKIP_FILES. Signed-off-by: Max Reitz Reviewed

[PATCH v3 3/4] migrate-bitmaps-test: Fix pylint warnings

2021-05-14 Thread Max Reitz
ays put two empty lines after a function - f'exec: cat > /dev/null' does not need to be an f-string Fix them. Signed-off-by: Max Reitz --- tests/qemu-iotests/tests/migrate-bitmaps-test | 41 +++ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/tests/qemu-iotes

[PATCH v3 1/4] iotests/297: Drop 169 and 199 from the skip list

2021-05-14 Thread Max Reitz
169 and 199 have been renamed and moved to tests/ (commit a44be0334be: "iotests: rename and move 169 and 199 tests"), so we can drop them from the skip list. Signed-off-by: Max Reitz Reviewed-by: Willian Rampazzo Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf

[PATCH v3 2/4] migrate-bitmaps-postcopy-test: Fix pylint warnings

2021-05-14 Thread Max Reitz
pylint complains that discards1_sha256 and all_discards_sha256 are first set in non-__init__ methods. These variables are not really class-variables anyway, so let them instead be returned by start_postcopy(), thus silencing pylint. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Max

Re: [PATCH v2 0/4] iotests/297: Cover tests/

2021-05-14 Thread Max Reitz
On 14.05.21 13:02, Max Reitz wrote: On 12.05.21 19:43, Max Reitz wrote: v1: https://lists.nongnu.org/archive/html/qemu-block/2021-03/msg01471.html Hi, When reviewing Vladimir’s new addition to tests/, I noticed that 297 so far does not cover named tests.  That isn’t so good. This series

Re: [PATCH v2] qemu-iotests: fix pylint 2.8 consider-using-with error

2021-05-14 Thread Max Reitz
On 12.05.21 19:04, Max Reitz wrote: On 10.05.21 21:04, Emanuele Giuseppe Esposito wrote: pylint 2.8 introduces consider-using-with error, suggesting to use the 'with' block statement when possible. Modify all subprocess.Popen call to use the 'with' statement, except the one in __init__

Re: [PATCH v2 0/4] iotests/297: Cover tests/

2021-05-14 Thread Max Reitz
On 12.05.21 19:43, Max Reitz wrote: v1: https://lists.nongnu.org/archive/html/qemu-block/2021-03/msg01471.html Hi, When reviewing Vladimir’s new addition to tests/, I noticed that 297 so far does not cover named tests. That isn’t so good. This series makes it cover them, and because tests

[PATCH v2 4/4] iotests/297: Cover tests/

2021-05-12 Thread Max Reitz
297 so far does not check the named tests, which reside in the tests/ directory (i.e. full path tests/qemu-iotests/tests). Fix it. Thanks to the previous two commits, all named tests pass its scrutiny, so we do not have to add anything to SKIP_FILES. Signed-off-by: Max Reitz Reviewed

[PATCH v2 2/4] migrate-bitmaps-postcopy-test: Fix pylint warnings

2021-05-12 Thread Max Reitz
pylint complains that discards1_sha256 and all_discards_sha256 are first set in non-__init__ methods. These variables are not really class-variables anyway, so let them instead be returned by start_postcopy(), thus silencing pylint. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Max

[PATCH v2 1/4] iotests/297: Drop 169 and 199 from the skip list

2021-05-12 Thread Max Reitz
169 and 199 have been renamed and moved to tests/ (commit a44be0334be: "iotests: rename and move 169 and 199 tests"), so we can drop them from the skip list. Signed-off-by: Max Reitz Reviewed-by: Willian Rampazzo Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf

[PATCH v2 3/4] migrate-bitmaps-test: Fix pylint warnings

2021-05-12 Thread Max Reitz
nes are too long (80 characters instead of 79) - inject_test_case()'s @name parameter shadows a top-level @name variable - "lambda self: mc(self)" is equivalent to just "mc" - Always put two empty lines after a function - f'exec: cat > /dev/null' does not need to be an f-string Fi

[PATCH v2 0/4] iotests/297: Cover tests/

2021-05-12 Thread Max Reitz
the skip list' 002/4:[0016] [FC] 'migrate-bitmaps-postcopy-test: Fix pylint warnings' 003/4:[] [--] 'migrate-bitmaps-test: Fix pylint warnings' 004/4:[] [--] 'iotests/297: Cover tests/' Max Reitz (4): iotests/297: Drop 169 and 199 from the skip list migrate-bitmaps-postcopy-test: Fix

Re: [PATCH 0/4] iotests/297: Cover tests/

2021-05-12 Thread Max Reitz
On 05.05.21 10:02, Vladimir Sementsov-Ogievskiy wrote: Hi! Kindly remind. Didn't you forget? I'm responsible for these two tests, let me know if you don't have time, and I'll resend this series :) Sorry, I forgot indeed... v2 coming right up. :) Max

Re: [PATCH v3 0/8] block: refactor write threshold

2021-05-12 Thread Max Reitz
On 06.05.21 11:06, Vladimir Sementsov-Ogievskiy wrote: Hi all! v3: 01-04,06,07: add Max's r-b. 01: improve commit msg and comments 03: improve commit msg 05: add more comments and qemu/atomic.h include 08: new, replacement for v2:08,09 Vladimir Sementsov-Ogievskiy (8):

Re: [PATCH v2] qemu-iotests: fix pylint 2.8 consider-using-with error

2021-05-12 Thread Max Reitz
On 10.05.21 21:04, Emanuele Giuseppe Esposito wrote: pylint 2.8 introduces consider-using-with error, suggesting to use the 'with' block statement when possible. Modify all subprocess.Popen call to use the 'with' statement, except the one in __init__ of QemuIoInteractive class, since it is

Re: [PATCH 2/7] block: use GDateTime for formatting timestamp when dumping snapshot info

2021-05-07 Thread Max Reitz
-off-by: Daniel P. Berrangé --- block/qapi.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH] block/copy-on-read: use bdrv_drop_filter() and drop s->active

2021-05-07 Thread Max Reitz
On 06.05.21 21:41, Vladimir Sementsov-Ogievskiy wrote: Now, after huge update of block graph permission update algorithm, we don't need this workaround with active state of the filter. Drop it and use new smart bdrv_drop_filter() function. Signed-off-by: Vladimir Sementsov-Ogievskiy ---

Re: [PATCH 3/4] block/vvfat: Fix leak of mapping_t::path

2021-05-07 Thread Max Reitz
vl.c:3551:5 #18 0x55d7a366f619 in main softmmu/main.c:49:5 Fixes: a046433a161 ("Major overhaul of the virtual FAT driver for read/write support") Signed-off-by: Philippe Mathieu-Daudé --- block/vvfat.c | 5 + 1 file changed, 5 insertions(+) First: Reviewed-by: Max Reitz Seco

Re: [PATCH] qemu-iotests: fix pylint 2.8 consider-using-with error

2021-05-07 Thread Max Reitz
On 06.05.21 10:48, Emanuele Giuseppe Esposito wrote: pylint 2.8 introduces consider-using-with error, suggesting to use the 'with' block statement when possible. http://pylint.pycqa.org/en/latest/whatsnew/2.8.html Modify all subprocess.Popen calls to use the 'with' statement, except one in

Re: [PATCH v3] Document qemu-img options data_file and data_file_raw

2021-05-07 Thread Max Reitz
/1763105 Signed-off-by: Han Han Suggested-by: Max Reitz [ Max: provided description of data_file_raw behavior ] Signed-off-by: Connor Kuehl Thanks, applied to my block branch: https://github.com/XanClic/qemu/commits/block Max

Re: [PATCH v2 9/9] block/write-threshold: drop extra includes

2021-05-06 Thread Max Reitz
On 05.05.21 22:34, Vladimir Sementsov-Ogievskiy wrote: 05.05.2021 19:23, Max Reitz wrote: On 04.05.21 10:25, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy ---   block/write-threshold.c | 3 ---   1 file changed, 3 deletions(-) diff --git a/block/write

Re: [PATCH v2 9/9] block/write-threshold: drop extra includes

2021-05-05 Thread Max Reitz
On 04.05.21 10:25, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/write-threshold.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/block/write-threshold.c b/block/write-threshold.c index fbf4e6f5c4..db271c5537 100644 ---

Re: [PATCH] block/snapshot: Clarify goto fallback behavior

2021-05-05 Thread Max Reitz
On 05.05.21 17:05, Vladimir Sementsov-Ogievskiy wrote: 03.05.2021 12:54, Max Reitz wrote: In the bdrv_snapshot_goto() fallback code, we work with a pointer to either bs->file or bs->backing. We close that child, Do we? We *detach it. close the node (with .bdrv_close()),

Re: [PATCH v2 8/9] test-write-threshold: drop extra includes

2021-05-05 Thread Max Reitz
On 04.05.21 10:25, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/unit/test-write-threshold.c | 2 -- 1 file changed, 2 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v2 7/9] test-write-threshold: drop extra TestStruct structure

2021-05-05 Thread Max Reitz
-by: Max Reitz

Re: [PATCH v2 6/9] test-write-threshold: drop extra tests

2021-05-05 Thread Max Reitz
--- 1 file changed, 43 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v2 5/9] block/write-threshold: don't use aio context lock

2021-05-05 Thread Max Reitz
dimir Sementsov-Ogievskiy --- block/write-threshold.c | 32 +--- 1 file changed, 17 insertions(+), 15 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v2 4/9] block/write-threshold: drop extra APIs

2021-05-05 Thread Max Reitz
elp of bdrv_write_threshold_get()) Well, depends on how one sees it. One could also say that it neatly hides the fact that a threshold of 0 means disabled (i.e. the overloaded meaning of the write_threshold_offset attribute). *shrug* Reviewed-by: Max Reitz Signed-off-by: Vladimir Sementsov-Ogievs

Re: [PATCH v2 1/9] block/write-threshold: don't use write notifiers

2021-05-05 Thread Max Reitz
On 05.05.21 15:35, Vladimir Sementsov-Ogievskiy wrote: 05.05.2021 15:37, Max Reitz wrote: write-notifiers are used only for write-threshold. New code for such purpose should create filters. Let's better special-case write-threshold and drop write notifiers at all. (Actually, write-threshold

Re: [PATCH v2 3/9] test-write-threshold: rewrite test_threshold_(not_)trigger tests

2021-05-05 Thread Max Reitz
son for bdrv_check_request() disappears. OK. Reviewed-by: Max Reitz Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/unit/test-write-threshold.c | 22 -- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/tests/unit/test-write-threshold.c b/tests/unit/test-wr

Re: [PATCH v2 2/9] block: drop write notifiers

2021-05-05 Thread Max Reitz
-by: Max Reitz

Re: [PATCH v2 1/9] block/write-threshold: don't use write notifiers

2021-05-05 Thread Max Reitz
ses (one for offset > wtr, one for end > wtr). Perhaps overflow considerations? Shouldn’t matter though. +bdrv_write_threshold_set(bs, 0); I’d keep the comment from before_write_notify() here (i.e. “autodisable to avoid flooding the monitor”). But other than that, I have no com

Re: [PATCH v2] Document qemu-img options data_file and data_file_raw

2021-05-04 Thread Max Reitz
On 04.05.21 01:15, Connor Kuehl wrote: On 4/30/21 9:45 AM, Max Reitz wrote: + ``data_file_raw`` +If this option is set to ``on``, QEMU will always keep the external +data file consistent as a standalone read-only raw image. It does +this by forwarding updates through to the raw

Re: [PATCH v3 14/15] qemu_iotests: add option to show qemu binary logs on stdout

2021-05-03 Thread Max Reitz
On 30.04.21 23:04, Emanuele Giuseppe Esposito wrote: On 30/04/2021 15:50, Max Reitz wrote: On 14.04.21 19:03, Emanuele Giuseppe Esposito wrote: Using the flag -p, allow the qemu binary to print to stdout. This helps especially when doing print-debugging. I think this shouldn’t refer

Re: [PATCH v3 05/15] qemu-iotests: delay QMP socket timers

2021-05-03 Thread Max Reitz
On 30.04.21 23:03, Emanuele Giuseppe Esposito wrote: On 30/04/2021 13:59, Max Reitz wrote: On 14.04.21 19:03, Emanuele Giuseppe Esposito wrote: Attaching a gdbserver implies that the qmp socket should wait indefinitely for an answer from QEMU. Signed-off-by: Emanuele Giuseppe Esposito

Re: [PATCH v3 04/15] qemu-iotests: add option to attach gdbserver

2021-05-03 Thread Max Reitz
On 30.04.21 23:03, Emanuele Giuseppe Esposito wrote: On 30/04/2021 13:38, Max Reitz wrote: On 14.04.21 19:03, Emanuele Giuseppe Esposito wrote: Add -gdb flag and GDB_QEMU environmental variable to python tests to attach a gdbserver to each qemu instance. Well, this patch doesn’t do

Re: [PATCH 1/2] block: Fix Transaction leak in bdrv_root_attach_child()

2021-05-03 Thread Max Reitz
On 03.05.21 13:51, Vladimir Sementsov-Ogievskiy wrote: 03.05.2021 14:49, Max Reitz wrote: On 03.05.21 13:05, Kevin Wolf wrote: The error path needs to call tran_finalize(), too. Fixes: CID 1452773 Fixes: 548a74c0dbc858edd1a7ee3045b5f2fe710bd8b1 Signed-off-by: Kevin Wolf ---   block.c | 7

Re: [PATCH 1/2] block: Fix Transaction leak in bdrv_root_attach_child()

2021-05-03 Thread Max Reitz
so: Reviewed-by: Max Reitz However, the function’s description says that it will return NULL on error. But if bdrv_refresh_perms() fails, it will still return a non-NULL child. Is that right?

[PATCH] block/snapshot: Clarify goto fallback behavior

2021-05-03 Thread Max Reitz
All of this is not immediately clear from a quick glance at the code, so add a comment to the assertion what it is for, and why it is valid. It certainly confused Coverity. Reported-by: Coverity (CID 1452774) Signed-off-by: Max Reitz --- block/snapshot.c | 14 +- 1 file changed, 13 in

Re: [PULL 37/64] block/snapshot: Fix fallback

2021-05-03 Thread Max Reitz
On 03.05.21 11:40, Kevin Wolf wrote: Am 01.05.2021 um 00:30 hat Peter Maydell geschrieben: On Mon, 7 Sept 2020 at 12:11, Kevin Wolf wrote: From: Max Reitz If the top node's driver does not provide snapshot functionality and we want to fall back to a node down the chain, we need to snapshot

Re: [PATCH v2] Document qemu-img options data_file and data_file_raw

2021-04-30 Thread Max Reitz
On 30.04.21 15:34, Connor Kuehl wrote: The contents of this patch were initially developed and posted by Han Han[1], however, it appears the original patch was not applied. Since then, the relevant documentation has been moved and adapted to a new format. I've taken most of the original wording

Re: [PATCH v3 15/15] docs/devel/testing: add -p option to the debug section of QEMU iotests

2021-04-30 Thread Max Reitz
On 14.04.21 19:03, Emanuele Giuseppe Esposito wrote: Signed-off-by: Emanuele Giuseppe Esposito --- docs/devel/testing.rst | 4 1 file changed, 4 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 62902cfd2d..0c18fc4571 100644 --- a/docs/devel/testing.rst

Re: [PATCH v3 14/15] qemu_iotests: add option to show qemu binary logs on stdout

2021-04-30 Thread Max Reitz
UTPUT" would mean more? Well, it’s all bike-shedding, so with “is not None” and the add_argument line broken so it doesn’t exceed 79 characters: Reviewed-by: Max Reitz """ args = collections.defaultdict(str, self.get_env())

Re: [PATCH v3 13/15] docs/devel/testing: add -valgrind option to the debug section of QEMU iotests

2021-04-30 Thread Max Reitz
Not a native speaker, but I think it should be “attaches ... to QEMU”, “wraps QEMU in a valgrind instances”, or “wraps ... around QEMU". Apart from that: Reviewed-by: Max Reitz + warnings, it will print and save the log in + ``$TEST_DIR/.valgrind``. + The final command line will be ``valgrind

Re: [PATCH v3 06/15] qemu_iotests: insert gdbserver command line as wrapper for qemu binary

2021-04-30 Thread Max Reitz
On 14.04.21 19:03, Emanuele Giuseppe Esposito wrote: Signed-off-by: Emanuele Giuseppe Esposito --- tests/qemu-iotests/iotests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Max Reitz

Re: [PATCH v3 12/15] qemu_iotests: insert valgrind command line as wrapper for qemu binary

2021-04-30 Thread Max Reitz
changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Max Reitz

Re: [PATCH v3 11/15] qemu_iotests: allow valgrind to read/delete the generated log file

2021-04-30 Thread Max Reitz
On 14.04.21 19:03, Emanuele Giuseppe Esposito wrote: When using -valgrind on the script tests, it generates a log file in $TEST_DIR that is either read (if valgrind finds problems) or otherwise deleted. Provide the same exact behavior when using -valgrind on the python tests. Signed-off-by:

Re: [PATCH v3 10/15] qemu_iotests: extent QMP socket timeout when using valgrind

2021-04-30 Thread Max Reitz
On 14.04.21 19:03, Emanuele Giuseppe Esposito wrote: As with gdbserver, valgrind delays the test execution, so the default QMP socket timeout timeout too soon. I’m curious: The default timeouts should be long enough for slow systems, too, though (e.g. heavily-loaded CI systems). I would

Re: [PATCH v3 05/15] qemu-iotests: delay QMP socket timers

2021-04-30 Thread Max Reitz
On 14.04.21 19:03, Emanuele Giuseppe Esposito wrote: Attaching a gdbserver implies that the qmp socket should wait indefinitely for an answer from QEMU. Signed-off-by: Emanuele Giuseppe Esposito --- python/qemu/machine.py| 3 +++ tests/qemu-iotests/iotests.py | 10 +- 2

Re: [PATCH v3 09/15] qemu_iotests: extend the check script to support valgrind for python tests

2021-04-30 Thread Max Reitz
gram, whether they include spaces or not. OTOH, GDB_QEMU is a list of options, so spaces act as separators, and VALGRIND_QEMU is just y or not set, so it’s impossible for spaces to be in there. (Also, I think the “--” should be aligned to all the other “--”s.) Bikeshedding, though, so: Reviewed-by: Max Reitz """ args = collections.defaultdict(str, self.get_env())

Re: [PATCH v3 08/15] docs/devel/testing: add -gdb option to the debugging section of QEMU iotests

2021-04-30 Thread Max Reitz
On 14.04.21 19:03, Emanuele Giuseppe Esposito wrote: Signed-off-by: Emanuele Giuseppe Esposito --- docs/devel/testing.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index b7e2370e7e..2ee77a057b 100644 ---

Re: [PATCH v3 07/15] qemu-iotests: add gdbserver option to script tests too

2021-04-30 Thread Max Reitz
On 14.04.21 19:03, Emanuele Giuseppe Esposito wrote: The only limitation here is that running a script with gdbserver will make the test output mismatch with the expected results, making the test fail. Signed-off-by: Emanuele Giuseppe Esposito --- tests/qemu-iotests/common.rc | 8 +++-

Re: [PATCH v3 04/15] qemu-iotests: add option to attach gdbserver

2021-04-30 Thread Max Reitz
On 14.04.21 19:03, Emanuele Giuseppe Esposito wrote: Add -gdb flag and GDB_QEMU environmental variable to python tests to attach a gdbserver to each qemu instance. if -gdb is not provided but $GDB_QEMU is set, ignore the environmental variable. Signed-off-by: Emanuele Giuseppe Esposito ---

Re: [PATCH v3 04/15] qemu-iotests: add option to attach gdbserver

2021-04-30 Thread Max Reitz
On 14.04.21 19:03, Emanuele Giuseppe Esposito wrote: Add -gdb flag and GDB_QEMU environmental variable to python tests to attach a gdbserver to each qemu instance. Well, this patch doesn’t do this, but OK. Out of interest: Why gdbserver and not “just” gdb? On Fedora, those are separate

Re: [PATCH v3 03/15] docs/devel/testing: add debug section to the QEMU iotests chapter

2021-04-30 Thread Max Reitz
On 14.04.21 19:03, Emanuele Giuseppe Esposito wrote: Introduce the "Debugging a test case" section, in preparation to the additional flags that will be added in the next patches. Signed-off-by: Emanuele Giuseppe Esposito --- docs/devel/testing.rst | 8 1 file changed, 8

Re: [PATCH v3 02/15] python: qemu: pass the wrapper field from QEMUQtestmachine to QEMUMachine

2021-04-30 Thread Max Reitz
testProtocol] = None Reviewed-by: Max Reitz

Re: [PATCH v3 01/15] python: qemu: add timer parameter for qmp.accept socket

2021-04-30 Thread Max Reitz
(+), 1 deletion(-) Reviewed-by: Max Reitz (I would have preferred for the commit message to tell me why we want this (I suspect some later patch is going to use it), but oh well.)

Re: [PATCH] mirror: stop cancelling in-flight requests on non-force cancel in READY

2021-04-30 Thread Max Reitz
On 21.04.21 09:58, Vladimir Sementsov-Ogievskiy wrote: If mirror is READY than cancel operation is not discarding the whole result of the operation, but instead it's a documented way get a point-in-time snapshot of source disk. So, we should not cancel any requests if mirror is READ and

Re: [PATCH] block: simplify write-threshold and drop write notifiers

2021-04-30 Thread Max Reitz
On 22.04.21 00:09, Vladimir Sementsov-Ogievskiy wrote: write-notifiers are used only for write-threshold. New code for such purpose should create filters. Let's handle write-threshold simply in generic code and drop write notifiers at all. Also move part of write-threshold API that is used

Re: [PATCH v2] monitor: hmp_qemu_io: acquire aio contex, fix crash

2021-04-30 Thread Max Reitz
ound blk_unref() as well and actually around blk_insert_bs() too. Let's refactor qemuio_command so that it doesn't acquire aio context but callers do that instead. This way we can cleanly acquire aio context in hmp_qemu_io() around all three calls. Reported-by: Max Reitz Signed-off-by: Vladimir Sem

Re: [PATCH 1/2] block/export: Free ignored Error

2021-04-26 Thread Max Reitz
On 26.04.21 11:44, Vladimir Sementsov-Ogievskiy wrote: 22.04.2021 17:53, Max Reitz wrote: When invoking block-export-add with some iothread and fixed-iothread=false, and changing the node's iothread fails, the error is supposed to be ignored. However, it is still stored in *errp, which

[PATCH 2/2] iotests/307: Test iothread conflict for exports

2021-04-22 Thread Max Reitz
. Signed-off-by: Max Reitz --- tests/qemu-iotests/307 | 15 +++ tests/qemu-iotests/307.out | 8 2 files changed, 23 insertions(+) diff --git a/tests/qemu-iotests/307 b/tests/qemu-iotests/307 index c7685347bc..b429b5aa50 100755 --- a/tests/qemu-iotests/307 +++ b/tests

[PATCH 0/2] block/export: Fix crash on error after iothread conflict

2021-04-22 Thread Max Reitz
the error, we have to free it and clear *errp (with an ERRP_GUARD()). Patch 1 is the fix, patch 2 a regression test. Max Reitz (2): block/export: Free ignored Error iotests/307: Test iothread conflict for exports block/export/export.c | 4 tests/qemu-iotests/307 | 15

[PATCH 1/2] block/export: Free ignored Error

2021-04-22 Thread Max Reitz
tv() fails: qemu-system-x86_64: ../util/error.c:59: error_setv: Assertion `*errp == NULL' failed. So the error from bdrv_try_set_aio_context() must be freed when it is ignored. Fixes: f51d23c80af73c95e0ce703ad06a300f1b3d63ef ("block/export: add iothread and fixed-iothread options"

Re: [PATCH] monitor: hmp_qemu_io: acquire aio contex, fix crash

2021-04-22 Thread Max Reitz
oes not own the mutex. So, thread doesn't own the mutex. And we have iothread here. Next, note that AIO_WAIT_WHILE() documents that ctx must be acquired exactly once by caller. But where is it acquired in the call stack? Seems nowhere. qemuio_command do acquire aio context.. But we need context acquired ar

Re: [PATCH v4 0/2] Fix segfault in qemu_rbd_parse_filename

2021-04-22 Thread Max Reitz
On 21.04.21 23:23, Connor Kuehl wrote: Connor Kuehl (2): iotests/231: Update expected deprecation message block/rbd: Add an escape-aware strchr helper block/rbd.c| 32 +--- tests/qemu-iotests/231 | 4 tests/qemu-iotests/231.out |

Re: about mirror cancel

2021-04-16 Thread Max Reitz
On 16.04.21 09:05, Max Reitz wrote: On 15.04.21 20:46, Vladimir Sementsov-Ogievskiy wrote: [...] Note, that if cancelling all in-flight requests on target is wrong on mirror cancel, we still don't have real bug, as the only implementation of .bdrv_cancel_in_flight is stopping reconnect

Re: about mirror cancel

2021-04-16 Thread Max Reitz
On 15.04.21 20:46, Vladimir Sementsov-Ogievskiy wrote: Hi all! Recently I've implemented fast-cancelling of mirror job: do bdrv_cancel_in_flight() in mirror_cancel(). Now I'm in doubt: is it a correct thing? I heard, that mirror-cancel is a kind of valid mirror completion.. Looking at

[PULL 1/1] block/nbd: fix possible use after free of s->connect_thread

2021-04-13 Thread Max Reitz
reconnect mess will come soon. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20210406155114.1057355-1-vsement...@virtuozzo.com> Reviewed-by: Roman Kagan Signed-off-by: Max Reitz --- block/nbd.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/block/nbd.c b/block

[PULL 0/1] Block patch for 6.0-rc3

2021-04-13 Thread Max Reitz
The following changes since commit dce628a97fde2594f99d738883a157f05aa0a14f: Merge remote-tracking branch 'remotes/dg-gitlab/tags/ppc-for-6.0-20210412' into staging (2021-04-13 13:05:07 +0100) are available in the Git repository at: https://github.com/XanClic/qemu.git

Re: [PATCH for-6.0] block/nbd: fix possible use after free of s->connect_thread

2021-04-13 Thread Max Reitz
On 13.04.21 14:19, Vladimir Sementsov-Ogievskiy wrote: 13.04.2021 14:53, Max Reitz wrote: On 06.04.21 17:51, Vladimir Sementsov-Ogievskiy wrote: If on nbd_close() we detach the thread (in nbd_co_establish_connection_cancel() thr->state becomes CONNECT_THREAD_RUNNING_DETACHED), after that po

Re: [PATCH for-6.0] block/nbd: fix possible use after free of s->connect_thread

2021-04-13 Thread Max Reitz
On 06.04.21 17:51, Vladimir Sementsov-Ogievskiy wrote: If on nbd_close() we detach the thread (in nbd_co_establish_connection_cancel() thr->state becomes CONNECT_THREAD_RUNNING_DETACHED), after that point we should not use s->connect_thread (which is set to NULL), as running thread may free it

Re: [PATCH v2 2/2] block/rbd: Add an escape-aware strchr helper

2021-04-09 Thread Max Reitz
On 09.04.21 16:05, Connor Kuehl wrote: On 4/6/21 9:24 AM, Max Reitz wrote: On 01.04.21 23:01, Connor Kuehl wrote: [..] diff --git a/block/rbd.c b/block/rbd.c index 9071a00e3f..c0e4d4a952 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -134,6 +134,22 @@ static char *qemu_rbd_next_tok(char *src

Re: [PATCH v2 3/3] iotests/041: block-job-complete on user-paused job

2021-04-09 Thread Max Reitz
On 09.04.21 15:29, Max Reitz wrote: Expand test_pause() to check what happens when issuing block-job-complete on a job that is on STANDBY because it has been paused by the user. (This should be an error, and in particular not hang job_wait_unpaused().) Signed-off-by: Max Reitz --- tests

[PATCH v2 2/3] test-blockjob: Test job_wait_unpaused()

2021-04-09 Thread Max Reitz
Create a job that remains on STANDBY after a drained section, and see that invoking job_wait_unpaused() will get it unstuck. Signed-off-by: Max Reitz --- tests/unit/test-blockjob.c | 140 + 1 file changed, 140 insertions(+) diff --git a/tests/unit/test

[PATCH v2 1/3] job: Add job_wait_unpaused() for block-job-complete

2021-04-09 Thread Max Reitz
an error when job->pause_point > 0. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1945635 Signed-off-by: Max Reitz --- include/qemu/job.h | 15 + blockdev.c | 3 +++ job.c | 53 ++ 3 files changed, 71 inse

[PATCH v2 4/3] iotests: Test completion immediately after drain

2021-04-09 Thread Max Reitz
Test what happens when you have multiple busy block jobs, drain all (via an empty transaction), and immediately issue a block-job-complete on one of the jobs. Sometimes it will still be in STANDBY, in which case block-job-complete used to fail. It should not. Signed-off-by: Max Reitz

[PATCH v2 3/3] iotests/041: block-job-complete on user-paused job

2021-04-09 Thread Max Reitz
Expand test_pause() to check what happens when issuing block-job-complete on a job that is on STANDBY because it has been paused by the user. (This should be an error, and in particular not hang job_wait_unpaused().) Signed-off-by: Max Reitz --- tests/qemu-iotests/041 | 13 - 1

[PATCH v2 0/3] job: Add job_wait_unpaused() for block-job-complete

2021-04-09 Thread Max Reitz
'job: Add job_wait_unpaused() for block-job-complete' 002/4:[] [--] 'test-blockjob: Test job_wait_unpaused()' 003/4:[] [--] 'iotests/041: block-job-complete on user-paused job' 004/4:[down] 'iotests: Test completion immediately after drain' Max Reitz (4): job: Add job_wait_unpaused() for

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