<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/block/qcow2.c, branch spice_video_codecs</title>
<subtitle>Experimental fork of QEMU with video encoding patches</subtitle>
<id>https://git.openslx.org/bwlp/qemu.git/atom/block/qcow2.c?h=spice_video_codecs</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/block/qcow2.c?h=spice_video_codecs'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2022-10-27T18:14:11+00:00</updated>
<entry>
<title>qcow2: switch to *_co_* functions</title>
<updated>2022-10-27T18:14:11+00:00</updated>
<author>
<name>Alberto Faria</name>
</author>
<published>2022-10-13T12:37:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=38505e2a147c4f9fade382ede4a40e287c7bd846'/>
<id>urn:sha1:38505e2a147c4f9fade382ede4a40e287c7bd846</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-20-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>qcow2: add coroutine_fn annotation for indirect-called functions</title>
<updated>2022-10-27T18:14:11+00:00</updated>
<author>
<name>Alberto Faria</name>
</author>
<published>2022-10-13T12:36:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=014688a1b56bab8f3e15810971667ac15acbaa88'/>
<id>urn:sha1:014688a1b56bab8f3e15810971667ac15acbaa88</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-10-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: introduce bdrv_open_file_child() helper</title>
<updated>2022-10-27T18:14:11+00:00</updated>
<author>
<name>Vladimir Sementsov-Ogievskiy</name>
</author>
<published>2022-07-26T20:11:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=83930780325b144a5908c45b3957b9b6457b3831'/>
<id>urn:sha1:83930780325b144a5908c45b3957b9b6457b3831</id>
<content type='text'>
Almost all drivers call bdrv_open_child() similarly. Let's create a
helper for this.

The only not updated drivers that call bdrv_open_child() to set
bs-&gt;file are raw-format and snapshot-access:
    raw-format sometimes want to have filtered child but
        don't set drv-&gt;is_filter to true.
    snapshot-access wants only DATA | PRIMARY

Possibly we should implement drv-&gt;is_filter_func() handler, to consider
raw-format as filter when it works as filter.. But it's another story.

Note also, that we decrease assignments to bs-&gt;file in code: it helps
us restrict modifying this field in further commit.

Signed-off-by: Vladimir Sementsov-Ogievskiy &lt;vsementsov@yandex-team.ru&gt;
Reviewed-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
Message-Id: &lt;20220726201134.924743-3-vsementsov@yandex-team.ru&gt;
Reviewed-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>qcow2: add missing coroutine_fn annotations</title>
<updated>2022-10-07T10:11:40+00:00</updated>
<author>
<name>Paolo Bonzini</name>
</author>
<published>2022-09-22T08:49:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=050ed2e7362c9086c07a86965ac754d1e46a7138'/>
<id>urn:sha1:050ed2e7362c9086c07a86965ac754d1e46a7138</id>
<content type='text'>
Callers of coroutine_fn must be coroutine_fn themselves, or the call
must be within "if (qemu_in_coroutine())".  Apply coroutine_fn to
functions where this holds.

Reviewed-by: Alberto Faria &lt;afaria@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Message-Id: &lt;20220922084924.201610-15-pbonzini@redhat.com&gt;
[kwolf: Fixed up coding style]
Reviewed-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>block/qcow2: Keep auto_backing_file if possible</title>
<updated>2022-09-30T16:43:44+00:00</updated>
<author>
<name>Hanna Reitz</name>
</author>
<published>2022-08-03T14:44:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=ec64b1ca08138b5f57d270a5756a9138f897ee5a'/>
<id>urn:sha1:ec64b1ca08138b5f57d270a5756a9138f897ee5a</id>
<content type='text'>
qcow2_do_open() is used by qcow2_co_invalidate_cache(), i.e. may be run
on an image that has been opened before.  When reading the backing file
string from the image header, compare it against the existing
bs-&gt;backing_file, and update bs-&gt;auto_backing_file only if they differ.

auto_backing_file should ideally contain the filename the backing BDS
will actually have after opening, i.e. a post-bdrv_refresh_filename()
version of what is in the image header.  So for example, if the image
header reports the following backing file string:

    json:{"driver": "qcow2", "file": {
        "driver": "file", "filename": "/tmp/backing.qcow2"
    }}

Then auto_backing_file should contain simply "/tmp/backing.qcow2".

Because bdrv_refresh_filename() only works on existing BDSs, though, the
way how we get this auto_backing_file value is to have the format driver
set it to whatever is in the image header, and when the backing BDS is
opened based on that, we update it with the filename the backing BDS
actually got.

However, qcow2's qcow2_co_invalidate_cache() implementation breaks this
because it just resets auto_backing_file to whatever is in the image
file without opening a BDS based on it, so we never get
auto_backing_file back to the "refreshed" version, and in the example
above, it would stay "json:{...}".

Then, bs-&gt;backing-&gt;bs-&gt;filename will differ from bs-&gt;auto_backing_file,
making bdrv_backing_overridden(bs) return true, which will lead
bdrv_refresh_filename(bs) to generate a json:{} filename for bs, even
though that may not have been necessary.  This is reported in the issue
linked below.

Therefore, skip updating auto_backing_file if nothing has changed in the
image header since we last read it.

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1117
Signed-off-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
Message-Id: &lt;20220803144446.20723-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>qcow2: fix memory leak in qcow2_read_extensions</title>
<updated>2022-09-30T16:02:30+00:00</updated>
<author>
<name>lu zhipeng</name>
</author>
<published>2022-09-21T14:45:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=38f034e728e5a60c27c3ac43ed2bc4ae7a6659b0'/>
<id>urn:sha1:38f034e728e5a60c27c3ac43ed2bc4ae7a6659b0</id>
<content type='text'>
Free feature_table if it is failed in bdrv_pread.

Signed-off-by: lu zhipeng &lt;luzhipeng@cestc.cn&gt;
Message-Id: &lt;20220921144515.1166-1-luzhipeng@cestc.cn&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: Change blk_{pread,pwrite}() param order</title>
<updated>2022-07-12T10:14:56+00:00</updated>
<author>
<name>Alberto Faria</name>
</author>
<published>2022-07-05T16:15:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=a9262f551eba44d4d0f9e396d7124c059a93e204'/>
<id>urn:sha1:a9262f551eba44d4d0f9e396d7124c059a93e204</id>
<content type='text'>
Swap 'buf' and 'bytes' around for consistency with
blk_co_{pread,pwrite}(), and in preparation to implement these functions
using generated_co_wrapper.

Callers were updated using this Coccinelle script:

    @@ expression blk, offset, buf, bytes, flags; @@
    - blk_pread(blk, offset, buf, bytes, flags)
    + blk_pread(blk, offset, bytes, buf, flags)

    @@ expression blk, offset, buf, bytes, flags; @@
    - blk_pwrite(blk, offset, buf, bytes, flags)
    + blk_pwrite(blk, offset, bytes, buf, flags)

It had no effect on hw/block/nand.c, presumably due to the #if, so that
file was updated manually.

Overly-long lines were then fixed by hand.

Signed-off-by: Alberto Faria &lt;afaria@redhat.com&gt;
Reviewed-by: Eric Blake &lt;eblake@redhat.com&gt;
Reviewed-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
Message-Id: &lt;20220705161527.1054072-4-afaria@redhat.com&gt;
Signed-off-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
</content>
</entry>
<entry>
<title>block/qcow2: Use bdrv_pwrite_sync() in qcow2_mark_dirty()</title>
<updated>2022-07-12T10:14:56+00:00</updated>
<author>
<name>Alberto Faria</name>
</author>
<published>2022-06-09T15:27:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=86da43220c610321f31fad4be7f1b52554f4e7a4'/>
<id>urn:sha1:86da43220c610321f31fad4be7f1b52554f4e7a4</id>
<content type='text'>
Use bdrv_pwrite_sync() instead of calling bdrv_pwrite() and bdrv_flush()
separately.

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-11-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: Use bdrv_co_pwrite_sync() when caller is coroutine_fn</title>
<updated>2022-07-12T10:14:56+00:00</updated>
<author>
<name>Alberto Faria</name>
</author>
<published>2022-06-09T15:27:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=a8f0e83cefa245dbaff8001c076e194ff54e8d1f'/>
<id>urn:sha1:a8f0e83cefa245dbaff8001c076e194ff54e8d1f</id>
<content type='text'>
Convert uses of bdrv_pwrite_sync() into bdrv_co_pwrite_sync() when the
callers are already coroutine_fn.

Signed-off-by: Alberto Faria &lt;afaria@redhat.com&gt;
Reviewed-by: Vladimir Sementsov-Ogievskiy &lt;v.sementsov-og@mail.ru&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Message-Id: &lt;20220609152744.3891847-10-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>crypto: Make block callbacks return 0 on success</title>
<updated>2022-07-12T10:14:55+00:00</updated>
<author>
<name>Alberto Faria</name>
</author>
<published>2022-06-09T15:27:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=757dda54b43867936012970a1b457f3d16e7398d'/>
<id>urn:sha1:757dda54b43867936012970a1b457f3d16e7398d</id>
<content type='text'>
They currently return the value of their headerlen/buflen parameter on
success. Returning 0 instead makes it clear that short reads/writes are
not possible.

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-5-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>
</feed>
