Re: [Qemu-block] [PATCH v8 09/21] null: Switch to .bdrv_co_block_status()

2018-03-01 Thread Kevin Wolf
Am 01.03.2018 um 08:25 hat Vladimir Sementsov-Ogievskiy geschrieben: > 26.02.2018 17:05, Kevin Wolf wrote: > > Essentially, assuming a simple backing chain 'base <- overlay', we got > > these combinations to represent in NBD (with my suggestion of the flags > > to use): > > > > 1. Cluster

Re: [Qemu-block] [Qemu-devel] [RFC v4 21/21] blockjobs: add manual_mgmt option to transactions

2018-03-01 Thread Kevin Wolf
Am 28.02.2018 um 20:24 hat John Snow geschrieben: > > > On 02/28/2018 01:29 PM, Kevin Wolf wrote: > > Am 27.02.2018 um 21:24 hat Eric Blake geschrieben: > >> On 02/23/2018 05:51 PM, John Snow wrote: > >>> This allows us to easily force the option for all jobs belonging > >>> to a transaction to

Re: [Qemu-block] [PATCH v8 09/21] null: Switch to .bdrv_co_block_status()

2018-03-01 Thread Vladimir Sementsov-Ogievskiy
01.03.2018 12:48, Kevin Wolf wrote: Am 01.03.2018 um 08:25 hat Vladimir Sementsov-Ogievskiy geschrieben: 26.02.2018 17:05, Kevin Wolf wrote: Essentially, assuming a simple backing chain 'base <- overlay', we got these combinations to represent in NBD (with my suggestion of the flags to use):

Re: [Qemu-block] [Qemu-devel] [RFC v4 18/21] blockjobs: add block-job-finalize

2018-03-01 Thread Kevin Wolf
Am 28.02.2018 um 20:14 hat John Snow geschrieben: > > > On 02/28/2018 01:15 PM, Kevin Wolf wrote: > > Is it because you want to avoid that the user picks an automatic job for > > completing the mixed transaction? > > I wanted to avoid the case that a job without the manual property would > be

Re: [Qemu-block] [PATCH v8 09/21] null: Switch to .bdrv_co_block_status()

2018-03-01 Thread Kevin Wolf
Am 01.03.2018 um 10:57 hat Vladimir Sementsov-Ogievskiy geschrieben: > 01.03.2018 12:48, Kevin Wolf wrote: > > Am 01.03.2018 um 08:25 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > 26.02.2018 17:05, Kevin Wolf wrote: > > > > Essentially, assuming a simple backing chain 'base <- overlay', we

Re: [Qemu-block] [Qemu-devel] [PATCH 0/2] block: curl: Proof of concept for connecting to oVirt.

2018-03-01 Thread Richard W.M. Jones
On Thu, Mar 01, 2018 at 06:21:15AM -0800, no-re...@patchew.org wrote: > /tmp/qemu-test/src/block/curl.c: In function 'curl_open': > /tmp/qemu-test/src/block/curl.c:770:15: error: assignment discards 'const' > qualifier from pointer target type [-Werror=discarded-qualifiers] > s->cainfo =

[Qemu-block] [PATCH 1/2] block: curl: Allow arbitrary HTTP request headers to be set.

2018-03-01 Thread Richard W.M. Jones
Allow arbitrary HTTP request headers to be set, like this: qemu-img create -f qcow2 \ -b 'json:{ "file.driver":"http", "file.url":"http://192.168.0.249/scratch/test.img;, "file.header": ["Authorization: letmein"] }' \ test.qcow2 which adds the

[Qemu-block] [PATCH 2/2] block: curl: Allow Certificate Authority bundle to be passed in.

2018-03-01 Thread Richard W.M. Jones
This allows a Certificate Authority bundle to be passed to the curl driver, allowing authentication against servers that check certificates. For example this allows you to access a disk on an oVirt node: qemu-img create -f qcow2 \ -b 'json:{ "file.driver": "https",

[Qemu-block] [PATCH 0/2] block: curl: Proof of concept for connecting to oVirt.

2018-03-01 Thread Richard W.M. Jones
This is a proof of concept patch which needs a bunch more testing. I'm just posting it to get feedback. It's almost possible to connect qemu to an oVirt / RHV server and upload or download or otherwise modify disk images. However the curl driver is missing a couple of features to satisfy oVirt's

Re: [Qemu-block] [Qemu-devel] [PATCH 0/2] block: curl: Proof of concept for connecting to oVirt.

2018-03-01 Thread no-reply
Hi, This series failed docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. Type: series Message-id: 20180301135856.22698-1-rjo...@redhat.com Subject: [Qemu-devel] [PATCH 0/2] block: curl:

Re: [Qemu-block] [Qemu-devel] [PATCH 0/2] block: curl: Proof of concept for connecting to oVirt.

2018-03-01 Thread no-reply
Hi, This series failed build test on s390x host. Please find the details below. Type: series Message-id: 20180301135856.22698-1-rjo...@redhat.com Subject: [Qemu-devel] [PATCH 0/2] block: curl: Proof of concept for connecting to oVirt. === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will

Re: [Qemu-block] [PATCH 5/9] nbd/client: fix error messages in nbd_handle_reply_err

2018-03-01 Thread Vladimir Sementsov-Ogievskiy
16.02.2018 20:38, Eric Blake wrote: On 02/15/2018 07:51 AM, Vladimir Sementsov-Ogievskiy wrote: 1. NBD_REP_ERR_INVALID is not only about length, so, make message more     general 2. hex format is not very good: it's hard to read something like     "option a (set meta context)", so switch to

Re: [Qemu-block] [PATCH v2 1/2] nbd: BLOCK_STATUS constants

2018-03-01 Thread Vladimir Sementsov-Ogievskiy
26.02.2018 19:57, Eric Blake wrote: From: Vladimir Sementsov-Ogievskiy Expose the new constants and structs that will be used by both server and client implementations of NBD_CMD_BLOCK_STATUS (the command is currently experimental at

Re: [Qemu-block] [PATCH 3/9] nbd: BLOCK_STATUS for standard get_block_status function: server part

2018-03-01 Thread Vladimir Sementsov-Ogievskiy
16.02.2018 20:01, Eric Blake wrote: On 02/16/2018 08:43 AM, Vladimir Sementsov-Ogievskiy wrote: 16.02.2018 16:21, Eric Blake wrote: On 02/15/2018 07:51 AM, Vladimir Sementsov-Ogievskiy wrote: Minimal realization: only one extent in server answer is supported. Signed-off-by: Vladimir

Re: [Qemu-block] [PATCH 9/9] iotests: new test 206 for NBD BLOCK_STATUS

2018-03-01 Thread Vladimir Sementsov-Ogievskiy
17.02.2018 00:02, Eric Blake wrote: On 02/15/2018 07:51 AM, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy ---   tests/qemu-iotests/206 | 34 ++   tests/qemu-iotests/206.out |  2 ++  

Re: [Qemu-block] [PATCH v2 2/2] nbd/client: fix error messages in nbd_handle_reply_err

2018-03-01 Thread Vladimir Sementsov-Ogievskiy
26.02.2018 19:57, Eric Blake wrote: From: Vladimir Sementsov-Ogievskiy 1. NBD_REP_ERR_INVALID is not only about length, so, make message more general 2. hex format is not very good: it's hard to read something like "option a (set meta context)", so switch to

Re: [Qemu-block] [Qemu-devel] [PATCH 2/2] block: curl: Allow Certificate Authority bundle to be passed in.

2018-03-01 Thread Daniel P . Berrangé
On Thu, Mar 01, 2018 at 01:58:56PM +, Richard W.M. Jones wrote: > This allows a Certificate Authority bundle to be passed to the curl > driver, allowing authentication against servers that check > certificates. For example this allows you to access a disk on an > oVirt node: > > qemu-img

Re: [Qemu-block] [Qemu-devel] [PATCH 2/2] block: curl: Allow Certificate Authority bundle to be passed in.

2018-03-01 Thread Richard W.M. Jones
On Thu, Mar 01, 2018 at 03:34:38PM +, Daniel P. Berrangé wrote: > On Thu, Mar 01, 2018 at 01:58:56PM +, Richard W.M. Jones wrote: > > This allows a Certificate Authority bundle to be passed to the curl > > driver, allowing authentication against servers that check > > certificates. For

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] block: curl: Allow arbitrary HTTP request headers to be set.

2018-03-01 Thread Richard W.M. Jones
On Thu, Mar 01, 2018 at 03:24:48PM +, Nir Soffer wrote: > Other issue that you need to consider is that you cannot > create images via the http. Images are created only via > engine API/UI. We've got a separate bit of Python creating the image so I think we're ok here. > What ovirt-imageio

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 0/2] Increase usability of external snapshots

2018-03-01 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180227115651.30762-1-rpaletho...@suse.com Subject: [Qemu-devel] [RFC PATCH 0/2] Increase usability of external snapshots === TEST SCRIPT BEGIN === #!/bin/bash BASE=base

[Qemu-block] [PATCH 5/7] qcow2: Check snapshot L1 table in qcow2_snapshot_goto()

2018-03-01 Thread Alberto Garcia
This function copies a snapshot's L1 table into the active one without validating it first. We now have a function to take care of this, so let's use it. Signed-off-by: Alberto Garcia --- block/qcow2-snapshot.c | 6 ++ tests/qemu-iotests/080 | 2 ++

[Qemu-block] [PATCH 4/7] qcow2: Check snapshot L1 tables in qcow2_check_metadata_overlap()

2018-03-01 Thread Alberto Garcia
The inactive-l2 overlap check iterates uses the L1 tables from all snapshots, but it does not validate them first. We now have a function to take care of this, so let's use it. Signed-off-by: Alberto Garcia --- block/qcow2-refcount.c | 10 +-

[Qemu-block] [PATCH 7/7] qcow2: Make qemu-img check detect corrupted L1 tables in snapshots

2018-03-01 Thread Alberto Garcia
'qemu-img check' cannot detect if a snapshot's L1 table is corrupted. This patch checks the table's offset and size and reports corruption if the values are not valid. This patch doesn't add code to fix that corruption yet, only to detect and report it. Signed-off-by: Alberto Garcia

[Qemu-block] [PATCH 2/7] qcow2: Check L1 table offset in qcow2_snapshot_load_tmp()

2018-03-01 Thread Alberto Garcia
This function checks that the size of a snapshot's L1 table is not too large, but it doesn't validate the offset. We now have a function to take care of this, so let's use it. Signed-off-by: Alberto Garcia --- block/qcow2-snapshot.c | 8 +--- tests/qemu-iotests/080

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] block: curl: Allow arbitrary HTTP request headers to be set.

2018-03-01 Thread Richard W.M. Jones
On Thu, Mar 01, 2018 at 04:11:18PM +, Daniel P. Berrangé wrote: > On Thu, Mar 01, 2018 at 01:58:55PM +, Richard W.M. Jones wrote: > > Allow arbitrary HTTP request headers to be set, like this: > > > > qemu-img create -f qcow2 \ > > -b 'json:{ "file.driver":"http", > >

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] block: curl: Allow arbitrary HTTP request headers to be set.

2018-03-01 Thread Daniel P . Berrangé
On Thu, Mar 01, 2018 at 01:58:55PM +, Richard W.M. Jones wrote: > Allow arbitrary HTTP request headers to be set, like this: > > qemu-img create -f qcow2 \ > -b 'json:{ "file.driver":"http", > "file.url":"http://192.168.0.249/scratch/test.img;, >

[Qemu-block] [PATCH 1/7] qcow2: Generalize validate_table_offset() into qcow2_validate_table()

2018-03-01 Thread Alberto Garcia
This function checks that the offset and size of a table are valid. While the offset checks are fine, the size check is too generic, since it only verifies that the total size in bytes fits in a 64-bit integer. In practice all tables used in qcow2 have much smaller size limits, so the size needs

[Qemu-block] [PATCH 3/7] qcow2: Check L1 table parameters in qcow2_expand_zero_clusters()

2018-03-01 Thread Alberto Garcia
This function iterates over all snapshots of a qcow2 file in order to expand all zero clusters, but it does not validate the snapshots' L1 tables first. We now have a function to take care of this, so let's use it. We can also take the opportunity to replace the sector-based bdrv_read() with

[Qemu-block] [PATCH 0/7] Add checks for corruption in the snapshot table

2018-03-01 Thread Alberto Garcia
Hey ho! As we have already discussed in the mailing list, the offset and size values of snapshots' L1 tables are almost never validated in the QEMU code. One way to deal with this is to validate them when the image is being opened (in qcow2_read_snapshots()) and return an error if there's

Re: [Qemu-block] [PATCH v3 0/5] block: fix blk_aio_*() segfault when blk->root == NULL

2018-03-01 Thread Kevin Wolf
Am 16.02.2018 um 17:50 hat Stefan Hajnoczi geschrieben: > v3: > * Add Patch 1 to rename aio_context_in_iothread() to >in_aio_context_home_thread() [Eric] > v2: > * Introduce AIO_WAIT_WHILE() since aio_poll(ctx, true) is not allowed [Paolo] > > Using bdrv_inc_in_flight(blk_bs(blk)) doesn't

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] block: curl: Allow arbitrary HTTP request headers to be set.

2018-03-01 Thread Nir Soffer
On Thu, Mar 1, 2018 at 4:00 PM Richard W.M. Jones wrote: > Allow arbitrary HTTP request headers to be set, like this: > > qemu-img create -f qcow2 \ > -b 'json:{ "file.driver":"http", > "file.url":"http://192.168.0.249/scratch/test.img;, >

Re: [Qemu-block] [PATCH v2 0/4] vl: introduce vm_shutdown()

2018-03-01 Thread Stefan Hajnoczi
On Thu, Mar 01, 2018 at 09:15:17AM +0800, Fam Zheng wrote: > On Wed, 02/28 18:19, Stefan Hajnoczi wrote: > > v2: > > * Tackle the .ioeventfd_stop() vs vq handler race by removing the ioeventfd > >from a BH in the IOThread [Fam] > > > > There are several race conditions in

Re: [Qemu-block] [Qemu-devel] [PATCH 2/2] block: curl: Allow Certificate Authority bundle to be passed in.

2018-03-01 Thread Nir Soffer
On Thu, Mar 1, 2018 at 4:02 PM Richard W.M. Jones wrote: > This allows a Certificate Authority bundle to be passed to the curl > driver, allowing authentication against servers that check > certificates. For example this allows you to access a disk on an > oVirt node: > >

[Qemu-block] [PULL 4/4] nbd/client: fix error messages in nbd_handle_reply_err

2018-03-01 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy 1. NBD_REP_ERR_INVALID is not only about length, so, make message more general 2. hex format is not very good: it's hard to read something like "option a (set meta context)", so switch to dec. Signed-off-by: Vladimir

[Qemu-block] [PULL 1/4] nbd: Honor server's advertised minimum block size

2018-03-01 Thread Eric Blake
Commit 79ba8c98 (v2.7) changed the setting of request_alignment to occur only during bdrv_refresh_limits(), rather than at at bdrv_open() time; but at the time, NBD was unaffected, because it still used sector-based callbacks, so the block layer defaulted NBD to use 512 request_alignment. Later,

[Qemu-block] [PULL 23/30] Include less of the generated modular QAPI headers

2018-03-01 Thread Eric Blake
From: Markus Armbruster In my "build everything" tree, a change to the types in qapi-schema.json triggers a recompile of about 4800 out of 5100 objects. The previous commit split up qmp-commands.h, qmp-event.h, qmp-visit.h, qapi-types.h. Each of these headers still includes

[Qemu-block] [PULL 3/4] nbd: BLOCK_STATUS constants

2018-03-01 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Expose the new constants and structs that will be used by both server and client implementations of NBD_CMD_BLOCK_STATUS (the command is currently experimental at

Re: [Qemu-block] [Qemu-devel] [PATCH 2/8] qcow2: make qcow2_co_create2() a coroutine_fn

2018-03-01 Thread Eric Blake
On 03/01/2018 10:36 AM, Paolo Bonzini wrote: From: Stefan Hajnoczi qcow2_create2() calls qemu_co_mutex_lock(). Only a coroutine_fn may call another coroutine_fn. In fact, qcow2_create2 is always called from coroutine context. Rename the function to add the "co" moniker

Re: [Qemu-block] [PATCH 2/7] qcow2: Check L1 table offset in qcow2_snapshot_load_tmp()

2018-03-01 Thread Eric Blake
On 03/01/2018 10:27 AM, Alberto Garcia wrote: This function checks that the size of a snapshot's L1 table is not too large, but it doesn't validate the offset. We now have a function to take care of this, so let's use it. Signed-off-by: Alberto Garcia ---

[Qemu-block] [PULL 2/4] nbd: change indenting in nbd.h

2018-03-01 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Prepared indenting for the following patch. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <1518702707-7077-3-git-send-email-vsement...@virtuozzo.com> Signed-off-by: Eric Blake

Re: [Qemu-block] [Qemu-devel] [RFC v4 18/21] blockjobs: add block-job-finalize

2018-03-01 Thread John Snow
On 03/01/2018 05:01 AM, Kevin Wolf wrote: > Am 28.02.2018 um 20:14 hat John Snow geschrieben: >> >> >> On 02/28/2018 01:15 PM, Kevin Wolf wrote: >>> Is it because you want to avoid that the user picks an automatic job for >>> completing the mixed transaction? >> >> I wanted to avoid the case

Re: [Qemu-block] [Qemu-devel] [PATCH 1/8] block: rename .bdrv_create() to .bdrv_co_create_opts()

2018-03-01 Thread Eric Blake
On 03/01/2018 10:36 AM, Paolo Bonzini wrote: From: Stefan Hajnoczi BlockDriver->bdrv_create() has been called from coroutine context since commit 5b7e1542cfa41a281af9629d31cef03704d976e6 ("block: make bdrv_create adopt coroutine"). Make this explicit by renaming to

Re: [Qemu-block] [Qemu-devel] [PATCH 0/2] block: curl: Proof of concept for connecting to oVirt.

2018-03-01 Thread no-reply
Hi, This series failed build test on ppcle host. Please find the details below. Message-id: 20180301135856.22698-1-rjo...@redhat.com Subject: [Qemu-devel] [PATCH 0/2] block: curl: Proof of concept for connecting to oVirt. Type: series === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will

Re: [Qemu-block] [PATCH 1/7] qcow2: Generalize validate_table_offset() into qcow2_validate_table()

2018-03-01 Thread Eric Blake
On 03/01/2018 10:27 AM, Alberto Garcia wrote: This function checks that the offset and size of a table are valid. While the offset checks are fine, the size check is too generic, since it only verifies that the total size in bytes fits in a 64-bit integer. In practice all tables used in qcow2

Re: [Qemu-block] [PATCH 9/9] iotests: new test 206 for NBD BLOCK_STATUS

2018-03-01 Thread Eric Blake
On 03/01/2018 05:51 AM, Vladimir Sementsov-Ogievskiy wrote: 17.02.2018 00:02, Eric Blake wrote: On 02/15/2018 07:51 AM, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy ---   tests/qemu-iotests/206 | 34

Re: [Qemu-block] [PATCH] iotests: Skip test for ENOMEM error

2018-03-01 Thread Eric Blake
On 02/28/2018 07:14 PM, Fam Zheng wrote: The AFL image is to exercise the code validating image size, which doesn't work on 32 bit or when out of memory (there is a large allocation before the interesting point). So check that and skip the test, instead of faking the result. Signed-off-by: Fam

Re: [Qemu-block] [RFC PATCH 2/2] migrate: Tests for migrating to an already used QEMU

2018-03-01 Thread Dr. David Alan Gilbert
* Richard Palethorpe (rpaletho...@suse.com) wrote: > Currently this appears to work for X86_64, but PPC64 fails due to some > unexpected data on the serial port after migration. This probably requires > quite a bit more work. I think the challenge is you need to drain the serial output to make

[Qemu-block] [PULL 01/30] Include qapi/qmp/qerror.h exactly where needed

2018-03-01 Thread Eric Blake
From: Markus Armbruster Signed-off-by: Markus Armbruster Message-Id: <20180211093607.27351-2-arm...@redhat.com> Reviewed-by: Eric Blake Reviewed-by: Marc-André Lureau Signed-off-by: Eric Blake

Re: [Qemu-block] [PATCH 3/7] qcow2: Check L1 table parameters in qcow2_expand_zero_clusters()

2018-03-01 Thread Eric Blake
On 03/01/2018 10:27 AM, Alberto Garcia wrote: This function iterates over all snapshots of a qcow2 file in order to expand all zero clusters, but it does not validate the snapshots' L1 tables first. We now have a function to take care of this, so let's use it. We can also take the opportunity

Re: [Qemu-block] [PATCH 4/7] qcow2: Check snapshot L1 tables in qcow2_check_metadata_overlap()

2018-03-01 Thread Eric Blake
On 03/01/2018 10:27 AM, Alberto Garcia wrote: The inactive-l2 overlap check iterates uses the L1 tables from all snapshots, but it does not validate them first. We now have a function to take care of this, so let's use it. Signed-off-by: Alberto Garcia ---

Re: [Qemu-block] [PATCH 7/7] qcow2: Make qemu-img check detect corrupted L1 tables in snapshots

2018-03-01 Thread Eric Blake
On 03/01/2018 10:27 AM, Alberto Garcia wrote: 'qemu-img check' cannot detect if a snapshot's L1 table is corrupted. This patch checks the table's offset and size and reports corruption if the values are not valid. This patch doesn't add code to fix that corruption yet, only to detect and report

Re: [Qemu-block] [PATCH 6/7] qcow2: Check snapshot L1 table in qcow2_snapshot_delete()

2018-03-01 Thread Eric Blake
On 03/01/2018 10:27 AM, Alberto Garcia wrote: This function deletes a snapshot from disk, removing its entry from the snapshot table, freeing its L1 table and decreasing the refcounts of all clusters. The L1 table offset and size are however not validated. If we use invalid values in this

[Qemu-block] [PULL v2 24/30] Include less of the generated modular QAPI headers

2018-03-01 Thread Eric Blake
From: Markus Armbruster In my "build everything" tree, a change to the types in qapi-schema.json triggers a recompile of about 4800 out of 5100 objects. The previous commit split up qmp-commands.h, qmp-event.h, qmp-visit.h, qapi-types.h. Each of these headers still includes

Re: [Qemu-block] [PATCH v2 0/4] vl: introduce vm_shutdown()

2018-03-01 Thread Fam Zheng
On Thu, 03/01 14:54, Stefan Hajnoczi wrote: > On Thu, Mar 01, 2018 at 09:15:17AM +0800, Fam Zheng wrote: > > On Wed, 02/28 18:19, Stefan Hajnoczi wrote: > > > v2: > > > * Tackle the .ioeventfd_stop() vs vq handler race by removing the > > > ioeventfd > > >from a BH in the IOThread [Fam] > >

Re: [Qemu-block] [PATCH 5/7] qcow2: Check snapshot L1 table in qcow2_snapshot_goto()

2018-03-01 Thread Eric Blake
On 03/01/2018 10:27 AM, Alberto Garcia wrote: This function copies a snapshot's L1 table into the active one without validating it first. We now have a function to take care of this, so let's use it. Signed-off-by: Alberto Garcia --- block/qcow2-snapshot.c | 6 ++

Re: [Qemu-block] [Qemu-devel] [PATCH 3/8] qcow2: introduce qcow2_write_caches and qcow2_flush_caches

2018-03-01 Thread Eric Blake
On 03/01/2018 10:36 AM, Paolo Bonzini wrote: They will be used to avoid recursively taking s->lock during bdrv_open or bdrv_check. Signed-off-by: Paolo Bonzini Message-Id: <1516279431-30424-7-git-send-email-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini

[Qemu-block] [PATCH 1/8] block: rename .bdrv_create() to .bdrv_co_create_opts()

2018-03-01 Thread Paolo Bonzini
From: Stefan Hajnoczi BlockDriver->bdrv_create() has been called from coroutine context since commit 5b7e1542cfa41a281af9629d31cef03704d976e6 ("block: make bdrv_create adopt coroutine"). Make this explicit by renaming to .bdrv_co_create_opts() and add the coroutine_fn

[Qemu-block] [PATCH v4 0/8] Call check and invalidate_cache from coroutine context

2018-03-01 Thread Paolo Bonzini
Check and invalidate_cache share some parts of the implementation with the regular I/O path. This is sometimes complicated because the I/O path wants to use a CoMutex but that is not possible outside coroutine context. By moving things to coroutine context, we can remove special cases. In fact,

[Qemu-block] [PATCH 7/8] block: convert bdrv_invalidate_cache callback to coroutine_fn

2018-03-01 Thread Paolo Bonzini
QED's bdrv_invalidate_cache implementation would like to reuse functions that acquire/release the metadata locks. Call it from coroutine context to simplify the logic. Signed-off-by: Paolo Bonzini Message-Id: <1516279431-30424-6-git-send-email-pbonz...@redhat.com>

[Qemu-block] [PATCH 3/8] qcow2: introduce qcow2_write_caches and qcow2_flush_caches

2018-03-01 Thread Paolo Bonzini
They will be used to avoid recursively taking s->lock during bdrv_open or bdrv_check. Signed-off-by: Paolo Bonzini Message-Id: <1516279431-30424-7-git-send-email-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- block/qcow2-refcount.c | 28

[Qemu-block] [PATCH 5/8] qcow2: make qcow2_do_open a coroutine_fn

2018-03-01 Thread Paolo Bonzini
It is called from qcow2_invalidate_cache in coroutine context (incoming migration runs in a coroutine), so it's cleaner if metadata is always loaded from a coroutine. Signed-off-by: Paolo Bonzini Message-Id: <1516279431-30424-4-git-send-email-pbonz...@redhat.com>

[Qemu-block] [PATCH 2/8] qcow2: make qcow2_co_create2() a coroutine_fn

2018-03-01 Thread Paolo Bonzini
From: Stefan Hajnoczi qcow2_create2() calls qemu_co_mutex_lock(). Only a coroutine_fn may call another coroutine_fn. In fact, qcow2_create2 is always called from coroutine context. Rename the function to add the "co" moniker and add coroutine_fn. Reported-by: Marc-André

[Qemu-block] [PATCH 6/8] qed: make bdrv_qed_do_open a coroutine_fn

2018-03-01 Thread Paolo Bonzini
It is called from qed_invalidate_cache in coroutine context (incoming migration runs in a coroutine), so it's cleaner if metadata is always loaded from a coroutine. Signed-off-by: Paolo Bonzini Message-Id: <1516279431-30424-5-git-send-email-pbonz...@redhat.com>

[Qemu-block] [PATCH 8/8] block: convert bdrv_check callback to coroutine_fn

2018-03-01 Thread Paolo Bonzini
Suggested-by: Kevin Wolf Signed-off-by: Paolo Bonzini Message-Id: <1516279431-30424-8-git-send-email-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- block.c | 43 ---

[Qemu-block] [PATCH 4/8] qcow2: fix flushing after dirty bitmap metadata writes

2018-03-01 Thread Paolo Bonzini
update_header_sync itself does not need to flush the caches to disk. The only paths that allocate clusters are: - bitmap_list_store with in_place=false, called by update_ext_header_and_dir - store_bitmap_data, called by store_bitmap - store_bitmap, called by qcow2_store_persistent_dirty_bitmaps

Re: [Qemu-block] [Qemu-devel] [PATCH 0/2] block: curl: Proof of concept for connecting to oVirt.

2018-03-01 Thread no-reply
Hi, This series failed build test on ppcbe host. Please find the details below. Type: series Message-id: 20180301135856.22698-1-rjo...@redhat.com Subject: [Qemu-devel] [PATCH 0/2] block: curl: Proof of concept for connecting to oVirt. === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will

Re: [Qemu-block] [RFC PATCH 1/2] migrate: Allow incoming migration without defer

2018-03-01 Thread Dr. David Alan Gilbert
* Richard Palethorpe (rpaletho...@suse.com) wrote: > Allow a QEMU instance which has been started and used without the "-incoming" > flag to accept an incoming migration with the "migrate-incoming" QMP > command. This allows the user to dump the VM state to an external file then > revert to that