<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/include/block/block-io.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-io.h?h=spice_video_codecs</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/include/block/block-io.h?h=spice_video_codecs'/>
<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>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>block: move bdrv_qiov_is_aligned to file-posix</title>
<updated>2022-09-30T16:43:44+00:00</updated>
<author>
<name>Keith Busch</name>
</author>
<published>2022-09-29T20:05:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=a7c5f67a78569f8c275ea4ea9962e9c79b9d03cb'/>
<id>urn:sha1:a7c5f67a78569f8c275ea4ea9962e9c79b9d03cb</id>
<content type='text'>
There is only user of bdrv_qiov_is_aligned(), so move the alignment
function to there and make it static.

Signed-off-by: Keith Busch &lt;kbusch@kernel.org&gt;
Message-Id: &lt;20220929200523.3218710-2-kbusch@meta.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 bdrv_co_pwrite_sync()</title>
<updated>2022-07-12T10:14:56+00:00</updated>
<author>
<name>Alberto Faria</name>
</author>
<published>2022-06-09T15:27:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=e97190a4057d42dce0322a23e6347101225ee39e'/>
<id>urn:sha1:e97190a4057d42dce0322a23e6347101225ee39e</id>
<content type='text'>
Also convert bdrv_pwrite_sync() to being implemented using
generated_co_wrapper.

Signed-off-by: Alberto Faria &lt;afaria@redhat.com&gt;
Reviewed-by: Eric Blake &lt;eblake@redhat.com&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Message-Id: &lt;20220609152744.3891847-9-afaria@redhat.com&gt;
Reviewed-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
Signed-off-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
</content>
</entry>
<entry>
<title>block: Implement bdrv_{pread,pwrite,pwrite_zeroes}() using generated_co_wrapper</title>
<updated>2022-07-12T10:14:56+00:00</updated>
<author>
<name>Alberto Faria</name>
</author>
<published>2022-06-09T15:27:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=1d39c7098bbfa6862cb96066c4f8f6735ea397c5'/>
<id>urn:sha1:1d39c7098bbfa6862cb96066c4f8f6735ea397c5</id>
<content type='text'>
bdrv_{pread,pwrite}() now return -EIO instead of -EINVAL when 'bytes' is
negative, making them consistent with bdrv_{preadv,pwritev}() and
bdrv_co_{pread,pwrite,preadv,pwritev}().

bdrv_pwrite_zeroes() now also calls trace_bdrv_co_pwrite_zeroes() and
clears the BDRV_REQ_MAY_UNMAP flag when appropriate, which it didn't
previously.

Signed-off-by: Alberto Faria &lt;afaria@redhat.com&gt;
Message-Id: &lt;20220609152744.3891847-8-afaria@redhat.com&gt;
Reviewed-by: Eric Blake &lt;eblake@redhat.com&gt;
Reviewed-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
Signed-off-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
</content>
</entry>
<entry>
<title>block: Change bdrv_{pread,pwrite,pwrite_sync}() param order</title>
<updated>2022-07-12T10:14:55+00:00</updated>
<author>
<name>Alberto Faria</name>
</author>
<published>2022-06-09T15:27:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=32cc71def9e3885f9527af713e6d8dc7521ddc08'/>
<id>urn:sha1:32cc71def9e3885f9527af713e6d8dc7521ddc08</id>
<content type='text'>
Swap 'buf' and 'bytes' around for consistency with
bdrv_co_{pread,pwrite}(), and in preparation to implement these
functions using generated_co_wrapper.

Callers were updated using this Coccinelle script:

    @@ expression child, offset, buf, bytes, flags; @@
    - bdrv_pread(child, offset, buf, bytes, flags)
    + bdrv_pread(child, offset, bytes, buf, flags)

    @@ expression child, offset, buf, bytes, flags; @@
    - bdrv_pwrite(child, offset, buf, bytes, flags)
    + bdrv_pwrite(child, offset, bytes, buf, flags)

    @@ expression child, offset, buf, bytes, flags; @@
    - bdrv_pwrite_sync(child, offset, buf, bytes, flags)
    + bdrv_pwrite_sync(child, offset, bytes, buf, flags)

Resulting overly-long lines were then fixed by hand.

Signed-off-by: Alberto Faria &lt;afaria@redhat.com&gt;
Reviewed-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Reviewed-by: Vladimir Sementsov-Ogievskiy &lt;vsementsov@yandex-team.ru&gt;
Message-Id: &lt;20220609152744.3891847-3-afaria@redhat.com&gt;
Reviewed-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
Signed-off-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
</content>
</entry>
<entry>
<title>block: Add a 'flags' param to bdrv_{pread,pwrite,pwrite_sync}()</title>
<updated>2022-07-12T10:14:55+00:00</updated>
<author>
<name>Alberto Faria</name>
</author>
<published>2022-06-09T15:27:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=53fb7844f03241a0e6de2c342c9e1b89df12da4d'/>
<id>urn:sha1:53fb7844f03241a0e6de2c342c9e1b89df12da4d</id>
<content type='text'>
For consistency with other I/O functions, and in preparation to
implement them using generated_co_wrapper.

Callers were updated using this Coccinelle script:

    @@ expression child, offset, buf, bytes; @@
    - bdrv_pread(child, offset, buf, bytes)
    + bdrv_pread(child, offset, buf, bytes, 0)

    @@ expression child, offset, buf, bytes; @@
    - bdrv_pwrite(child, offset, buf, bytes)
    + bdrv_pwrite(child, offset, buf, bytes, 0)

    @@ expression child, offset, buf, bytes; @@
    - bdrv_pwrite_sync(child, offset, buf, bytes)
    + bdrv_pwrite_sync(child, offset, buf, bytes, 0)

Resulting overly-long lines were then fixed by hand.

Signed-off-by: Alberto Faria &lt;afaria@redhat.com&gt;
Reviewed-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Reviewed-by: Vladimir Sementsov-Ogievskiy &lt;vsementsov@yandex-team.ru&gt;
Message-Id: &lt;20220609152744.3891847-2-afaria@redhat.com&gt;
Reviewed-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
Signed-off-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
</content>
</entry>
<entry>
<title>block: drop unused bdrv_co_drain() API</title>
<updated>2022-06-24T15:07:06+00:00</updated>
<author>
<name>Stefan Hajnoczi</name>
</author>
<published>2022-05-21T12:27:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=3399848b7fffcf388f53c5308a9b97bcd346ea7c'/>
<id>urn:sha1:3399848b7fffcf388f53c5308a9b97bcd346ea7c</id>
<content type='text'>
bdrv_co_drain() has not been used since commit 9a0cec664eef ("mirror:
use bdrv_drained_begin/bdrv_drained_end") in 2016. Remove it so there
are fewer drain scenarios to worry about.

Use bdrv_drained_begin()/bdrv_drained_end() instead. They are "mixed"
functions that can be called from coroutine context. Unlike
bdrv_co_drain(), these functions provide control of the length of the
drained section, which is usually the right thing.

Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Message-Id: &lt;20220521122714.3837731-1-stefanha@redhat.com&gt;
Reviewed-by: Emanuele Giuseppe Esposito &lt;eesposit@redhat.com&gt;
Reviewed-by: Alberto Faria &lt;afaria@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>block: Classify bdrv_get_flags() as I/O function</title>
<updated>2022-05-04T13:55:23+00:00</updated>
<author>
<name>Hanna Reitz</name>
</author>
<published>2022-04-27T11:40:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=15aee7ac9587562b1d021959dedc2bbb7e9a9fb3'/>
<id>urn:sha1:15aee7ac9587562b1d021959dedc2bbb7e9a9fb3</id>
<content type='text'>
This function is safe to call in an I/O context, and qcow2_do_open()
does so (invoked in an I/O context by qcow2_co_invalidate_cache()).

Signed-off-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
Message-Id: &lt;20220427114057.36651-2-hreitz@redhat.com&gt;
Reviewed-by: Eric Blake &lt;eblake@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>IO_CODE and IO_OR_GS_CODE for block I/O API</title>
<updated>2022-03-04T17:18:25+00:00</updated>
<author>
<name>Emanuele Giuseppe Esposito</name>
</author>
<published>2022-03-03T15:15:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=384a48fb7423dfb303023eb504e1fc5e6acb4de4'/>
<id>urn:sha1:384a48fb7423dfb303023eb504e1fc5e6acb4de4</id>
<content type='text'>
Mark all I/O functions with IO_CODE, and all "I/O OR GS" with
IO_OR_GS_CODE.

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