> -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
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
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
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
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
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
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
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
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
---
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
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()
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
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
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
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
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
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
>>> 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
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
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
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
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
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
> 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
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
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(),
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.
> > >
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
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
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’:
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
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
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
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:
>
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
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.
> >>>
> >>>
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
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
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
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
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
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
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
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
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
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
---
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
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
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
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
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++.
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
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
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
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.
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
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
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,
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
* 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
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
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
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
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
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
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
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
---
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
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
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
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
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 |
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
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
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
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
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
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
78 matches
Mail list logo