Re: [PATCH v3 1/5] python/utils: add add_visual_margin() text decoration utility

2022-03-17 Thread Hanna Reitz
On 08.03.22 02:57, John Snow wrote: print(add_visual_margin(msg, width=72, name="Commit Message")) ┏━ Commit Message ━━ ┃ add_visual_margin() takes a chunk of text and wraps it in a visual ┃ container that force-wraps to a specified width. An

Re: [PATCH v3 3/5] iotests: Remove explicit checks for qemu_img() == 0

2022-03-17 Thread Hanna Reitz
On 08.03.22 02:57, John Snow wrote: qemu_img() returning zero ought to be the rule, not the exception. Remove all explicit checks against the condition in preparation for making non-zero returns an Exception. Signed-off-by: John Snow --- tests/qemu-iotests/163 |

Re: [PATCH v3 5/5] iotests: fortify compare_images() against crashes

2022-03-17 Thread Hanna Reitz
On 08.03.22 02:57, John Snow wrote: Fortify compare_images() to be more discerning about the status codes it receives. If qemu_img() returns an exit code that implies it didn't actually perform the comparison, treat that as an exceptional circumstance and force the caller to be aware of the

Re: [PATCH 03/14] iotests: add qemu_img_info()

2022-03-17 Thread Hanna Reitz
On 09.03.22 04:53, John Snow wrote: Add qemu_img_info() by analogy with qemu_img_measure() and qemu_img_check(). Modify image_size() to use this function instead to take advantage of the better diagnostic information on failure provided (ultimately) by qemu_img(). Signed-off-by: John Snow ---

Re: [PATCH 04/14] iotests/remove-bitmap-from-backing: use qemu_img_info()

2022-03-17 Thread Hanna Reitz
On 09.03.22 04:53, John Snow wrote: This removes two more usages of qemu_img_pipe() and replaces them with calls to qemu_img(), which provides better diagnostic information on failure. Signed-off-by: John Snow --- tests/qemu-iotests/tests/remove-bitmap-from-backing | 6 +++--- 1 file

Re: [PATCH v3 4/5] iotests: make qemu_img raise on non-zero rc by default

2022-03-17 Thread Hanna Reitz
On 08.03.22 02:57, John Snow wrote: re-write qemu_img() as a function that will by default raise a VerboseProcessException (extended from CalledProcessException) on non-zero return codes. This will produce a stack trace that will show the command line arguments and return code from the failed

Re: [PATCH v3 4/5] iotests: make qemu_img raise on non-zero rc by default

2022-03-17 Thread Hanna Reitz
On 17.03.22 11:25, Hanna Reitz wrote: On 08.03.22 02:57, John Snow wrote: re-write qemu_img() as a function that will by default raise a VerboseProcessException (extended from CalledProcessException) on non-zero return codes. This will produce a stack trace that will show the command line

Re: [PATCH 01/14] iotests: add qemu_img_json()

2022-03-17 Thread Hanna Reitz
On 09.03.22 04:53, John Snow wrote: qemu_img_json() is a new helper built on top of qemu_img() that tries to pull a valid JSON document out of the stdout stream. In the event that the return code is negative (the program crashed), or the code is greater than zero and did not produce valid JSON

Re: [PATCH 02/14] iotests: use qemu_img_json() when applicable

2022-03-17 Thread Hanna Reitz
On 09.03.22 04:53, John Snow wrote: qemu_img_json() gives better diagnostic information on failure. Signed-off-by: John Snow --- tests/qemu-iotests/iotests.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Hanna Reitz

Re: [PATCH 09/14] iotests: remove remaining calls to qemu_img_pipe()

2022-03-17 Thread Hanna Reitz
On 09.03.22 04:54, John Snow wrote: As part of moving all python iotest invocations of qemu-img onto a single qemu_img() implementation, remove a few lingering uses of qemu_img_pipe() from outside of iotests.py itself. Several cases here rely on the knowledge that qemu_img_pipe() suppresses

Re: [PATCH experiment 00/16] C++20 coroutine backend

2022-03-17 Thread Daniel P . Berrangé
On Wed, Mar 16, 2022 at 12:08:33AM +0100, Paolo Bonzini wrote: > On 3/15/22 16:55, Daniel P. Berrangé wrote: > > Expecting maintainers to enforce a subset during code review feels > > like it would be a tedious burden, that will inevitably let stuff > > through because humans are fallible,

Re: [PATCH 10/14] iotests: use qemu_img() in has_working_luks()

2022-03-17 Thread Hanna Reitz
On 09.03.22 04:54, John Snow wrote: Admittedly a mostly lateral move, but qemu_img() is essentially the replacement for qemu_img_pipe_and_status(). It will give slightly better diagnostics on crash. Signed-off-by: John Snow --- tests/qemu-iotests/iotests.py | 18 +- 1 file

Re: [PATCH v3 1/3] docs: Consistent typography for options of qemu-nbd

2022-03-17 Thread Daniel P . Berrangé
On Mon, Mar 14, 2022 at 03:38:16PM -0500, Eric Blake wrote: > Prefer the :option:`--name` form when cross-referencing other options > from the qemu-nbd documentation. > > Signed-off-by: Eric Blake > --- > docs/tools/qemu-nbd.rst | 12 ++-- > 1 file changed, 6 insertions(+), 6

Re: [PATCH v2] MAINTAINERS: change Vladimir's email address

2022-03-17 Thread Vladimir Sementsov-Ogievskiy
17.03.2022 00:36, Eric Blake wrote: On Wed, Mar 16, 2022 at 12:27:02PM +0300, Vladimir Sementsov-Ogievskiy wrote: Old vsement...@virtuozzo.com is not accessible anymore. Signed-off-by: Vladimir Sementsov-Ogievskiy --- v2: @ya.ru mailbox works bad with mailing lists and git send-email

Re: [PATCH v3 2/5] python/utils: add VerboseProcessError

2022-03-17 Thread Hanna Reitz
On 08.03.22 02:57, John Snow wrote: This adds an Exception that extends the Python stdlib subprocess.CalledProcessError. The difference is that the str() method of this exception also adds the stdout/stderr logs. In effect, if this exception goes unhandled, Python will print the output in a

Re: [PATCH v2 1/6] block: Support passing NULL ops to blk_set_dev_ops()

2022-03-17 Thread Kevin Wolf
Am 16.03.2022 um 13:18 hat Stefan Hajnoczi geschrieben: > On Tue, Mar 15, 2022 at 03:30:22PM -0400, John Snow wrote: > > On Tue, Mar 15, 2022 at 4:47 AM Stefan Hajnoczi wrote: > > > > > > On Mon, Mar 14, 2022 at 03:09:35PM -0400, John Snow wrote: > > > > On Mon, Mar 14, 2022 at 1:23 PM Stefan

Re: [PATCH 01/14] iotests: add qemu_img_json()

2022-03-17 Thread Hanna Reitz
On 17.03.22 15:42, John Snow wrote: On Thu, Mar 17, 2022, 6:53 AM Hanna Reitz wrote: On 09.03.22 04:53, John Snow wrote: > qemu_img_json() is a new helper built on top of qemu_img() that tries to > pull a valid JSON document out of the stdout stream. > > In the event

Re: [PATCH 11/14] iotests: replace qemu_img_log('create', ...) calls

2022-03-17 Thread Hanna Reitz
On 09.03.22 04:54, John Snow wrote: qemu_img_log() calls into qemu_img_pipe(), which always removes output for 'create' commands on success anyway. Replace all of these calls to the simpler qemu_img_create(...) which doesn't log, but raises a detailed exception object on failure instead. Blank

Re: [PATCH 13/14] iotests: make qemu_img_log() check log level

2022-03-17 Thread Hanna Reitz
On 09.03.22 04:54, John Snow wrote: Improve qemu_img_log() to actually check if logging is turned on. If it isn't, revert to the behavior of qemu_img(). This is done so that there really is no way to avoid scrutinizing qemu-ing subprocess calls by accident. Signed-off-by: John Snow ---

Re: [PATCH 01/14] iotests: add qemu_img_json()

2022-03-17 Thread John Snow
On Thu, Mar 17, 2022, 6:53 AM Hanna Reitz wrote: > On 09.03.22 04:53, John Snow wrote: > > qemu_img_json() is a new helper built on top of qemu_img() that tries to > > pull a valid JSON document out of the stdout stream. > > > > In the event that the return code is negative (the program

Re: [PATCH 03/14] iotests: add qemu_img_info()

2022-03-17 Thread John Snow
On Thu, Mar 17, 2022, 7:09 AM Hanna Reitz wrote: > On 09.03.22 04:53, John Snow wrote: > > Add qemu_img_info() by analogy with qemu_img_measure() and > > qemu_img_check(). Modify image_size() to use this function instead to > > take advantage of the better diagnostic information on failure

Re: [PATCH experiment 00/16] C++20 coroutine backend

2022-03-17 Thread Paolo Bonzini
On 3/16/22 13:32, Stefan Hajnoczi wrote: You can define rules and a way to enforce a subset of C++, but I think over time the code will be C++. A policy that is complicated discourages contributors. For these reasons I think that if code runs through a C++ compiler we should just allow C++.

Re: [PATCH 12/14] iotests: remove qemu_img_pipe_and_status()

2022-03-17 Thread Hanna Reitz
On 09.03.22 04:54, John Snow wrote: With the exceptional 'create' calls removed in the prior commit, change qemu_img_log() and img_info_log() to call qemu_img() directly instead. In keeping with the spirit of diff-based tests, allow these calls to qemu_img() to return an unchecked non-zero

Re: [PATCH 14/14] iotests: make img_info_log() call qemu_img_log()

2022-03-17 Thread Hanna Reitz
On 09.03.22 04:54, John Snow wrote: Add configurable filters to qemu_img_log(), and re-write img_info_log() to call into qemu_img_log() with a custom filter instead. After this patch, every last call to qemu_img() is now guaranteed to either have its return code checked for zero, OR have its

Re: [PATCH v3 4/5] iotests: make qemu_img raise on non-zero rc by default

2022-03-17 Thread John Snow
On Thu, Mar 17, 2022, 6:41 AM Hanna Reitz wrote: > On 17.03.22 11:25, Hanna Reitz wrote: > > On 08.03.22 02:57, John Snow wrote: > >> re-write qemu_img() as a function that will by default raise a > >> VerboseProcessException (extended from CalledProcessException) on > >> non-zero return codes.

Re: [PATCH v3 2/5] python/utils: add VerboseProcessError

2022-03-17 Thread John Snow
On Thu, Mar 17, 2022 at 5:23 AM Hanna Reitz wrote: > > On 08.03.22 02:57, John Snow wrote: > > This adds an Exception that extends the Python stdlib > > subprocess.CalledProcessError. > > > > The difference is that the str() method of this exception also adds the > > stdout/stderr logs. In

Re: [PATCH v3 4/5] iotests: make qemu_img raise on non-zero rc by default

2022-03-17 Thread John Snow
On Thu, Mar 17, 2022 at 6:25 AM Hanna Reitz wrote: > > On 08.03.22 02:57, John Snow wrote: > > +if check and subp.returncode or (subp.returncode < 0): > > I wouldn’t expect these parentheses here in any other language, are they > required in Python? > It's not required, I just find it

Re: [PATCH 01/14] iotests: add qemu_img_json()

2022-03-17 Thread John Snow
On Thu, Mar 17, 2022 at 10:51 AM Hanna Reitz wrote: > I hope similarly to how א‎₀ and its companions exist[1], there are also > multiple instances of `...`, so one can succeed at handling cases where > a `...` is a valid return type. I suggest just more dots. lol. I'm invested in

Re: [PATCH experiment 00/16] C++20 coroutine backend

2022-03-17 Thread Hanna Reitz
On 17.03.22 16:11, Paolo Bonzini wrote: On 3/16/22 13:32, Stefan Hajnoczi wrote: You can define rules and a way to enforce a subset of C++, but I think over time the code will be C++. A policy that is complicated discourages contributors. For these reasons I think that if code runs through a

Re: [PATCH 05/14] iotests: add qemu_img_map() function

2022-03-17 Thread Hanna Reitz
On 09.03.22 04:53, John Snow wrote: Add a qemu_img_map() function by analogy with qemu_img_measure(), qemu_img_check(), and qemu_img_info() that all return JSON information. Replace calls to qemu_img_pipe('map', '--output=json', ...) with this new function, which provides better diagnostic

Re: [PATCH 06/14] iotests: change supports_quorum to use qemu_img

2022-03-17 Thread Hanna Reitz
On 09.03.22 04:53, John Snow wrote: Similar to other recent changes: use the qemu_img() invocation that supports throwing loud, nasty exceptions when it fails for surprising reasons. (Why would "--help" ever fail? I don't know, but eliminating *all* calls to qemu-img that do not go through

Re: [PATCH 07/14] iotests: replace unchecked calls to qemu_img_pipe()

2022-03-17 Thread Hanna Reitz
On 09.03.22 04:54, John Snow wrote: qemu_img_pipe() discards the return code from qemu-img in favor of returning just its output. Some tests using this function don't save, log, or check the output either, though, which is unsafe. Replace all of these calls with a checked version. Tests

Re: [PATCH 10/27] Replace config-time define HOST_WORDS_BIGENDIAN

2022-03-17 Thread Cédric Le Goater
On 3/16/22 10:53, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Replace a config-time define with a compile time condition define (compatible with clang and gcc) that must be declared prior to its usage. This avoids having a global configure time define, but also prevents from bad

Re: [PATCH 08/14] iotests/149: Remove qemu_img_pipe() call

2022-03-17 Thread Hanna Reitz
On 09.03.22 04:54, John Snow wrote: qemu_img_pipe calls blank their output when the command being run is a 'create' call and the command succeeds. Thus, the normative output for this command in iotest 149 is to print a blank line. We can remove the logging from this invocation and use a checked

Re: [PATCH experiment 00/16] C++20 coroutine backend

2022-03-17 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > On 3/15/22 16:55, Daniel P. Berrangé wrote: > > Expecting maintainers to enforce a subset during code review feels > > like it would be a tedious burden, that will inevitably let stuff > > through because humans are fallible, especially when presented

Re: [PATCH-for-7.0 v2] block-qdict: Fix -Werror=maybe-uninitialized build failure

2022-03-17 Thread Philippe Mathieu-Daudé via
On Wed, Mar 16, 2022 at 3:52 PM Markus Armbruster wrote: > > Murilo Opsfelder Araújo writes: > > > Hi, Philippe. > > > > On Monday, March 14, 2022 10:47:11 AM -03 Philippe Mathieu-Daudé wrote: > >> On 11/3/22 23:16, Murilo Opsfelder Araujo wrote: > >> > Building QEMU on Fedora 37 (Rawhide

[PATCH v4 13/18] iotests/149: Remove qemu_img_pipe() call

2022-03-17 Thread John Snow
qemu_img_pipe calls blank their output when the command being run is a 'create' call and the command succeeds. Thus, the normative output for this command in iotest 149 is to print a blank line. We can remove the logging from this invocation and use a checked invocation, but we still need to

[PATCH v4 00/18] iotests: add enhanced debugging info to qemu-img failures

2022-03-17 Thread John Snow
Hiya! This series effectively replaces qemu_img_pipe_and_status() with a rewritten function named qemu_img() that raises an exception on non-zero return code by default. By the end of the series, every last invocation of the qemu-img binary ultimately goes through qemu_img(). The exception that

[PATCH v4 01/18] python/utils: add add_visual_margin() text decoration utility

2022-03-17 Thread John Snow
>>> print(add_visual_margin(msg, width=72, name="Commit Message")) ┏━ Commit Message ━━ ┃ add_visual_margin() takes a chunk of text and wraps it in a visual ┃ container that force-wraps to a specified width. An optional title ┃ label may be

[PATCH v4 02/18] python/utils: add VerboseProcessError

2022-03-17 Thread John Snow
This adds an Exception that extends the Python stdlib subprocess.CalledProcessError. The difference is that the str() method of this exception also adds the stdout/stderr logs. In effect, if this exception goes unhandled, Python will print the output in a visually distinct wrapper to the terminal

Re: [PATCH 14/14] iotests: make img_info_log() call qemu_img_log()

2022-03-17 Thread Hanna Reitz
On 17.03.22 18:45, John Snow wrote: On Thu, Mar 17, 2022 at 1:00 PM John Snow wrote: On Thu, Mar 17, 2022 at 11:39 AM Hanna Reitz wrote: On 09.03.22 04:54, John Snow wrote: Add configurable filters to qemu_img_log(), and re-write img_info_log() to call into qemu_img_log() with a custom

Re: [PATCH] block/rbd: fix write zeroes with growing images

2022-03-17 Thread Peter Lieven
> Am 17.03.2022 um 17:26 schrieb Stefano Garzarella : > > Commit d24f80234b ("block/rbd: increase dynamically the image size") > added a workaround to support growing images (eg. qcow2), resizing > the image before write operations that exceed the current size. > > We recently added support

[PATCH v4 06/18] iotests: add qemu_img_json()

2022-03-17 Thread John Snow
qemu_img_json() is a new helper built on top of qemu_img() that tries to pull a valid JSON document out of the stdout stream. In the event that the return code is negative (the program crashed), or the code is greater than zero and did not produce valid JSON output, the VerboseProcessError raised

[PATCH v4 05/18] iotests: fortify compare_images() against crashes

2022-03-17 Thread John Snow
Fortify compare_images() to be more discerning about the status codes it receives. If qemu_img() returns an exit code that implies it didn't actually perform the comparison, treat that as an exceptional circumstance and force the caller to be aware of the peril. If a negative test is desired

Re: [PATCH 14/14] iotests: make img_info_log() call qemu_img_log()

2022-03-17 Thread John Snow
On Thu, Mar 17, 2022 at 2:27 PM Hanna Reitz wrote: > > On 17.03.22 18:45, John Snow wrote: > > On Thu, Mar 17, 2022 at 1:00 PM John Snow wrote: > >> On Thu, Mar 17, 2022 at 11:39 AM Hanna Reitz wrote: > >>> On 09.03.22 04:54, John Snow wrote: > Add configurable filters to qemu_img_log(),

Re: [PULL for-7.0 0/2] Block patches

2022-03-17 Thread Peter Maydell
On Thu, 17 Mar 2022 at 16:57, Stefan Hajnoczi wrote: > > The following changes since commit 1d60bb4b14601e38ed17384277aa4c30c57925d3: > > Merge tag 'pull-request-2022-03-15v2' of https://gitlab.com/thuth/qemu into > staging (2022-03-16 10:43:58 +) > > are available in the Git repository

Re: [PATCH v3 0/1] Patch to adjust coroutine pool size adaptively

2022-03-17 Thread Maxim Levitsky
On Fri, 2022-01-28 at 17:36 +0900, Hiroki Narukawa wrote: > Resending patch with decreasing coroutine pool size on device remove > > We encountered random disk IO performance drop since qemu-5.0.0, and this > patch fixes it. > > Commit message in c740ad92 implied to adjust coroutine pool size

[PATCH v4 14/18] iotests: remove remaining calls to qemu_img_pipe()

2022-03-17 Thread John Snow
As part of moving all python iotest invocations of qemu-img onto a single qemu_img() implementation, remove a few lingering uses of qemu_img_pipe() from outside of iotests.py itself. Several cases here rely on the knowledge that qemu_img_pipe() suppresses *all* output on a successful case when

[PATCH v4 10/18] iotests: add qemu_img_map() function

2022-03-17 Thread John Snow
Add a qemu_img_map() function by analogy with qemu_img_measure(), qemu_img_check(), and qemu_img_info() that all return JSON information. Replace calls to qemu_img_pipe('map', '--output=json', ...) with this new function, which provides better diagnostic information on failure. Note: The output

[PATCH v4 12/18] iotests: replace unchecked calls to qemu_img_pipe()

2022-03-17 Thread John Snow
qemu_img_pipe() discards the return code from qemu-img in favor of returning just its output. Some tests using this function don't save, log, or check the output either, though, which is unsafe. Replace all of these calls with a checked version. Tests affected are 194, 202, 203, 234, 262, and

[PATCH v4 15/18] iotests: use qemu_img() in has_working_luks()

2022-03-17 Thread John Snow
Admittedly a mostly lateral move, but qemu_img() is essentially the replacement for qemu_img_pipe_and_status(). It will give slightly better diagnostics on crash. Signed-off-by: John Snow Reviewed-by: Hanna Reitz --- tests/qemu-iotests/iotests.py | 18 +- 1 file changed, 9

[PATCH v4 03/18] iotests: Remove explicit checks for qemu_img() == 0

2022-03-17 Thread John Snow
qemu_img() returning zero ought to be the rule, not the exception. Remove all explicit checks against the condition in preparation for making non-zero returns an Exception. Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Hanna Reitz --- tests/qemu-iotests/163

[PATCH v4 08/18] iotests: add qemu_img_info()

2022-03-17 Thread John Snow
Add qemu_img_info() by analogy with qemu_img_measure() and qemu_img_check(). Modify image_size() to use this function instead to take advantage of the better diagnostic information on failure provided (ultimately) by qemu_img(). Signed-off-by: John Snow Reviewed-by: Hanna Reitz ---

[PATCH v4 11/18] iotests: change supports_quorum to use qemu_img

2022-03-17 Thread John Snow
Similar to other recent changes: use the qemu_img() invocation that supports throwing loud, nasty exceptions when it fails for surprising reasons. (Why would "--help" ever fail? I don't know, but eliminating *all* calls to qemu-img that do not go through qemu_img() is my goal, so qemu_img_pipe()

[PATCH v4 17/18] iotests: remove qemu_img_pipe_and_status()

2022-03-17 Thread John Snow
With the exceptional 'create' calls removed in the prior commit, change qemu_img_log() and img_info_log() to call qemu_img() directly instead. For now, allow these calls to qemu-img to return non-zero on the basis that any unusual output will be logged anyway. The very next commit begins to

[PATCH v4 04/18] iotests: make qemu_img raise on non-zero rc by default

2022-03-17 Thread John Snow
re-write qemu_img() as a function that will by default raise a VerboseProcessException (extended from CalledProcessException) on non-zero return codes. This will produce a stack trace that will show the command line arguments and return code from the failed process run. Users that want something

RE: [PULL for-7.0 1/2] aio-posix: fix build failure io_uring 2.2

2022-03-17 Thread Wang, Haiyue
> -Original Message- > From: Daniel P. Berrangé > Sent: Friday, March 18, 2022 01:14 > To: Stefan Hajnoczi > Cc: qemu-de...@nongnu.org; Peter Maydell ; Fam > Zheng ; Paolo > Bonzini ; Wang, Haiyue ; > qemu-block@nongnu.org > Subject: Re: [PULL for-7.0 1/2] aio-posix: fix build failure

[PATCH v4 09/18] iotests/remove-bitmap-from-backing: use qemu_img_info()

2022-03-17 Thread John Snow
This removes two more usages of qemu_img_pipe() and replaces them with calls to qemu_img(), which provides better diagnostic information on failure. Signed-off-by: John Snow Reviewed-by: Hanna Reitz --- tests/qemu-iotests/tests/remove-bitmap-from-backing | 6 +++--- 1 file changed, 3

[PATCH v4 16/18] iotests: replace qemu_img_log('create', ...) calls

2022-03-17 Thread John Snow
qemu_img_log() calls into qemu_img_pipe(), which always removes output for 'create' commands on success anyway. Replace all of these calls to the simpler qemu_img_create(...) which doesn't log, but raises a detailed exception object on failure instead. Blank lines are removed from output files

[PATCH v4 18/18] iotests: make qemu_img_log and img_info_log raise on error

2022-03-17 Thread John Snow
Add a `check: bool = True` parameter to both functions and make their qemu_img() invocations raise on error by default. users of img_info_log: 206, 207, 210, 211, 212, 213, 237, 242, 266, 274, 302 users of qemu_img_log: 044, 209, 274, 302, 304 iotests 242 and 266 need to use check=False for

[PATCH v4 07/18] iotests: use qemu_img_json() when applicable

2022-03-17 Thread John Snow
qemu_img_json() gives better diagnostic information on failure. Signed-off-by: John Snow Reviewed-by: Hanna Reitz --- tests/qemu-iotests/iotests.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index

Re: [PATCH 12/14] iotests: remove qemu_img_pipe_and_status()

2022-03-17 Thread Hanna Reitz
On 17.03.22 16:58, John Snow wrote: On Thu, Mar 17, 2022 at 11:28 AM Hanna Reitz wrote: On 09.03.22 04:54, John Snow wrote: With the exceptional 'create' calls removed in the prior commit, change qemu_img_log() and img_info_log() to call qemu_img() directly instead. In keeping with the

Re: [PATCH v3 4/5] iotests: make qemu_img raise on non-zero rc by default

2022-03-17 Thread Hanna Reitz
On 08.03.22 02:57, John Snow wrote: re-write qemu_img() as a function that will by default raise a VerboseProcessException (extended from CalledProcessException) on non-zero return codes. This will produce a stack trace that will show the command line arguments and return code from the failed

Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept

2022-03-17 Thread Emanuele Giuseppe Esposito
Am 09/03/2022 um 14:26 schrieb Emanuele Giuseppe Esposito: >>> * Drains allow the caller (either main loop or iothread running >>> the context) to wait all in_flights requests and operations >>> of a BDS: normal drains target a given node and is parents, while >>> subtree ones also include the

[PULL for-7.0 1/2] aio-posix: fix build failure io_uring 2.2

2022-03-17 Thread Stefan Hajnoczi
From: Haiyue Wang The io_uring fixed "Don't truncate addr fields to 32-bit on 32-bit": https://git.kernel.dk/cgit/liburing/commit/?id=d84c29b19ed0b13619cff40141bb1fc3615b This leads to build failure: ../util/fdmon-io_uring.c: In function ‘add_poll_remove_sqe’:

[PULL for-7.0 0/2] Block patches

2022-03-17 Thread Stefan Hajnoczi
The following changes since commit 1d60bb4b14601e38ed17384277aa4c30c57925d3: Merge tag 'pull-request-2022-03-15v2' of https://gitlab.com/thuth/qemu into staging (2022-03-16 10:43:58 +) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/block-pull-request

Re: [PATCH v3 2/5] python/utils: add VerboseProcessError

2022-03-17 Thread Hanna Reitz
On 17.03.22 16:13, John Snow wrote: On Thu, Mar 17, 2022 at 5:23 AM Hanna Reitz wrote: On 08.03.22 02:57, John Snow wrote: This adds an Exception that extends the Python stdlib subprocess.CalledProcessError. The difference is that the str() method of this exception also adds the

Re: [PATCH 12/14] iotests: remove qemu_img_pipe_and_status()

2022-03-17 Thread John Snow
On Thu, Mar 17, 2022 at 11:28 AM Hanna Reitz wrote: > > On 09.03.22 04:54, John Snow wrote: > > With the exceptional 'create' calls removed in the prior commit, change > > qemu_img_log() and img_info_log() to call qemu_img() directly > > instead. > > > > In keeping with the spirit of diff-based

Re: [PATCH v3 4/5] iotests: make qemu_img raise on non-zero rc by default

2022-03-17 Thread Hanna Reitz
On 17.03.22 16:24, John Snow wrote: On Thu, Mar 17, 2022 at 6:25 AM Hanna Reitz wrote: On 08.03.22 02:57, John Snow wrote: +if check and subp.returncode or (subp.returncode < 0): I wouldn’t expect these parentheses here in any other language, are they required in Python? It's not

[PATCH] block/rbd: fix write zeroes with growing images

2022-03-17 Thread Stefano Garzarella
Commit d24f80234b ("block/rbd: increase dynamically the image size") added a workaround to support growing images (eg. qcow2), resizing the image before write operations that exceed the current size. We recently added support for write zeroes and without the workaround we can have problems with

Re: [PATCH v3 2/5] python/utils: add VerboseProcessError

2022-03-17 Thread John Snow
On Thu, Mar 17, 2022 at 11:56 AM Hanna Reitz wrote: > > On 17.03.22 16:13, John Snow wrote: > > On Thu, Mar 17, 2022 at 5:23 AM Hanna Reitz wrote: > >> On 08.03.22 02:57, John Snow wrote: > >>> This adds an Exception that extends the Python stdlib > >>> subprocess.CalledProcessError. > >>> > >>>

Re: [PATCH v3 2/5] python/utils: add VerboseProcessError

2022-03-17 Thread Hanna Reitz
On 17.03.22 17:31, John Snow wrote: On Thu, Mar 17, 2022 at 11:56 AM Hanna Reitz wrote: On 17.03.22 16:13, John Snow wrote: On Thu, Mar 17, 2022 at 5:23 AM Hanna Reitz wrote: On 08.03.22 02:57, John Snow wrote: This adds an Exception that extends the Python stdlib

Re: [PATCH v3 2/5] python/utils: add VerboseProcessError

2022-03-17 Thread John Snow
On Thu, Mar 17, 2022 at 12:34 PM Hanna Reitz wrote: > > On 17.03.22 17:31, John Snow wrote: > > On Thu, Mar 17, 2022 at 11:56 AM Hanna Reitz wrote: > >> On 17.03.22 16:13, John Snow wrote: > >>> On Thu, Mar 17, 2022 at 5:23 AM Hanna Reitz wrote: > On 08.03.22 02:57, John Snow wrote: >

[PULL for-7.0 2/2] aio-posix: fix spurious ->poll_ready() callbacks in main loop

2022-03-17 Thread Stefan Hajnoczi
When ->poll() succeeds the AioHandler is placed on the ready list with revents set to the magic value 0. This magic value causes aio_dispatch_handler() to invoke ->poll_ready() instead of ->io_read() for G_IO_IN or ->io_write() for G_IO_OUT. This magic value 0 hack works for the IOThread where

Re: [PATCH 14/14] iotests: make img_info_log() call qemu_img_log()

2022-03-17 Thread John Snow
On Thu, Mar 17, 2022 at 11:39 AM Hanna Reitz wrote: > > On 09.03.22 04:54, John Snow wrote: > > Add configurable filters to qemu_img_log(), and re-write img_info_log() > > to call into qemu_img_log() with a custom filter instead. > > > > After this patch, every last call to qemu_img() is now

Re: [PATCH 12/14] iotests: remove qemu_img_pipe_and_status()

2022-03-17 Thread John Snow
On Thu, Mar 17, 2022 at 12:04 PM Hanna Reitz wrote: > > On 17.03.22 16:58, John Snow wrote: > > On Thu, Mar 17, 2022 at 11:28 AM Hanna Reitz wrote: > >> On 09.03.22 04:54, John Snow wrote: > >>> With the exceptional 'create' calls removed in the prior commit, change > >>> qemu_img_log() and

Re: [PULL for-7.0 1/2] aio-posix: fix build failure io_uring 2.2

2022-03-17 Thread Daniel P . Berrangé
On Thu, Mar 17, 2022 at 04:57:42PM +, Stefan Hajnoczi wrote: > From: Haiyue Wang > > The io_uring fixed "Don't truncate addr fields to 32-bit on 32-bit": > https://git.kernel.dk/cgit/liburing/commit/?id=d84c29b19ed0b13619cff40141bb1fc3615b Ewww, that changes the public ABI of the

Re: [PATCH 14/14] iotests: make img_info_log() call qemu_img_log()

2022-03-17 Thread John Snow
On Thu, Mar 17, 2022 at 1:00 PM John Snow wrote: > > On Thu, Mar 17, 2022 at 11:39 AM Hanna Reitz wrote: > > > > On 09.03.22 04:54, John Snow wrote: > > > Add configurable filters to qemu_img_log(), and re-write img_info_log() > > > to call into qemu_img_log() with a custom filter instead. > > >