Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-img: Document --force-share / -U

2017-12-07 Thread Fam Zheng
On Fri, 12/08 08:42, Markus Armbruster wrote: > Fam Zheng writes: > > > On Thu, 12/07 10:53, Eric Blake wrote: > >> On 12/07/2017 04:58 AM, Kashyap Chamarthy wrote: > >> > On Thu, Dec 07, 2017 at 04:44:53PM +0800, Fam Zheng wrote: > [...] > >> >> +it less likely to conflict with

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-img: Document --force-share / -U

2017-12-07 Thread Markus Armbruster
Fam Zheng writes: > On Thu, 12/07 10:53, Eric Blake wrote: >> On 12/07/2017 04:58 AM, Kashyap Chamarthy wrote: >> > On Thu, Dec 07, 2017 at 04:44:53PM +0800, Fam Zheng wrote: [...] >> >> +it less likely to conflict with a running guest's permissions due to >> >> image >> >>

Re: [Qemu-block] import thin provisioned disks with image upload

2017-12-07 Thread Gianluca Cecchi
On Thu, Dec 7, 2017 at 9:33 PM, Nir Soffer wrote: > > For transferring images over http, there is no way to avoid sending > unused blocks, except compression. > OK, understood >> Maybe this file was crated with preallocation=full? >>> >> >> In virt-manager there is not

[Qemu-block] [PATCH v2] qemu-img: Document --force-share / -U

2017-12-07 Thread Fam Zheng
Signed-off-by: Fam Zheng --- v2: - "code{qemu-img}". [Kashyap, Eric] - "etc.." -> "etc.". --- qemu-img.texi | 9 + 1 file changed, 9 insertions(+) diff --git a/qemu-img.texi b/qemu-img.texi index fdcf120f36..6b9f9adfc8 100644 --- a/qemu-img.texi +++ b/qemu-img.texi

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-img: Document --force-share / -U

2017-12-07 Thread Fam Zheng
On Thu, 12/07 10:53, Eric Blake wrote: > On 12/07/2017 04:58 AM, Kashyap Chamarthy wrote: > > On Thu, Dec 07, 2017 at 04:44:53PM +0800, Fam Zheng wrote: > >> Signed-off-by: Fam Zheng > >> --- > >> qemu-img.texi | 8 > >> 1 file changed, 8 insertions(+) > >> > >> diff

Re: [Qemu-block] import thin provisioned disks with image upload

2017-12-07 Thread Nir Soffer
On Fri, Dec 8, 2017 at 1:35 AM Gianluca Cecchi wrote: > On Thu, Dec 7, 2017 at 9:33 PM, Nir Soffer wrote: > >> >> For transferring images over http, there is no way to avoid sending >> unused blocks, except compression. >> > > OK, understood > >

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.12 0/4] qmp dirty bitmap API

2017-12-07 Thread John Snow
On 12/07/2017 06:56 AM, Kashyap Chamarthy wrote: > On Tue, Nov 21, 2017 at 07:10:19PM -0500, John Snow wrote: >> On 11/21/2017 12:23 PM, Kevin Wolf wrote: > > [...] # Snip lot of good discussion. > >>> On another note, I would double check before adding a new block job type >>> that this is

Re: [Qemu-block] [PATCH v2 6/6] qemu-iotests: add 203 savevm with IOThreads test

2017-12-07 Thread Eric Blake
On 12/07/2017 02:13 PM, Stefan Hajnoczi wrote: > This test case will prevent future regressions with savevm and > IOThreads. > > Signed-off-by: Stefan Hajnoczi > --- > tests/qemu-iotests/203 | 59 > ++ >

Re: [Qemu-block] [ovirt-users] slow performance with export storage on glusterfs

2017-12-07 Thread Nir Soffer
On Thu, Nov 23, 2017 at 3:33 PM Yaniv Kaul wrote: > On Thu, Nov 23, 2017 at 1:43 PM, Jiří Sléžka wrote: > >> well, another idea >> >> when I did not use the direct flag, the performace was much better >> >> 15787360256 bytes (16 GB) copied, 422.955159 s,

Re: [Qemu-block] [PATCH v2 5/6] iothread: fix iothread_stop() race condition

2017-12-07 Thread Eric Blake
On 12/07/2017 02:13 PM, Stefan Hajnoczi wrote: > There is a small chance that iothread_stop() hangs as follows: > > > The bug is explained by the AioContext->notify_me doc comments: > > "If this field is 0, everything (file descriptors, bottom halves, > timers) will be re-evaluated before

Re: [Qemu-block] [PATCH v2 4/6] iotests: add VM.add_object()

2017-12-07 Thread Eric Blake
On 12/07/2017 02:13 PM, Stefan Hajnoczi wrote: > The VM.add_object() method can be used to add IOThreads or memory > backend objects. > > Signed-off-by: Stefan Hajnoczi > --- > tests/qemu-iotests/iotests.py | 5 + > 1 file changed, 5 insertions(+) > Reviewed-by: Eric

Re: [Qemu-block] [PATCH v2 3/6] blockdev: add x-blockdev-set-iothread force boolean

2017-12-07 Thread Eric Blake
On 12/07/2017 02:13 PM, Stefan Hajnoczi wrote: > When a node is already associated with a BlockBackend the > x-blockdev-set-iothread command refuses to set the IOThread. This is to > prevent accidentally changing the IOThread when the nodes are in use. > > When the nodes are created with -drive

Re: [Qemu-block] [PATCH v2 2/6] docs: mark nested AioContext locking as a legacy API

2017-12-07 Thread Eric Blake
On 12/07/2017 02:13 PM, Stefan Hajnoczi wrote: > See the patch for why nested AioContext locking is no longer allowed. > > Signed-off-by: Stefan Hajnoczi > --- > docs/devel/multiple-iothreads.txt | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) >

Re: [Qemu-block] [ovirt-users] Scheduling daily Snapshot

2017-12-07 Thread Nir Soffer
On Wed, Dec 6, 2017 at 6:02 PM Jason Lelievre wrote: > Hello, > > What is the best way to set up a daily live snapshot for all VM, and have > the possibility to recover, for example, a specific VM to a specific day? > Each snapshot you create make reads and writes

Re: [Qemu-block] [PATCH v2 1/6] block: avoid recursive AioContext acquire in bdrv_inactivate_all()

2017-12-07 Thread Eric Blake
On 12/07/2017 02:13 PM, Stefan Hajnoczi wrote: > From: Paolo Bonzini > > BDRV_POLL_WHILE() does not support recursive AioContext locking. It > only releases the AioContext lock once regardless of how many times the > caller has acquired it. This results in a hang since the

Re: [Qemu-block] [Qemu-devel] [PATCH v2 7/9] iothread: add iothread_by_id() API

2017-12-07 Thread Eric Blake
On 12/06/2017 08:45 AM, Stefan Hajnoczi wrote: > Encapsulate IOThread QOM object lookup so that callers don't need to > know how and where IOThread objects live. > > Signed-off-by: Stefan Hajnoczi > --- > include/sysemu/iothread.h | 1 + > iothread.c| 7

Re: [Qemu-block] [Qemu-devel] [PATCH v2 9/9] qemu-iotests: add 202 external snapshots IOThread test

2017-12-07 Thread Eric Blake
On 12/06/2017 08:45 AM, Stefan Hajnoczi wrote: > QMP 'transaction' blockdev-snapshot-sync with multiple disks in an > IOThread is an untested code path. Several bugs have been found in > connection with this command. This patch adds a test case to prevent > future regressions. > >

Re: [Qemu-block] [Qemu-devel] [PATCH v2 8/9] blockdev: add x-blockdev-set-iothread testing command

2017-12-07 Thread Eric Blake
On 12/06/2017 08:45 AM, Stefan Hajnoczi wrote: > Currently there is no easy way for iotests to ensure that a BDS is bound > to a particular IOThread. Normally the virtio-blk device calls > blk_set_aio_context() when dataplane is enabled during guest driver > initialization. This never happens in

Re: [Qemu-block] [Qemu-devel] [PATCH v2 6/9] block: drop unused BlockDirtyBitmapState->aio_context field

2017-12-07 Thread Eric Blake
On 12/06/2017 08:45 AM, Stefan Hajnoczi wrote: > The dirty bitmap actions in qmp_transaction have not used AioContext > since the dirty bitmap locking discipline was introduced in commit > 2119882c7eb7e2c612b24fc0c8d86f5887d6f1c3 ("block: introduce > dirty_bitmap_mutex"). Remove the unused field.

Re: [Qemu-block] [Qemu-devel] [PATCH v2 5/9] block: don't keep AioContext acquired after internal_snapshot_prepare()

2017-12-07 Thread Eric Blake
On 12/06/2017 08:45 AM, Stefan Hajnoczi wrote: > Signed-off-by: Stefan Hajnoczi > --- > blockdev.c | 47 +++ > 1 file changed, 31 insertions(+), 16 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake,

Re: [Qemu-block] [Qemu-devel] [PATCH v2 4/9] block: don't keep AioContext acquired after blockdev_backup_prepare()

2017-12-07 Thread Eric Blake
On 12/06/2017 08:45 AM, Stefan Hajnoczi wrote: > Signed-off-by: Stefan Hajnoczi > --- > blockdev.c | 44 ++-- > 1 file changed, 34 insertions(+), 10 deletions(-) > > state->job = do_blockdev_backup(backup, common->block_job_txn,

Re: [Qemu-block] [Qemu-devel] [PATCH v2 3/9] block: don't keep AioContext acquired after drive_backup_prepare()

2017-12-07 Thread Eric Blake
On 12/06/2017 08:45 AM, Stefan Hajnoczi wrote: > Signed-off-by: Stefan Hajnoczi > --- > blockdev.c | 42 ++ > 1 file changed, 34 insertions(+), 8 deletions(-) > > @@ -1867,24 +1867,36 @@ static void

Re: [Qemu-block] import thin provisioned disks with image upload

2017-12-07 Thread Eric Blake
On 12/07/2017 02:33 PM, Nir Soffer wrote: > $ truncate -s 1g empty > > $ stat empty > File: 'empty' > Size: 1073741824 Blocks: 0 IO Block: 4096 regular file > ... > > $ qemu-img info empty > image: empty > file format: raw > virtual size: 1.0G (1073741824 bytes) > disk size: 0

Re: [Qemu-block] [Qemu-devel] [PATCH V3] pci: removed the is_express field since a uniform interface was inserted

2017-12-07 Thread Eduardo Habkost
On Tue, Dec 05, 2017 at 07:17:06PM +0200, Yoni Bettan wrote: > * according to Eduardo Habkost's commit > fd3b02c8896d597dd8b9e053dec579cf0386aee1 > > * since all PCIEs now implement INTERFACE_PCIE_DEVICE we > don't need this field anymore > > * Devices

Re: [Qemu-block] [Qemu-devel] [PATCH v2 2/9] block: don't keep AioContext acquired after external_snapshot_prepare()

2017-12-07 Thread Eric Blake
On 12/06/2017 08:45 AM, Stefan Hajnoczi wrote: > It is not necessary to hold AioContext across transactions anymore since > bdrv_drained_begin/end() is used to keep the nodes quiesced. In fact, > using the AioContext lock for this purpose was always buggy. > > This patch reduces the scope of

[Qemu-block] [PATCH v6 15/20] vdi: Avoid bitrot of debugging code

2017-12-07 Thread Eric Blake
Rework the debug define so that we always get -Wformat checking, even when debugging is disabled. Signed-off-by: Eric Blake Reviewed-by: Stefan Weil Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Vladimir Sementsov-Ogievskiy

[Qemu-block] [PATCH v6 18/20] vpc: Switch to .bdrv_co_block_status()

2017-12-07 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the vpc driver accordingly. Drop the now-unused get_sector_offset(). Signed-off-by: Eric Blake --- v5: fix incorrect rounding in 'map' and bad loop condition [Vladimir] v4: rebase to

Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/9] blockdev: hold AioContext for bdrv_unref() in external_snapshot_clean()

2017-12-07 Thread Eric Blake
On 12/06/2017 08:45 AM, Stefan Hajnoczi wrote: > bdrv_unref() requires the AioContext lock because bdrv_flush() uses > BDRV_POLL_WHILE(), which assumes the AioContext is currently held. If > BDRV_POLL_WHILE() runs without AioContext held the > pthread_mutex_unlock() call in aio_context_release()

[Qemu-block] [PATCH v6 20/20] block: Drop unused .bdrv_co_get_block_status()

2017-12-07 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Now that all drivers have been updated to provide the byte-based .bdrv_co_block_status(), we can delete the sector-based interface. Signed-off-by: Eric Blake --- v6: rebase to changes in patch 1,

[Qemu-block] [PATCH v6 16/20] vdi: Switch to .bdrv_co_block_status()

2017-12-07 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the vdi driver accordingly. Note that the TODO is already covered (the block layer guarantees bounds of its requests), and that we can remove the now-unused s->block_sectors. Signed-off-by: Eric Blake

[Qemu-block] [PATCH v6 14/20] sheepdog: Switch to .bdrv_co_block_status()

2017-12-07 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the sheepdog driver accordingly. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- v5: no change v4: update to interface tweak v3: no change

[Qemu-block] [PATCH v6 07/20] iscsi: Switch to .bdrv_co_block_status()

2017-12-07 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the iscsi driver accordingly. In this case, it is handy to teach iscsi_co_block_status() to handle a NULL map and file parameter, even though the block layer passes non-NULL values, because we also call the

Re: [Qemu-block] import thin provisioned disks with image upload

2017-12-07 Thread Nir Soffer
On Thu, Dec 7, 2017 at 10:15 AM Gianluca Cecchi wrote: > On Thu, Dec 7, 2017 at 1:28 AM, Nir Soffer wrote: > >> >> >> On Thu, Dec 7, 2017 at 1:22 AM Gianluca Cecchi >> wrote: >> >>> On Wed, Dec 6, 2017 at 11:42 PM, Nir

[Qemu-block] [PATCH v6 19/20] vvfat: Switch to .bdrv_co_block_status()

2017-12-07 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the vvfat driver accordingly. Note that we can rely on the block driver having already clamped limits to our block size, and simplify accordingly. Signed-off-by: Eric Blake Reviewed-by:

[Qemu-block] [PATCH v6 17/20] vmdk: Switch to .bdrv_co_block_status()

2017-12-07 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the vmdk driver accordingly. Drop the now-unused vmdk_find_index_in_cluster(). Also, fix a pre-existing bug: if find_extent() fails (unlikely, since the block layer did a bounds check), then we must return a

[Qemu-block] [PATCH v6 10/20] qcow: Switch to .bdrv_co_block_status()

2017-12-07 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the qcow driver accordingly. There is no intent to optimize based on the want_zero flag for this format. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy

[Qemu-block] [PATCH v6 11/20] qcow2: Switch to .bdrv_co_block_status()

2017-12-07 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the qcow2 driver accordingly. For now, we are ignoring the 'want_zero' hint. However, it should be relatively straightforward to honor the hint as a way to return larger *pnum values when we have consecutive

[Qemu-block] [PATCH v6 12/20] qed: Switch to .bdrv_co_block_status()

2017-12-07 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the qed driver accordingly, taking the opportunity to inline qed_is_allocated_cb() into its lone caller (the callback used to be important, until we switched qed to coroutines). There is no intent to optimize

[Qemu-block] [PATCH v6 13/20] raw: Switch to .bdrv_co_block_status()

2017-12-07 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the raw driver accordingly. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- v5: no change v4: rebase to interface tweak v3: no change v2:

[Qemu-block] [PATCH v6 09/20] parallels: Switch to .bdrv_co_block_status()

2017-12-07 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the parallels driver accordingly. Note that the internal function block_status() is still sector-based, because it is still in use by other sector-based functions; but that's okay because request_alignment is

[Qemu-block] [PATCH v6 08/20] null: Switch to .bdrv_co_block_status()

2017-12-07 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the null driver accordingly. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- v5: minor fix to type of 'ret' v4: rebase to interface tweak

[Qemu-block] [PATCH v6 04/20] gluster: Switch to .bdrv_co_block_status()

2017-12-07 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the gluster driver accordingly. In want_zero mode, we continue to report fine-grained hole information (the caller wants as much mapping detail as possible); but when not in that mode, the caller prefers larger

[Qemu-block] [PATCH v6 06/20] iscsi: Switch iscsi_allocmap_update() to byte-based

2017-12-07 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Convert all uses of the allocmap (no semantic change). Callers that already had bytes available are simpler, and callers that now scale to bytes will be easier to switch to byte-based in

[Qemu-block] [PATCH v6 03/20] file-posix: Switch to .bdrv_co_block_status()

2017-12-07 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the file protocol driver accordingly. In want_zero mode, we continue to report fine-grained hole information (the caller wants as much mapping detail as possible); but when not in that mode, the caller prefers

[Qemu-block] [PATCH v6 05/20] iscsi: Switch cluster_sectors to byte-based

2017-12-07 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Convert all uses of the cluster size in sectors, along with adding assertions that we are not dividing by zero. Improve some comment grammar while in the area. Signed-off-by: Eric Blake

[Qemu-block] [PATCH v6 01/20] block: Add .bdrv_co_block_status() callback

2017-12-07 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Now that the block layer exposes byte-based allocation, it's time to tackle the drivers. Add a new callback that operates on as small as byte boundaries. Subsequent patches will then update individual drivers, then

[Qemu-block] [PATCH v6 02/20] block: Switch passthrough drivers to .bdrv_co_block_status()

2017-12-07 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the generic helpers, and all passthrough clients (blkdebug, commit, mirror, throttle) accordingly. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy

[Qemu-block] [PATCH v6 00/20] add byte-based block_status driver callbacks

2017-12-07 Thread Eric Blake
There are patches floating around to add NBD_CMD_BLOCK_STATUS, but NBD wants to report status on byte granularity (even if the reporting will probably be naturally aligned to sectors or even much higher levels). I've therefore started the task of converting our block status code to report at a

[Qemu-block] [PATCH v2 6/6] qemu-iotests: add 203 savevm with IOThreads test

2017-12-07 Thread Stefan Hajnoczi
This test case will prevent future regressions with savevm and IOThreads. Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/203 | 59 ++ tests/qemu-iotests/203.out | 6 + tests/qemu-iotests/group | 1 + 3 files

[Qemu-block] [PATCH v2 3/6] blockdev: add x-blockdev-set-iothread force boolean

2017-12-07 Thread Stefan Hajnoczi
When a node is already associated with a BlockBackend the x-blockdev-set-iothread command refuses to set the IOThread. This is to prevent accidentally changing the IOThread when the nodes are in use. When the nodes are created with -drive they automatically get a BlockBackend. In that case we

[Qemu-block] [PATCH v2 5/6] iothread: fix iothread_stop() race condition

2017-12-07 Thread Stefan Hajnoczi
There is a small chance that iothread_stop() hangs as follows: Thread 3 (Thread 0x7f63eba5f700 (LWP 16105)): #0 0x7f64012c09b6 in ppoll () at /lib64/libc.so.6 #1 0x55959992eac9 in ppoll (__ss=0x0, __timeout=0x0, __nfds=, __fds=) at /usr/include/bits/poll2.h:77 #2

[Qemu-block] [PATCH v2 4/6] iotests: add VM.add_object()

2017-12-07 Thread Stefan Hajnoczi
The VM.add_object() method can be used to add IOThreads or memory backend objects. Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/iotests.py | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index

[Qemu-block] [PATCH v2 0/6] block: avoid recursive AioContext acquire in bdrv_inactivate_all()

2017-12-07 Thread Stefan Hajnoczi
v2: * Added docs/devel/multiple-iothreads.txt doc update [Kevin] * Added qemu-iotests 203 test case [Kevin] * Added iothread_stop() race fix to make 203 reliable Patch 1 is Paolo's recursive locking removal in bdrv_inactivate_all(). This solve migration hangs and is the main point of the

[Qemu-block] [PATCH v2 1/6] block: avoid recursive AioContext acquire in bdrv_inactivate_all()

2017-12-07 Thread Stefan Hajnoczi
From: Paolo Bonzini BDRV_POLL_WHILE() does not support recursive AioContext locking. It only releases the AioContext lock once regardless of how many times the caller has acquired it. This results in a hang since the IOThread does not make progress while the AioContext is

[Qemu-block] [PATCH v2 2/6] docs: mark nested AioContext locking as a legacy API

2017-12-07 Thread Stefan Hajnoczi
See the patch for why nested AioContext locking is no longer allowed. Signed-off-by: Stefan Hajnoczi --- docs/devel/multiple-iothreads.txt | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/devel/multiple-iothreads.txt

Re: [Qemu-block] [Qemu-devel] [PATCH] iotests: Tweak 030 in order to trigger a race condition with parallel jobs

2017-12-07 Thread Alberto Garcia
On Thu 07 Dec 2017 08:16:41 PM CET, Eric Blake wrote: >> qemu_io('-f', iotests.imgfmt, >> -'-c', 'write -P %d %d %d' % (i, i*1024*1024, num_kb * >> 1024), >> +'-c', 'write -P 0xFF %dk %dk' % (i * 512, num_kb), > > I guess changing from a

Re: [Qemu-block] [Qemu-devel] [PATCH] iotests: Tweak 030 in order to trigger a race condition with parallel jobs

2017-12-07 Thread Eric Blake
On 12/07/2017 11:08 AM, Alberto Garcia wrote: > This patch tweaks TestParallelOps in iotest 030 so it allocates data > in smaller regions (256KB/512KB instead of 512KB/1MB) and the > block-stream job in test_stream_commit() only needs to copy data that > is at the very end of the image. > > This

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.12 0/4] qmp dirty bitmap API

2017-12-07 Thread Kevin Wolf
Am 07.12.2017 um 12:56 hat Kashyap Chamarthy geschrieben: > On Tue, Nov 21, 2017 at 07:10:19PM -0500, John Snow wrote: > > On 11/21/2017 12:23 PM, Kevin Wolf wrote: > > [...] # Snip lot of good discussion. > > > > On another note, I would double check before adding a new block job type > > >

Re: [Qemu-block] [PATCH 1/2] qcow2: add overlap check for bitmap directory

2017-12-07 Thread John Snow
On 12/07/2017 04:43 AM, Vladimir Sementsov-Ogievskiy wrote: > 07.12.2017 01:56, John Snow wrote: >> >> On 11/30/2017 11:47 AM, Vladimir Sementsov-Ogievskiy wrote: >>> Signed-off-by: Vladimir Sementsov-Ogievskiy >>> --- >>>   block/qcow2.h  |  7 +-- >>>  

[Qemu-block] [PATCH] iotests: Tweak 030 in order to trigger a race condition with parallel jobs

2017-12-07 Thread Alberto Garcia
This patch tweaks TestParallelOps in iotest 030 so it allocates data in smaller regions (256KB/512KB instead of 512KB/1MB) and the block-stream job in test_stream_commit() only needs to copy data that is at the very end of the image. This way when the block-stream job is waken up it will finish

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-img: Document --force-share / -U

2017-12-07 Thread Eric Blake
On 12/07/2017 04:58 AM, Kashyap Chamarthy wrote: > On Thu, Dec 07, 2017 at 04:44:53PM +0800, Fam Zheng wrote: >> Signed-off-by: Fam Zheng >> --- >> qemu-img.texi | 8 >> 1 file changed, 8 insertions(+) >> >> diff --git a/qemu-img.texi b/qemu-img.texi >> index

[Qemu-block] [PATCH v2 3/6] qapi: add nbd-server-remove

2017-12-07 Thread Vladimir Sementsov-Ogievskiy
Add command for export removing. It is needed for cases when we don't want to keep export after the operation on it was completed. The other example is temporary node, created with blockdev-add. If we want to delete it we should firstly remove corresponding NBD export. Signed-off-by: Vladimir

[Qemu-block] [PATCH v2 4/6] iotest 147: add cases to test new @name parameter of nbd-server-add

2017-12-07 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/147 | 68 +- tests/qemu-iotests/147.out | 4 +-- 2 files changed, 57 insertions(+), 15 deletions(-) diff --git a/tests/qemu-iotests/147

[Qemu-block] [PATCH v2 6/6] iotest 201: new test for qmp nbd-server-remove

2017-12-07 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/201 | 130 + tests/qemu-iotests/201.out | 5 ++ tests/qemu-iotests/group | 1 + 3 files changed, 136 insertions(+) create mode 100644

[Qemu-block] [PATCH v2 0/6] nbd export qmp interface

2017-12-07 Thread Vladimir Sementsov-Ogievskiy
Here: 1. separate export name from device name 1.1 several exports per device possible 2. add nbd-server-remove v2: 01: add r-bs by Max and Eric, add comment to code (hope you don't mind) 03: address export by its name, not by device name make it possible to force-remove export,

[Qemu-block] [PATCH v2 1/6] nbd/server: add additional assert to nbd_export_put

2017-12-07 Thread Vladimir Sementsov-Ogievskiy
This place is not obvious, nbd_export_close may theoretically reduce refcount to 0. It may happen if someone calls nbd_export_put on named export not through nbd_export_set_name when refcount is 1. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake

[Qemu-block] [PATCH v2 2/6] qapi: add name parameter to nbd-server-add

2017-12-07 Thread Vladimir Sementsov-Ogievskiy
Allow user to specify name for new export, to not reuse internal node name and to not show it to clients. This also allows creating several exports per device. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block.json | 9 +++-- blockdev-nbd.c | 14

Re: [Qemu-block] [PATCH] block: avoid recursive AioContext acquire in bdrv_inactivate_all()

2017-12-07 Thread Stefan Hajnoczi
On Wed, Dec 06, 2017 at 07:40:28PM +0100, Kevin Wolf wrote: > Am 06.12.2017 um 18:54 hat Stefan Hajnoczi geschrieben: > > From: Paolo Bonzini > > > > BDRV_POLL_WHILE() does not support recursive AioContext locking. It > > only releases the AioContext lock once regardless of

[Qemu-block] QEMU not honouring bootorder

2017-12-07 Thread Michal Privoznik
Dear list, I've encountered the following problem. I have two disks: /var/lib/libvirt/images/fedora.qcow2 (which contains OS) /dev/sde (iSCSI dummy disk just for testing) Now, when I configure QEMU to start with both of them, QEMU/Seabios tries to boot from /dev/sde which fails obviously.

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.12 0/4] qmp dirty bitmap API

2017-12-07 Thread Kashyap Chamarthy
On Tue, Nov 21, 2017 at 07:10:19PM -0500, John Snow wrote: > On 11/21/2017 12:23 PM, Kevin Wolf wrote: [...] # Snip lot of good discussion. > > On another note, I would double check before adding a new block job type > > that this is the right way to go. We have recently noticed that many, if >

Re: [Qemu-block] [PATCH] qemu-img: Document --force-share / -U

2017-12-07 Thread Kashyap Chamarthy
On Thu, Dec 07, 2017 at 04:44:53PM +0800, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > qemu-img.texi | 8 > 1 file changed, 8 insertions(+) > > diff --git a/qemu-img.texi b/qemu-img.texi > index fdcf120f36..3aa63aad55 100644 > --- a/qemu-img.texi > +++

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.12 0/4] qmp dirty bitmap API

2017-12-07 Thread Vladimir Sementsov-Ogievskiy
07.12.2017 03:38, John Snow wrote: On 11/30/2017 07:10 AM, Vladimir Sementsov-Ogievskiy wrote: 18.11.2017 00:35, John Snow wrote: On 11/17/2017 03:22 AM, Vladimir Sementsov-Ogievskiy wrote: 17.11.2017 06:10, John Snow wrote: On 11/16/2017 03:17 AM, Vladimir Sementsov-Ogievskiy wrote:

[Qemu-block] [PATCH] qemu-img: Document --force-share / -U

2017-12-07 Thread Fam Zheng
Signed-off-by: Fam Zheng --- qemu-img.texi | 8 1 file changed, 8 insertions(+) diff --git a/qemu-img.texi b/qemu-img.texi index fdcf120f36..3aa63aad55 100644 --- a/qemu-img.texi +++ b/qemu-img.texi @@ -57,6 +57,14 @@ exclusive with the @var{-O} parameters. It is