<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/include/block, branch master</title>
<subtitle>Experimental fork of QEMU with video encoding patches</subtitle>
<id>https://git.openslx.org/bwlp/qemu.git/atom/include/block?h=master</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/include/block?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2022-11-10T13:58:34+00:00</updated>
<entry>
<title>block: Make bdrv_child_get_parent_aio_context I/O</title>
<updated>2022-11-10T13:58:34+00:00</updated>
<author>
<name>Hanna Reitz</name>
</author>
<published>2022-11-07T15:13:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=d5f8d79c2f1f22cb883ae404abff1ee8276d47f1'/>
<id>urn:sha1:d5f8d79c2f1f22cb883ae404abff1ee8276d47f1</id>
<content type='text'>
We want to use bdrv_child_get_parent_aio_context() from
bdrv_parent_drained_{begin,end}_single(), both of which are "I/O or GS"
functions.

Prior to 3ed4f708fe1, all the implementations were I/O code anyway.
3ed4f708fe1 has put block jobs' AioContext field under the job mutex, so
to make child_job_get_parent_aio_context() work in an I/O context, we
need to take that lock there.

Furthermore, blk_root_get_parent_aio_context() is not marked as
anything, but is safe to run in an I/O context, so mark it that way now.
(blk_get_aio_context() is an I/O code function.)

With that done, all implementations explicitly are I/O code, so we can
mark bdrv_child_get_parent_aio_context() as I/O code, too, so callers
know it is safe to run from both GS and I/O contexts.

Signed-off-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
Message-Id: &lt;20221107151321.211175-2-hreitz@redhat.com&gt;
Reviewed-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for-upstream' of https://repo.or.cz/qemu/kevin into staging</title>
<updated>2022-10-30T19:15:12+00:00</updated>
<author>
<name>Stefan Hajnoczi</name>
</author>
<published>2022-10-30T19:15:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=d5ab9490cdf3ebcd97793982d4664f951816f6db'/>
<id>urn:sha1:d5ab9490cdf3ebcd97793982d4664f951816f6db</id>
<content type='text'>
Block layer patches

- Cleanup bs-&gt;backing and bs-&gt;file handling
- Refactor bdrv_try_set_aio_context using transactions
- Changes for improved coroutine_fn consistency
- vhost-user-blk: fix the resize crash
- io_uring: Use of io_uring_register_ring_fd() led to breakage, revert
- vvfat: Fix some problems with r/w mode
- Code cleanup
- MAINTAINERS: Fold "Block QAPI, monitor, ..." into "Block layer core"

# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCAAvFiEE3D3rFZqa+V09dFb+fwmycsiPL9YFAmNazhIRHGt3b2xmQHJl
# ZGhhdC5jb20ACgkQfwmycsiPL9ZyTw/8Dfck/SuxfyeLlnQItkjaV4cnqWOU8vHs
# 9x0KhlptCs+HXdF/3iicpA0lHojn7mNnbdFGjPRY4E0LriQv91TQ5ycdEmrseFPf
# sgeQlgdKCVU/pHjZ2wYarm2pE43Cx85a5xuufmw+7w49dNNZn14l4t+DgviuClVM
# nuVaogfZFbYyetre+Qd2TgLl+gJ+0d4o7Zs5lSWLrT8t0L9AGkcWPA7Nrbl6loIE
# dOautV4G7jLjuMiCeJZOGcnuRVe3gCQ5rCGBFzzH4DUtz4BmiYx4hd3LMEsP0PMM
# CrsfDZS04Ztybl9M7TmJuwkAm1gx1JDMOuJuh18lbJocIOBvhkKKxY2wI5LIdZVI
# ZntmU36RowkX+GGu/PYpYyMjBDClJppZCl7vnjyLYsVt6r0Vu6SmlHpJhcRYabhe
# 96Kv1LXH9A6+ogKPU3Layw6JGjg01GNr1ALuT7PO3pGto/JshmOuBEJJDucoF84M
# 5AfxFCohMROVldwblA6M0eKnlQBgtr5BvtgbV54BBo88VlFJgDJFQn7R09cTFUEo
# UwaJoS+nIaiZ0bQQVZhZloVppUaTdVJojzfVRCZZctga96/tu1HSFnGLnbEFpUN3
# KOf+XnVNS6Ro+nPSDf9bMjbIom2JicGFfV+6yMgIoxY/d5UA2dTZfefil4TAlSod
# 6PsTgg+jrm8=
# =/Fw0
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 27 Oct 2022 14:29:38 EDT
# gpg:                using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6
# gpg:                issuer "kwolf@redhat.com"
# gpg: Good signature from "Kevin Wolf &lt;kwolf@redhat.com&gt;" [full]
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6

* tag 'for-upstream' of https://repo.or.cz/qemu/kevin: (58 commits)
  block/block-backend: blk_set_enable_write_cache is IO_CODE
  monitor: switch to *_co_* functions
  vmdk: switch to *_co_* functions
  vhdx: switch to *_co_* functions
  vdi: switch to *_co_* functions
  qed: switch to *_co_* functions
  qcow2: switch to *_co_* functions
  qcow: switch to *_co_* functions
  parallels: switch to *_co_* functions
  mirror: switch to *_co_* functions
  block: switch to *_co_* functions
  commit: switch to *_co_* functions
  vmdk: manually add more coroutine_fn annotations
  qcow2: manually add more coroutine_fn annotations
  qcow: manually add more coroutine_fn annotations
  blkdebug: add missing coroutine_fn annotation for indirect-called functions
  qcow2: add coroutine_fn annotation for indirect-called functions
  block: add missing coroutine_fn annotation to BlockDriverState callbacks
  coroutine-io: add missing coroutine_fn annotation to prototypes
  coroutine-lock: add missing coroutine_fn annotation to prototypes
  ...

Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>block: add missing coroutine_fn annotation to BlockDriverState callbacks</title>
<updated>2022-10-27T18:14:11+00:00</updated>
<author>
<name>Alberto Faria</name>
</author>
<published>2022-10-13T12:36:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=c2d7680893a53c3d1443dd729fa60814dd1b2bad'/>
<id>urn:sha1:c2d7680893a53c3d1443dd729fa60814dd1b2bad</id>
<content type='text'>
Signed-off-by: Alberto Faria &lt;afaria@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Message-Id: &lt;20221013123711.620631-9-pbonzini@redhat.com&gt;
Reviewed-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>block: add missing coroutine_fn annotation to prototypes</title>
<updated>2022-10-27T18:14:11+00:00</updated>
<author>
<name>Alberto Faria</name>
</author>
<published>2022-10-13T12:36:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=16bb776f5b48e045f5eb5d105ee74135bfc781dd'/>
<id>urn:sha1:16bb776f5b48e045f5eb5d105ee74135bfc781dd</id>
<content type='text'>
The functions are marked coroutine_fn in the definition.

Signed-off-by: Alberto Faria &lt;afaria@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Message-Id: &lt;20221013123711.620631-6-pbonzini@redhat.com&gt;
Reviewed-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>monitor: add missing coroutine_fn annotation</title>
<updated>2022-10-27T18:14:11+00:00</updated>
<author>
<name>Alberto Faria</name>
</author>
<published>2022-10-13T12:36:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=6894ee2bee20fd22055f8a7337ef465efab0c823'/>
<id>urn:sha1:6894ee2bee20fd22055f8a7337ef465efab0c823</id>
<content type='text'>
hmp_block_resize and hmp_screendump are defined as a ".coroutine = true" command,
so they must be coroutine_fn.

Signed-off-by: Alberto Faria &lt;afaria@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Message-Id: &lt;20221013123711.620631-4-pbonzini@redhat.com&gt;
Reviewed-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>block: remove bdrv_try_set_aio_context and replace it with bdrv_try_change_aio_context</title>
<updated>2022-10-27T18:14:11+00:00</updated>
<author>
<name>Emanuele Giuseppe Esposito</name>
</author>
<published>2022-10-25T08:49:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=142e6907120d12de1e7ac402e556597ebbab86e8'/>
<id>urn:sha1:142e6907120d12de1e7ac402e556597ebbab86e8</id>
<content type='text'>
No functional change intended.

Signed-off-by: Emanuele Giuseppe Esposito &lt;eesposit@redhat.com&gt;
Reviewed-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Message-Id: &lt;20221025084952.2139888-11-eesposit@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>block: rename bdrv_child_try_change_aio_context in bdrv_try_change_aio_context</title>
<updated>2022-10-27T18:14:11+00:00</updated>
<author>
<name>Emanuele Giuseppe Esposito</name>
</author>
<published>2022-10-25T08:49:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=a41cfda12674a296579bc5459646ded9547b1220'/>
<id>urn:sha1:a41cfda12674a296579bc5459646ded9547b1220</id>
<content type='text'>
No functional changes intended.

Signed-off-by: Emanuele Giuseppe Esposito &lt;eesposit@redhat.com&gt;
Reviewed-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Message-Id: &lt;20221025084952.2139888-10-eesposit@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>block: remove all unused -&gt;can_set_aio_ctx and -&gt;set_aio_ctx callbacks</title>
<updated>2022-10-27T18:14:11+00:00</updated>
<author>
<name>Emanuele Giuseppe Esposito</name>
</author>
<published>2022-10-25T08:49:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=d2aafbb68a0390b8166fbf62c572b306f7bf02ce'/>
<id>urn:sha1:d2aafbb68a0390b8166fbf62c572b306f7bf02ce</id>
<content type='text'>
Together with all _can_set_ and _set_ APIs, as they are not needed
anymore.

Signed-off-by: Emanuele Giuseppe Esposito &lt;eesposit@redhat.com&gt;
Reviewed-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Message-Id: &lt;20221025084952.2139888-9-eesposit@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>bdrv_change_aio_context: use hash table instead of list of visited nodes</title>
<updated>2022-10-27T18:14:11+00:00</updated>
<author>
<name>Emanuele Giuseppe Esposito</name>
</author>
<published>2022-10-25T08:49:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=e08cc001d502958040565636e19a42c06e1ae8b7'/>
<id>urn:sha1:e08cc001d502958040565636e19a42c06e1ae8b7</id>
<content type='text'>
Minor performance improvement, but given that we have hash tables
available, avoid iterating in the visited nodes list every time just
to check if a node has been already visited.

The data structure is not actually a proper hash map, but an hash set,
as we are just adding nodes and not key,value pairs.

Suggested-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
Signed-off-by: Emanuele Giuseppe Esposito &lt;eesposit@redhat.com&gt;
Reviewed-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Message-Id: &lt;20221025084952.2139888-4-eesposit@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>block: use transactions as a replacement of -&gt;{can_}set_aio_context()</title>
<updated>2022-10-27T18:14:11+00:00</updated>
<author>
<name>Emanuele Giuseppe Esposito</name>
</author>
<published>2022-10-25T08:49:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=7e8c182fb5e5950a52623b0d463c2f1fcd15a80a'/>
<id>urn:sha1:7e8c182fb5e5950a52623b0d463c2f1fcd15a80a</id>
<content type='text'>
Simplify the way the aiocontext can be changed in a BDS graph.
There are currently two problems in bdrv_try_set_aio_context:
- There is a confusion of AioContext locks taken and released, because
  we assume that old aiocontext is always taken and new one is
  taken inside.

- It doesn't look very safe to call bdrv_drained_begin while some
  nodes have already switched to the new aiocontext and others haven't.
  This could be especially dangerous because bdrv_drained_begin polls, so
  something else could be executed while graph is in an inconsistent
  state.

Additional minor nitpick: can_set and set_ callbacks both traverse the
graph, both using the ignored list of visited nodes in a different way.

Therefore, get rid of all of this and introduce a new callback,
change_aio_context, that uses transactions to efficiently, cleanly
and most importantly safely change the aiocontext of a graph.

This new callback is a "merge" of the two previous ones:
- Just like can_set_aio_context, recursively traverses the graph.
  Marks all nodes that are visited using a GList, and checks if
  they *could* change the aio_context.
- For each node that passes the above check, drain it and add a new transaction
  that implements a callback that effectively changes the aiocontext.
- Once done, the recursive function returns if *all* nodes can change
  the AioContext. If so, commit the above transactions.
  Regardless of the outcome, call transaction.clean() to undo all drains
  done in the recursion.
- The transaction list is scanned only after all nodes are being drained, so
  we are sure that they all are in the same context, and then
  we switch their AioContext, concluding the drain only after all nodes
  switched to the new AioContext. In this way we make sure that
  bdrv_drained_begin() is always called under the old AioContext, and
  bdrv_drained_end() under the new one.
- Because of the above, we don't need to release and re-acquire the
  old AioContext every time, as everything is done once (and not
  per-node drain and aiocontext change).

Note that the "change" API is not yet invoked anywhere.

Signed-off-by: Emanuele Giuseppe Esposito &lt;eesposit@redhat.com&gt;
Message-Id: &lt;20221025084952.2139888-3-eesposit@redhat.com&gt;
Reviewed-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
</feed>
