Re: [Qemu-block] [PATCH v3 04/16] block/mirror: Pull out mirror_perform()

2018-03-19 Thread Jeff Cody
On Wed, Feb 28, 2018 at 07:04:55PM +0100, Max Reitz wrote: > When converting mirror's I/O to coroutines, we are going to need a point > where these coroutines are created. mirror_perform() is going to be > that point. > > Signed-off-by: Max Reitz > Reviewed-by: Fam Zheng > Reviewed-by: Vladimir

Re: [Qemu-block] [PATCH v3 02/16] block: BDS deletion in bdrv_do_drained_begin()

2018-03-19 Thread Jeff Cody
On Wed, Feb 28, 2018 at 07:04:53PM +0100, Max Reitz wrote: > Draining a BDS (in the main loop) may cause it to go be deleted. That > is rather suboptimal if we still plan to access it afterwards, so let us > enclose the main body of the function with a bdrv_ref()/bdrv_unref() > pair. > > Signed-o

Re: [Qemu-block] [PATCH v3 01/16] block: BDS deletion during bdrv_drain_recurse

2018-03-19 Thread Jeff Cody
On Wed, Feb 28, 2018 at 07:04:52PM +0100, Max Reitz wrote: > Draining a BDS child may lead to other children of the same parent being > detached and/or deleted. We should prepare for the former case (by > copying the children list before iterating through it) and prevent the > latter (by bdrv_ref(

Re: [Qemu-block] [PATCH v3 2/7] qapi: Add qobject_to()

2018-03-19 Thread Max Reitz
On 2018-03-19 20:36, Eric Blake wrote: > On 02/26/2018 05:58 AM, Max Reitz wrote: >> On 2018-02-24 21:57, Eric Blake wrote: >>> On 02/24/2018 09:40 AM, Max Reitz wrote: This is a dynamic casting macro that, given a QObject type, returns an object as that type or NULL if the object is of a

Re: [Qemu-block] [PATCH v3 2/7] qapi: Add qobject_to()

2018-03-19 Thread Eric Blake
On 02/26/2018 05:58 AM, Max Reitz wrote: On 2018-02-24 21:57, Eric Blake wrote: On 02/24/2018 09:40 AM, Max Reitz wrote: This is a dynamic casting macro that, given a QObject type, returns an object as that type or NULL if the object is of a different type (or NULL itself). +#define qobject

Re: [Qemu-block] [PATCH v1 1/1] iotests: fix test case 185

2018-03-19 Thread Christian Borntraeger
On 03/19/2018 05:10 PM, Stefan Hajnoczi wrote: > On Mon, Mar 19, 2018 at 9:35 AM, QingFeng Hao > wrote: >> Test case 185 failed since commit 4486e89c219 --- "vl: introduce >> vm_shutdown()". >> It's because of the newly introduced function vm_shutdown calls >> bdrv_drain_all, >> which is call

[Qemu-block] [PULL v3 07/38] qapi: Replace qobject_to_X(o) by qobject_to(X, o)

2018-03-19 Thread Eric Blake
From: Max Reitz This patch was generated using the following Coccinelle script: @@ expression Obj; @@ ( - qobject_to_qnum(Obj) + qobject_to(QNum, Obj) | - qobject_to_qstring(Obj) + qobject_to(QString, Obj) | - qobject_to_qdict(Obj) + qobject_to(QDict, Obj) | - qobject_to_qlist(Obj) + qobject_to(

Re: [Qemu-block] [Qemu-devel] [PATCH v4] file-posix: specify expected filetypes

2018-03-19 Thread John Snow
On 03/19/2018 11:29 AM, Kevin Wolf wrote: > Am 13.03.2018 um 18:20 hat John Snow geschrieben: >> >> >> On 01/19/2018 06:03 PM, Eric Blake wrote: >>> On 01/19/2018 04:47 PM, John Snow wrote: Adjust each caller of raw_open_common to specify if they are expecting host and character devices

Re: [Qemu-block] [PATCH v1 1/1] iotests: fix test case 185

2018-03-19 Thread Stefan Hajnoczi
On Mon, Mar 19, 2018 at 9:35 AM, QingFeng Hao wrote: > Test case 185 failed since commit 4486e89c219 --- "vl: introduce > vm_shutdown()". > It's because of the newly introduced function vm_shutdown calls > bdrv_drain_all, > which is called later by bdrv_close_all. bdrv_drain_all resumes the jobs

Re: [Qemu-block] [PATCH] iotests: 163 is not quick

2018-03-19 Thread Kevin Wolf
Am 10.03.2018 um 22:45 hat Eric Blake geschrieben: > Testing on ext4, most 'quick' qcow2 tests took less than 5 seconds, > but 163 took more than 20. Let's remove it from the quick set. > > Signed-off-by: Eric Blake Takes only 11 seconds for me, but that's still longer than most other tests. T

Re: [Qemu-block] [Qemu-devel] [PATCH v4] file-posix: specify expected filetypes

2018-03-19 Thread Kevin Wolf
Am 13.03.2018 um 18:20 hat John Snow geschrieben: > > > On 01/19/2018 06:03 PM, Eric Blake wrote: > > On 01/19/2018 04:47 PM, John Snow wrote: > >> Adjust each caller of raw_open_common to specify if they are expecting > >> host and character devices or not. Tighten expectations of file types upo

Re: [Qemu-block] [PULL v3 00/46] Block layer patches

2018-03-19 Thread Peter Maydell
On 19 March 2018 at 11:04, Kevin Wolf wrote: > The following changes since commit e1e44a9916b4318e943aecd669e096222cb3eaeb: > > Merge remote-tracking branch 'remotes/xtensa/tags/20180316-xtensa' into > staging (2018-03-17 14:15:03 +) > > are available in the git repository at: > > git://r

Re: [Qemu-block] [PATCH v8 5/9] block: treat BDRV_REQ_ALLOCATE as serialising

2018-03-19 Thread Alberto Garcia
On Mon 12 Mar 2018 11:16:54 AM CET, Anton Nefedov wrote: > The idea is that ALLOCATE requests may overlap with other requests. > Reuse the existing block layer infrastructure for serialising requests. > Use the following approach: > - mark ALLOCATE serialising, so subsequent requests to the area

[Qemu-block] [PULL v3 00/46] Block layer patches

2018-03-19 Thread Kevin Wolf
The following changes since commit e1e44a9916b4318e943aecd669e096222cb3eaeb: Merge remote-tracking branch 'remotes/xtensa/tags/20180316-xtensa' into staging (2018-03-17 14:15:03 +) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fetc

[Qemu-block] [PATCH v1 1/1] iotests: fix test case 185

2018-03-19 Thread QingFeng Hao
Test case 185 failed since commit 4486e89c219 --- "vl: introduce vm_shutdown()". It's because of the newly introduced function vm_shutdown calls bdrv_drain_all, which is called later by bdrv_close_all. bdrv_drain_all resumes the jobs that doubles the speed and offset is doubled. Some jobs' status a

[Qemu-block] [PATCH v1 0/1] iotests: fix test case 185

2018-03-19 Thread QingFeng Hao
Hi, This patch is to remove the redundant call to bdrv_drain_all in vm_shutdown. Thanks! Test case 185 failed as below: 185 2s ... - output mismatch (see 185.out.bad) --- /home/mc/gitcheck/work/qemu-master/tree/qemu/tests/qemu-iotests/185.out 2018-03-09 01:00:40.451603189 +0100 +++ /home/mc/g

[Qemu-block] [PATCH v3 for 2.12 0/3] fix bitmaps migration through shared storage

2018-03-19 Thread Vladimir Sementsov-Ogievskiy
Hi all. This fixes bitmaps migration through shared storage. Look at 02 for details. The bug introduced in 2.10 with the whole qcow2 bitmaps feature, so qemu-stable in CC. However I doubt that someone really suffered from this. Do we need dirty bitmaps at all in inactive case? - that was a quest

[Qemu-block] [PATCH v3 1/3] qcow2-bitmap: add qcow2_reopen_bitmaps_rw_hint()

2018-03-19 Thread Vladimir Sementsov-Ogievskiy
Add version of qcow2_reopen_bitmaps_rw, which do the same work but also return a hint about was header updated or not. This will be used in the following fix for bitmaps reloading after migration. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- block/qcow2.h| 2 +

[Qemu-block] [PATCH v3 3/3] iotests: enable shared migration cases in 169

2018-03-19 Thread Vladimir Sementsov-Ogievskiy
Shared migration for dirty bitmaps is fixed by previous patches, so we can enable the test. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/169 | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests/169 b/tests/qemu-iotests/169 index 3a8

[Qemu-block] [PATCH v3 2/3] qcow2: handle reopening bitmaps on bdrv_invalidate_cache

2018-03-19 Thread Vladimir Sementsov-Ogievskiy
Consider migration with shared storage. Persistent bitmaps are stored on bdrv_inactivate. Then, on destination process_incoming_migration_bh() calls bdrv_invalidate_cache_all() which leads to qcow2_load_autoloading_dirty_bitmaps() which fails if bitmaps are already loaded on destination start. In t

[Qemu-block] [PATCH v2] qcow2: add overlap check for bitmap directory

2018-03-19 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- If it appropriate for 2.12, let's push it. If not - then for 2.13. v2: - squash 02 (indentation fix) to 01 - drop comment from qcow2_check_metadata_overlap() - set @ign to QCOW2_OL_BITMAP_DIRECTORY for in-place case in bitmap_list_st