<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/include/block/block.h, branch spice_video_codecs</title>
<subtitle>Experimental fork of QEMU with video encoding patches</subtitle>
<id>https://git.openslx.org/bwlp/qemu.git/atom/include/block/block.h?h=spice_video_codecs</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/include/block/block.h?h=spice_video_codecs'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2022-03-04T17:18:25+00:00</updated>
<entry>
<title>include/block/block: split header into I/O and global state API</title>
<updated>2022-03-04T17:18:25+00:00</updated>
<author>
<name>Emanuele Giuseppe Esposito</name>
</author>
<published>2022-03-03T15:15:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=3b491a905664739e34d3b1f6c415225a6148c1af'/>
<id>urn:sha1:3b491a905664739e34d3b1f6c415225a6148c1af</id>
<content type='text'>
block.h currently contains a mix of functions:
some of them run under the BQL and modify the block layer graph,
others are instead thread-safe and perform I/O in iothreads.
Some others can only be called by either the main loop or the
iothread running the AioContext (and not other iothreads),
and using them in another thread would cause deadlocks, and therefore
it is not ideal to define them as I/O.

It is not easy to understand which function is part of which
group (I/O vs GS vs "I/O or GS"), and this patch aims to clarify it.

The "GS" functions need the BQL, and often use
aio_context_acquire/release and/or drain to be sure they
can modify the graph safely.
The I/O function are instead thread safe, and can run in
any AioContext.
"I/O or GS" functions run instead in the main loop or in
a single iothread, and use BDRV_POLL_WHILE().

By splitting the header in two files, block-io.h
and block-global-state.h we have a clearer view on what
needs what kind of protection. block-common.h
contains common structures shared by both headers.

block.h is left there for legacy and to avoid changing
all includes in all c files that use the block APIs.

Assertions are added in the next patch.

Signed-off-by: Emanuele Giuseppe Esposito &lt;eesposit@redhat.com&gt;
Message-Id: &lt;20220303151616.325444-4-eesposit@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>block: rename bdrv_invalidate_cache_all, blk_invalidate_cache and test_sync_op_invalidate_cache</title>
<updated>2022-03-04T17:14:40+00:00</updated>
<author>
<name>Emanuele Giuseppe Esposito</name>
</author>
<published>2022-02-09T10:54:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=3b71719462b869463e34394e56c74644672c69e5'/>
<id>urn:sha1:3b71719462b869463e34394e56c74644672c69e5</id>
<content type='text'>
Following the bdrv_activate renaming, change also the name
of the respective callers.

bdrv_invalidate_cache_all -&gt; bdrv_activate_all
blk_invalidate_cache -&gt; blk_activate
test_sync_op_invalidate_cache -&gt; test_sync_op_activate

No functional change intended.

Signed-off-by: Emanuele Giuseppe Esposito &lt;eesposit@redhat.com&gt;
Reviewed-by: Juan Quintela &lt;quintela@redhat.com&gt;
Reviewed-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
Message-Id: &lt;20220209105452.1694545-5-eesposit@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>block: introduce bdrv_activate</title>
<updated>2022-03-04T17:14:40+00:00</updated>
<author>
<name>Emanuele Giuseppe Esposito</name>
</author>
<published>2022-02-09T10:54:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=a94750d9567359fb296161cd80afb015ef18193f'/>
<id>urn:sha1:a94750d9567359fb296161cd80afb015ef18193f</id>
<content type='text'>
This function is currently just a wrapper for bdrv_invalidate_cache(),
but in future will contain the code of bdrv_co_invalidate_cache() that
has to always be protected by BQL, and leave the rest in the I/O
coroutine.

Replace all bdrv_invalidate_cache() invokations with bdrv_activate().

Signed-off-by: Emanuele Giuseppe Esposito &lt;eesposit@redhat.com&gt;
Reviewed-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
Message-Id: &lt;20220209105452.1694545-4-eesposit@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>block.h: remove outdated comment</title>
<updated>2022-02-01T12:28:53+00:00</updated>
<author>
<name>Emanuele Giuseppe Esposito</name>
</author>
<published>2022-01-31T12:56:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=751486c18555169ca4baf59440275d5831140822'/>
<id>urn:sha1:751486c18555169ca4baf59440275d5831140822</id>
<content type='text'>
The comment "disk I/O throttling" doesn't make any sense at all
any more. It was added in commit 0563e191516 to describe
bdrv_io_limits_enable()/disable(), which were removed in commit
97148076, so the comment is just a forgotten leftover.

Suggested-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Signed-off-by: Emanuele Giuseppe Esposito &lt;eesposit@redhat.com&gt;
Message-Id: &lt;20220131125615.74612-1-eesposit@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;f4bug@amsat.org&gt;
Signed-off-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
</content>
</entry>
<entry>
<title>block: drop BLK_PERM_GRAPH_MOD</title>
<updated>2022-01-14T11:03:16+00:00</updated>
<author>
<name>Vladimir Sementsov-Ogievskiy</name>
</author>
<published>2021-09-02T09:37:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=64631f368115a332bdca32553a430568ecc7761d'/>
<id>urn:sha1:64631f368115a332bdca32553a430568ecc7761d</id>
<content type='text'>
First, this permission never protected a node from being changed, as
generic child-replacing functions don't check it.

Second, it's a strange thing: it presents a permission of parent node
to change its child. But generally, children are replaced by different
mechanisms, like jobs or qmp commands, not by nodes.

Graph-mod permission is hard to understand. All other permissions
describe operations which done by parent node on its child: read,
write, resize. Graph modification operations are something completely
different.

The only place where BLK_PERM_GRAPH_MOD is used as "perm" (not shared
perm) is mirror_start_job, for s-&gt;target. Still modern code should use
bdrv_freeze_backing_chain() to protect from graph modification, if we
don't do it somewhere it may be considered as a bug. So, it's a bit
risky to drop GRAPH_MOD, and analyzing of possible loss of protection
is hard. But one day we should do it, let's do it now.

One more bit of information is that locking the corresponding byte in
file-posix doesn't make sense at all.

Signed-off-by: Vladimir Sementsov-Ogievskiy &lt;vsementsov@virtuozzo.com&gt;
Message-Id: &lt;20210902093754.2352-1-vsementsov@virtuozzo.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>block: implement bdrv_new_open_driver_opts()</title>
<updated>2021-10-06T08:25:55+00:00</updated>
<author>
<name>Vladimir Sementsov-Ogievskiy</name>
</author>
<published>2021-09-20T11:55:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=621d17378a40509757d5e03eb1c2f5305ff76df3'/>
<id>urn:sha1:621d17378a40509757d5e03eb1c2f5305ff76df3</id>
<content type='text'>
Add version of bdrv_new_open_driver() that supports QDict options.
We'll use it in further commit.

Simply add one more argument to bdrv_new_open_driver() is worse, as
there are too many invocations of bdrv_new_open_driver() to update
then.

Signed-off-by: Vladimir Sementsov-Ogievskiy &lt;vsementsov@virtuozzo.com&gt;
Suggested-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Message-Id: &lt;20210920115538.264372-2-vsementsov@virtuozzo.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>include/block.h: remove outdated comment</title>
<updated>2021-10-06T08:25:55+00:00</updated>
<author>
<name>Emanuele Giuseppe Esposito</name>
</author>
<published>2021-09-03T11:38:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=a6297e1ade6d9981c4a8d43eb426830b49a7913c'/>
<id>urn:sha1:a6297e1ade6d9981c4a8d43eb426830b49a7913c</id>
<content type='text'>
There are a couple of errors in bdrv_drained_begin header comment:
- block_job_pause does not exist anymore, it has been replaced
  with job_pause in b15de82867
- job_pause is automatically invoked as a .drained_begin callback
  (child_job_drained_begin) by the child_job BdrvChildClass struct
  in blockjob.c. So no additional pause should be required.

Signed-off-by: Emanuele Giuseppe Esposito &lt;eesposit@redhat.com&gt;
Message-Id: &lt;20210903113800.59970-1-eesposit@redhat.com&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>block: introduce bdrv_replace_child_bs()</title>
<updated>2021-09-01T10:57:31+00:00</updated>
<author>
<name>Vladimir Sementsov-Ogievskiy</name>
</author>
<published>2021-08-24T08:38:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=bd8f4c42c8547a74b0f92dc17af93c3247c69f18'/>
<id>urn:sha1:bd8f4c42c8547a74b0f92dc17af93c3247c69f18</id>
<content type='text'>
Add function to transactionally replace bs inside BdrvChild.

Signed-off-by: Vladimir Sementsov-Ogievskiy &lt;vsementsov@virtuozzo.com&gt;
Reviewed-by: Max Reitz &lt;mreitz@redhat.com&gt;
Message-Id: &lt;20210824083856.17408-2-vsementsov@virtuozzo.com&gt;
Signed-off-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
</content>
</entry>
<entry>
<title>block: Acquire AioContexts during bdrv_reopen_multiple()</title>
<updated>2021-07-09T11:19:11+00:00</updated>
<author>
<name>Kevin Wolf</name>
</author>
<published>2021-07-08T11:47:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=6cf42ca2f9782f0335abf3e6b611fbced40cd099'/>
<id>urn:sha1:6cf42ca2f9782f0335abf3e6b611fbced40cd099</id>
<content type='text'>
As the BlockReopenQueue can contain nodes in multiple AioContexts, only
one of which may be locked when AIO_WAIT_WHILE() can be called, we can't
let the caller lock the right contexts. Instead, individually lock the
AioContext of a single node when iterating the queue.

Reintroduce bdrv_reopen() as a wrapper for reopening a single node that
drains the node and temporarily drops the AioContext lock for
bdrv_reopen_multiple().

Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Reviewed-by: Vladimir Sementsov-Ogievskiy &lt;vsementsov@virtuozzo.com&gt;
Message-Id: &lt;20210708114709.206487-4-kwolf@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>block: Add bdrv_reopen_queue_free()</title>
<updated>2021-07-09T11:19:11+00:00</updated>
<author>
<name>Alberto Garcia</name>
</author>
<published>2021-07-08T11:47:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=ab5b522879e2a7880418cbd29340675e5427572f'/>
<id>urn:sha1:ab5b522879e2a7880418cbd29340675e5427572f</id>
<content type='text'>
Move the code to free a BlockReopenQueue to a separate function.
It will be used in a subsequent patch.

[ kwolf: Also free explicit_options and options, and explicitly
  qobject_ref() the value when it continues to be used. This makes
  future memory leaks less likely. ]

Signed-off-by: Alberto Garcia &lt;berto@igalia.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Reviewed-by: Vladimir Sementsov-Ogievskiy &lt;vsementsov@virtuozzo.com&gt;
Message-Id: &lt;20210708114709.206487-3-kwolf@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
</feed>
