<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/nbd/trace-events, branch spice_video_codecs</title>
<subtitle>Experimental fork of QEMU with video encoding patches</subtitle>
<id>https://git.openslx.org/bwlp/qemu.git/atom/nbd/trace-events?h=spice_video_codecs</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/nbd/trace-events?h=spice_video_codecs'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2022-06-29T07:57:02+00:00</updated>
<entry>
<title>nbd: trace long NBD operations</title>
<updated>2022-06-29T07:57:02+00:00</updated>
<author>
<name>Denis V. Lunev</name>
</author>
<published>2022-05-30T10:39:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=8bb100c9e2dc1fe0e33283b0c43252dbaf4eb71b'/>
<id>urn:sha1:8bb100c9e2dc1fe0e33283b0c43252dbaf4eb71b</id>
<content type='text'>
At the moment there are 2 sources of lengthy operations if configured:
* open connection, which could retry inside and
* reconnect of already opened connection
These operations could be quite lengthy and cumbersome to catch thus
it would be quite natural to add trace points for them.

This patch is based on the original downstream work made by Vladimir.

Signed-off-by: Denis V. Lunev &lt;den@openvz.org&gt;
CC: Eric Blake &lt;eblake@redhat.com&gt;
CC: Vladimir Sementsov-Ogievskiy &lt;vsementsov@yandex-team.ru&gt;
CC: Kevin Wolf &lt;kwolf@redhat.com&gt;
CC: Hanna Reitz &lt;hreitz@redhat.com&gt;
CC: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Reviewed-by: Vladimir Sementsov-Ogievskiy &lt;vsementsov@yandex-team.ru&gt;
Signed-off-by: Vladimir Sementsov-Ogievskiy &lt;vsementsov@yandex-team.ru&gt;
</content>
</entry>
<entry>
<title>docs: fix references to docs/devel/tracing.rst</title>
<updated>2021-06-02T04:51:09+00:00</updated>
<author>
<name>Stefano Garzarella</name>
</author>
<published>2021-05-17T15:16:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=d0fb9657a33dd3d1db1b492c4dcc7c778e40e5c0'/>
<id>urn:sha1:d0fb9657a33dd3d1db1b492c4dcc7c778e40e5c0</id>
<content type='text'>
Commit e50caf4a5c ("tracing: convert documentation to rST")
converted docs/devel/tracing.txt to docs/devel/tracing.rst.

We still have several references to the old file, so let's fix them
with the following command:

  sed -i s/tracing.txt/tracing.rst/ $(git grep -l docs/devel/tracing.txt)

Signed-off-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-Id: &lt;20210517151702.109066-2-sgarzare@redhat.com&gt;
Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
<entry>
<title>trace: Remove trailing newline in events</title>
<updated>2019-09-18T09:19:47+00:00</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
</author>
<published>2019-09-16T09:51:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=794dcb54b3fc3cb91d1eeb34216be3177400d6a2'/>
<id>urn:sha1:794dcb54b3fc3cb91d1eeb34216be3177400d6a2</id>
<content type='text'>
While the tracing framework does not forbid trailing newline in
events format string, using them lead to confuse output.
It is the responsibility of the backend to properly end an event
line.

Some of our formats have trailing newlines, remove them.

[Fixed typo in commit description reported by Eric Blake
&lt;eblake@redhat.com&gt;
--Stefan]

Reviewed-by: John Snow &lt;jsnow@redhat.com&gt;
Reviewed-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-id: 20190916095121.29506-2-philmd@redhat.com
Message-Id: &lt;20190916095121.29506-2-philmd@redhat.com&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>nbd: Tolerate more errors to structured reply request</title>
<updated>2019-09-05T20:57:37+00:00</updated>
<author>
<name>Eric Blake</name>
</author>
<published>2019-08-24T17:28:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=5de47735c79a030edc3e6258ab5476b630c61765'/>
<id>urn:sha1:5de47735c79a030edc3e6258ab5476b630c61765</id>
<content type='text'>
A server may have a reason to reject a request for structured replies,
beyond just not recognizing them as a valid request; similarly, it may
have a reason for rejecting a request for a meta context.  It doesn't
hurt us to continue talking to such a server; otherwise 'qemu-nbd
--list' of such a server fails to display all available details about
the export.

Encountered when temporarily tweaking nbdkit to reply with
NBD_REP_ERR_POLICY.  Present since structured reply support was first
added (commit d795299b reused starttls handling, but starttls is
different in that we can't fall back to other behavior on any error).

Note that for an unencrypted client trying to connect to a server that
requires encryption, this defers the point of failure to when we
finally execute a strict command (such as NBD_OPT_GO or NBD_OPT_LIST),
now that the intermediate NBD_OPT_STRUCTURED_REPLY does not diagnose
NBD_REP_ERR_TLS_REQD as fatal; but as the protocol eventually gets us
to a command where we can't continue onwards, the changed error
message doesn't cause any security concerns.

Signed-off-by: Eric Blake &lt;eblake@redhat.com&gt;
Message-Id: &lt;20190824172813.29720-3-eblake@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
[eblake: fix iotest 233]
</content>
</entry>
<entry>
<title>nbd/server: Trace client noncompliance on unaligned requests</title>
<updated>2019-04-08T18:42:24+00:00</updated>
<author>
<name>Eric Blake</name>
</author>
<published>2019-04-03T03:05:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=6e280648d21d8c0aa8a101b62d0732cd1e608743'/>
<id>urn:sha1:6e280648d21d8c0aa8a101b62d0732cd1e608743</id>
<content type='text'>
We've recently added traces for clients to flag server non-compliance;
let's do the same for servers to flag client non-compliance. According
to the spec, if the client requests NBD_INFO_BLOCK_SIZE, it is
promising to send all requests aligned to those boundaries.  Of
course, if the client does not request NBD_INFO_BLOCK_SIZE, then it
made no promises so we shouldn't flag anything; and because we are
willing to handle clients that made no promises (the spec allows us to
use NBD_REP_ERR_BLOCK_SIZE_REQD if we had been unwilling), we already
have to handle unaligned requests (which the block layer already does
on our behalf).  So even though the spec allows us to return EINVAL
for clients that promised to behave, it's easier to always answer
unaligned requests.  Still, flagging non-compliance can be useful in
debugging a client that is trying to be maximally portable.

Qemu as client used to have one spot where it sent non-compliant
requests: if the server sends an unaligned reply to
NBD_CMD_BLOCK_STATUS, and the client was iterating over the entire
disk, the next request would start at that unaligned point; this was
fixed in commit a39286dd when the client was taught to work around
server non-compliance; but is equally fixed if the server is patched
to not send unaligned replies in the first place (yes, qemu 4.0 as
server still has few such bugs, although they will be patched in
4.1). Fortunately, I did not find any more spots where qemu as client
was non-compliant. I was able to test the patch by using the following
hack to convince qemu-io to run various unaligned commands, coupled
with serving 512-byte alignment by intentionally omitting '-f raw' on
the server while viewing server traces.

| diff --git i/nbd/client.c w/nbd/client.c
| index 427980bdd22..1858b2aac35 100644
| --- i/nbd/client.c
| +++ w/nbd/client.c
| @@ -449,6 +449,7 @@ static int nbd_opt_info_or_go(QIOChannel *ioc, uint32_t opt,
|                  nbd_send_opt_abort(ioc);
|                  return -1;
|              }
| +            info-&gt;min_block = 1;//hack
|              if (!is_power_of_2(info-&gt;min_block)) {
|                  error_setg(errp, "server minimum block size %" PRIu32
|                             " is not a power of two", info-&gt;min_block);

Signed-off-by: Eric Blake &lt;eblake@redhat.com&gt;
Message-Id: &lt;20190403030526.12258-3-eblake@redhat.com&gt;
[eblake: address minor review nits]
Reviewed-by: Vladimir Sementsov-Ogievskiy &lt;vsementsov@virtuozzo.com&gt;
</content>
</entry>
<entry>
<title>trace-events: Delete unused trace points</title>
<updated>2019-03-22T16:18:07+00:00</updated>
<author>
<name>Markus Armbruster</name>
</author>
<published>2019-03-14T18:09:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=a9779a3ab0c616ef3e0423f218145bc7d1de03f2'/>
<id>urn:sha1:a9779a3ab0c616ef3e0423f218145bc7d1de03f2</id>
<content type='text'>
Tracked down with cleanup-trace-events.pl.  Funnies requiring manual
post-processing:

* block.c and blockdev.c trace points are in block/trace-events.

* hw/block/nvme.c uses the preprocessor to hide its trace point use
  from cleanup-trace-events.pl.

* include/hw/xen/xen_common.h trace points are in hw/xen/trace-events.

* net/colo-compare and net/filter-rewriter.c use pseudo trace points
  colo_compare_udp_miscompare and colo_filter_rewriter_debug to guard
  debug code.

Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Message-id: 20190314180929.27722-5-armbru@redhat.com
Message-Id: &lt;20190314180929.27722-5-armbru@redhat.com&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>trace-events: Shorten file names in comments</title>
<updated>2019-03-22T16:18:07+00:00</updated>
<author>
<name>Markus Armbruster</name>
</author>
<published>2019-03-14T18:09:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=500016e5db5826fbcc5db17f9992b22d936acb83'/>
<id>urn:sha1:500016e5db5826fbcc5db17f9992b22d936acb83</id>
<content type='text'>
We spell out sub/dir/ in sub/dir/trace-events' comments pointing to
source files.  That's because when trace-events got split up, the
comments were moved verbatim.

Delete the sub/dir/ part from these comments.  Gets rid of several
misspellings.

Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-id: 20190314180929.27722-3-armbru@redhat.com
Message-Id: &lt;20190314180929.27722-3-armbru@redhat.com&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>trace-events: Consistently point to docs/devel/tracing.txt</title>
<updated>2019-03-22T16:17:37+00:00</updated>
<author>
<name>Markus Armbruster</name>
</author>
<published>2019-03-14T18:09:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=e68b3baa25c91760ad176ace4f394c2db9240783'/>
<id>urn:sha1:e68b3baa25c91760ad176ace4f394c2db9240783</id>
<content type='text'>
Almost all trace-events point to docs/devel/tracing.txt in a comment
right at the beginning.  Touch up the ones that don't.

[Updated with Markus' new commit description wording.
--Stefan]

Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-id: 20190314180929.27722-2-armbru@redhat.com
Message-Id: &lt;20190314180929.27722-2-armbru@redhat.com&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>nbd/client: Refactor nbd_opt_go() to support NBD_OPT_INFO</title>
<updated>2019-01-21T21:49:52+00:00</updated>
<author>
<name>Eric Blake</name>
</author>
<published>2019-01-17T19:36:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=138796d0f545ad4b6c74ad2cbe5f6e08c454a0b9'/>
<id>urn:sha1:138796d0f545ad4b6c74ad2cbe5f6e08c454a0b9</id>
<content type='text'>
Rename the function to nbd_opt_info_or_go() with an added parameter
and slight changes to comments and trace messages, in order to
reuse the function for NBD_OPT_INFO.

Signed-off-by: Eric Blake &lt;eblake@redhat.com&gt;
Message-Id: &lt;20190117193658.16413-17-eblake@redhat.com&gt;
Reviewed-by: Vladimir Sementsov-Ogievskiy &lt;vsementsov@virtuozzo.com&gt;
</content>
</entry>
<entry>
<title>nbd/client: Split handshake into two functions</title>
<updated>2019-01-21T21:49:52+00:00</updated>
<author>
<name>Eric Blake</name>
</author>
<published>2019-01-17T19:36:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=10b89988d6b0f5f2aed794bed5b4e774858548f4'/>
<id>urn:sha1:10b89988d6b0f5f2aed794bed5b4e774858548f4</id>
<content type='text'>
An upcoming patch will add the ability for qemu-nbd to list
the services provided by an NBD server.  Share the common
code of the TLS handshake by splitting the initial exchange
into a separate function, leaving only the export handling
in the original function.  Functionally, there should be no
change in behavior in this patch, although some of the code
motion may be difficult to follow due to indentation changes
(view with 'git diff -w' for a smaller changeset).

I considered an enum for the return code coordinating state
between the two functions, but in the end just settled with
ample comments.

Signed-off-by: Eric Blake &lt;eblake@redhat.com&gt;
Reviewed-by: Richard W.M. Jones &lt;rjones@redhat.com&gt;
Reviewed-by: Vladimir Sementsov-Ogievskiy &lt;vsementsov@virtuozzo.com&gt;
Message-Id: &lt;20190117193658.16413-15-eblake@redhat.com&gt;
</content>
</entry>
</feed>
