Re: [Qemu-block] [Qemu-devel] [PATCH] block/gluster: add support for SEEK_DATA/SEEK_HOLE

2016-10-06 Thread Jeff Cody
On Thu, Oct 06, 2016 at 05:09:59PM -0500, Eric Blake wrote: > On 03/07/2016 01:14 PM, Eric Blake wrote: > > [adding qemu-devel; ALL patches must cc qemu-devel even when sent to > > another list] > > > > On 03/07/2016 11:04 AM, Niels de Vos wrote: > >> GlusterFS 3.8 contains support for SEEK_DATA

[Qemu-block] [PATCH 1/1] block: add gluster ifdef guard checks for SEEK_DATA/SEEK_HOLE support

2016-10-06 Thread Jeff Cody
Add checks to see if the system compiling QEMU has support for SEEK_HOLE/SEEK_DATA. If the system does not, we will flag that seek data is unsupported in gluster. Note: this is not a check on whether the gluster server itself supports SEEK_DATA (that is already done during runtime), but rather

Re: [Qemu-block] [PATCH v2 09/11] blockjob: add block_job_start

2016-10-06 Thread John Snow
On 10/05/2016 11:17 AM, Kevin Wolf wrote: Am 01.10.2016 um 00:00 hat John Snow geschrieben: Instead of automatically starting jobs at creation time via backup_start et al, we'd like to return a job object pointer that can be started manually at later point in time. For now, add the

Re: [Qemu-block] [Qemu-devel] [PATCH] block/gluster: add support for SEEK_DATA/SEEK_HOLE

2016-10-06 Thread Eric Blake
On 03/07/2016 01:14 PM, Eric Blake wrote: > [adding qemu-devel; ALL patches must cc qemu-devel even when sent to > another list] > > On 03/07/2016 11:04 AM, Niels de Vos wrote: >> GlusterFS 3.8 contains support for SEEK_DATA and SEEK_HOLE. This makes >> it possible to detect sparse areas in

Re: [Qemu-block] [PATCH] qcow2: Optimize L2 table cache size based on image and cluster sizes

2016-10-06 Thread Frank Myhr
Thanks Alberto for pointing me to Ed Swierk's patch and this discussion. On Wed 05 Oct 2016 16:57:57 +0200, Alberto Garcia wrote: > Frank Myhr's suggestion (in bugzilla) is that we allow specifying a % of > the disk size, so > > l2-cache-size=100% (that would be cache-size=max) >

Re: [Qemu-block] [Qemu-devel] [PATCH v2 04/11] blockjobs: Always use block_job_get_aio_context

2016-10-06 Thread John Snow
On 10/05/2016 10:02 AM, Kevin Wolf wrote: Am 01.10.2016 um 00:00 hat John Snow geschrieben: There are a few places where we're fishing it out for ourselves. Let's not do that and instead use the helper. Signed-off-by: John Snow That change makes a difference when the

Re: [Qemu-block] [PATCH v14 10/21] qapi: permit auto-creating nested structs

2016-10-06 Thread Eric Blake
On 10/06/2016 10:30 AM, Kevin Wolf wrote: >>> So, considering that it is a purely internally used type not visible in >>> QMP, would it make sense to change NetLegacy to be a flat union instead, >>> with NetLegacyOptions as the common base? Then you get the same flat >>> namespace that we always

Re: [Qemu-block] [Qemu-devel] [PATCH v2 02/11] blockjob: centralize QMP event emissions

2016-10-06 Thread John Snow
On 10/06/2016 03:44 AM, Kevin Wolf wrote: Am 05.10.2016 um 20:49 hat John Snow geschrieben: On 10/05/2016 09:43 AM, Kevin Wolf wrote: Am 01.10.2016 um 00:00 hat John Snow geschrieben: @@ -3136,10 +3111,10 @@ void qmp_block_commit(bool has_job_id, const char *job_id, const char *device,

Re: [Qemu-block] [PATCH v14 10/21] qapi: permit auto-creating nested structs

2016-10-06 Thread Daniel P. Berrange
On Thu, Oct 06, 2016 at 05:51:57PM +0200, Kevin Wolf wrote: > Am 06.10.2016 um 17:39 hat Daniel P. Berrange geschrieben: > > On Thu, Oct 06, 2016 at 05:30:05PM +0200, Kevin Wolf wrote: > > > Am 06.10.2016 um 17:18 hat Daniel P. Berrange geschrieben: > > > > On Thu, Oct 06, 2016 at 05:10:42PM

Re: [Qemu-block] [PATCH v14 10/21] qapi: permit auto-creating nested structs

2016-10-06 Thread Kevin Wolf
Am 06.10.2016 um 17:39 hat Daniel P. Berrange geschrieben: > On Thu, Oct 06, 2016 at 05:30:05PM +0200, Kevin Wolf wrote: > > Am 06.10.2016 um 17:18 hat Daniel P. Berrange geschrieben: > > > On Thu, Oct 06, 2016 at 05:10:42PM +0200, Kevin Wolf wrote: > > > > Am 30.09.2016 um 16:45 hat Daniel P.

Re: [Qemu-block] [PATCH v14 10/21] qapi: permit auto-creating nested structs

2016-10-06 Thread Daniel P. Berrange
On Thu, Oct 06, 2016 at 05:30:05PM +0200, Kevin Wolf wrote: > Am 06.10.2016 um 17:18 hat Daniel P. Berrange geschrieben: > > On Thu, Oct 06, 2016 at 05:10:42PM +0200, Kevin Wolf wrote: > > > Am 30.09.2016 um 16:45 hat Daniel P. Berrange geschrieben: > > > > Some of the historical command line opts

Re: [Qemu-block] [PATCH v14 10/21] qapi: permit auto-creating nested structs

2016-10-06 Thread Daniel P. Berrange
On Thu, Oct 06, 2016 at 05:10:42PM +0200, Kevin Wolf wrote: > Am 30.09.2016 um 16:45 hat Daniel P. Berrange geschrieben: > > Some of the historical command line opts that had their > > keys in in a completely flat namespace are now represented > > by QAPI schemas that use a nested structs. When

Re: [Qemu-block] [PATCH v14 10/21] qapi: permit auto-creating nested structs

2016-10-06 Thread Kevin Wolf
Am 30.09.2016 um 16:45 hat Daniel P. Berrange geschrieben: > Some of the historical command line opts that had their > keys in in a completely flat namespace are now represented > by QAPI schemas that use a nested structs. When converting > the QemuOpts to QObject, there is no information about >

Re: [Qemu-block] [PATCH v14 08/21] qapi: allow QObjectInputVisitor to be created with QemuOpts

2016-10-06 Thread Kevin Wolf
Am 30.09.2016 um 16:45 hat Daniel P. Berrange geschrieben: > Instead of requiring all callers to go through the mutli-step > process of turning QemuOpts into a suitable QObject for visiting, > add a new constructor that encapsulates this logic. This will > allow QObjectInputVisitor to be a drop-in

Re: [Qemu-block] [PATCH v14 06/21] qapi: don't pass two copies of TestInputVisitorData to tests

2016-10-06 Thread Kevin Wolf
Am 30.09.2016 um 16:45 hat Daniel P. Berrange geschrieben: > The input_visitor_test_add() method was accepting an instance > of 'TestInputVisitorData' and passing it as the 'user_data' > parameter to test functions. The main 'TestInputVisitorData' > instance that was actually used, was meanwhile

Re: [Qemu-block] [PATCH v14 03/21] qapi: add trace events for visitor

2016-10-06 Thread Kevin Wolf
Am 30.09.2016 um 16:45 hat Daniel P. Berrange geschrieben: > Allow tracing of the operation of visitors > > Signed-off-by: Daniel P. Berrange Reviewed-by: Kevin Wolf

Re: [Qemu-block] [PATCH] qcow2: Optimize L2 table cache size based on image and cluster sizes

2016-10-06 Thread Alberto Garcia
On Wed 05 Oct 2016 05:35:20 PM CEST, Max Reitz wrote: >>> Apart from that, I have to say I think it would be a bit more useful >>> if one would specify the area covered by the metadata caches as an >>> absolute number instead of a relative one (I guess it's generally >>>

Re: [Qemu-block] [PATCH] block: Add bdrv_runtime_opts to query-command-line-options

2016-10-06 Thread Martin Kletzander
On Thu, Oct 06, 2016 at 11:40:36AM +0200, Kevin Wolf wrote: Recently we moved a few options from QemuOptsLists in blockdev.c to bdrv_runtime_opts in block.c in order to make them accissble using blockdev-add. However, this has the side effect that these options are missing from

Re: [Qemu-block] [PATCH] block: Add bdrv_runtime_opts to query-command-line-options

2016-10-06 Thread Michal Privoznik
On 06.10.2016 11:40, Kevin Wolf wrote: > Recently we moved a few options from QemuOptsLists in blockdev.c to > bdrv_runtime_opts in block.c in order to make them accissble using > blockdev-add. However, this has the side effect that these options are > missing from query-command-line-options now,

[Qemu-block] [PATCH v10 06/16] block: Block all nodes involved in the block-commit operation

2016-10-06 Thread Alberto Garcia
After a successful block-commit operation all nodes between top and base are removed from the backing chain, and top's overlay needs to be updated to point to base. Because of that we should prevent other block jobs from messing with them. This patch blocks all operations in these nodes in

[Qemu-block] [PATCH v10 04/16] block: Use block_job_add_bdrv() in backup_start()

2016-10-06 Thread Alberto Garcia
Use block_job_add_bdrv() instead of blocking all operations in backup_start() and unblocking them in backup_run(). Signed-off-by: Alberto Garcia --- block/backup.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/block/backup.c b/block/backup.c index

[Qemu-block] [PATCH v10 05/16] block: Check blockers in all nodes involved in a block-commit job

2016-10-06 Thread Alberto Garcia
qmp_block_commit() checks for op blockers in the active and destination (base) images. However all nodes between top_bs and base are also involved, and they are removed from the chain afterwards. In addition to that, if top_bs is not the active layer then top_bs's overlay also needs to be checked

[Qemu-block] [PATCH v10 11/16] qemu-iotests: Test streaming to an intermediate layer

2016-10-06 Thread Alberto Garcia
This adds test_stream_intermediate(), similar to test_stream() but streams to the intermediate image instead. It also removes the usage of blkdebug, which is unnecessary for this test. Signed-off-by: Alberto Garcia --- tests/qemu-iotests/030 | 21 -

[Qemu-block] [PATCH v10 09/16] block: Add QMP support for streaming to an intermediate layer

2016-10-06 Thread Alberto Garcia
This patch makes the 'device' parameter of the 'block-stream' command accept a node name that is not a root node. In addition to that, operation blockers will be checked in all intermediate nodes between the top and the base node. Signed-off-by: Alberto Garcia --- blockdev.c

[Qemu-block] [PATCH v10 13/16] qemu-iotests: Test overlapping stream and commit operations

2016-10-06 Thread Alberto Garcia
These test cases check that it's not possible to perform two block-stream or block-commit operations if there are nodes involved in both. Signed-off-by: Alberto Garcia --- tests/qemu-iotests/030 | 89 ++

[Qemu-block] [PATCH v10 08/16] block: Support streaming to an intermediate layer

2016-10-06 Thread Alberto Garcia
This makes sure that the image we are streaming into is open in read-write mode during the operation. Operation blockers are also set in all intermediate nodes, since they will be removed from the chain afterwards. Finally, this also unblocks the stream operation in backing files.

[Qemu-block] [PATCH v10 12/16] qemu-iotests: Test block-stream operations in parallel

2016-10-06 Thread Alberto Garcia
This test case checks that it's possible to launch several stream operations in parallel in the same snapshot chain, each one involving a different set of nodes. Signed-off-by: Alberto Garcia --- tests/qemu-iotests/030 | 80 ++

[Qemu-block] [PATCH v10 14/16] qemu-iotests: Test block-stream and block-commit in parallel

2016-10-06 Thread Alberto Garcia
As with test_stream_parallel(), we allow mixing block-stream and block-commit operations in the same backing chain as long as there's no overlap among the involved nodes. Signed-off-by: Alberto Garcia --- tests/qemu-iotests/030 | 30 ++

[Qemu-block] [PATCH v10 00/16] Support streaming to an intermediate layer

2016-10-06 Thread Alberto Garcia
Hi all, 6 months after v9, and more than a year after v8, here's the new version of the intermediate block streaming series. There have been so many changes in QEMU since then that all patches in this series are either new or have changed. Still, some of the most important changes have been

[Qemu-block] [PATCH v10 10/16] docs: Document how to stream to an intermediate layer

2016-10-06 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- docs/live-block-ops.txt | 31 --- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/docs/live-block-ops.txt b/docs/live-block-ops.txt index a257087..014c8c9 100644 --- a/docs/live-block-ops.txt +++

[Qemu-block] [PATCH v10 03/16] block: Use block_job_add_bdrv() in mirror_start_job()

2016-10-06 Thread Alberto Garcia
Use block_job_add_bdrv() instead of blocking all operations in mirror_start_job() and unblocking them in mirror_exit(). Signed-off-by: Alberto Garcia --- block/mirror.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index

[Qemu-block] [PATCH v10 07/16] block: Block all intermediate nodes in commit_active_start()

2016-10-06 Thread Alberto Garcia
When block-commit is launched without the top parameter, it uses internally a mirror block job. In that case all intermediate nodes between the active and base nodes must be blocked as well. Signed-off-by: Alberto Garcia --- block/mirror.c | 8 1 file changed, 8

[Qemu-block] [PATCH v10 02/16] block: Add block_job_add_bdrv()

2016-10-06 Thread Alberto Garcia
When a block job is created on a certain BlockDriverState, operations are blocked there while the job exists. However, some block jobs may involve additional BDSs, which must be blocked separately when the job is created and unblocked manually afterwards. This patch adds block_job_add_bdrv(),

Re: [Qemu-block] [PATCH 2/3] block-backend: Remember if attached device is non-qdev

2016-10-06 Thread Kevin Wolf
Am 05.10.2016 um 20:01 hat Max Reitz geschrieben: > On 05.10.2016 11:26, Kevin Wolf wrote: > > Almost all block devices are qdevified by now. This allows us to go back > > from the BlockBackend to the DeviceState. xen_disk is the last device > > that is missing. We'll remember in the BlockBackend

Re: [Qemu-block] [PATCH] block: Add bdrv_runtime_opts to query-command-line-options

2016-10-06 Thread Kevin Wolf
Am 06.10.2016 um 12:58 hat Martin Kletzander geschrieben: > On Thu, Oct 06, 2016 at 11:40:36AM +0200, Kevin Wolf wrote: > >Recently we moved a few options from QemuOptsLists in blockdev.c to > >bdrv_runtime_opts in block.c in order to make them accissble using > >blockdev-add. However, this has

[Qemu-block] [PATCH] block: Add bdrv_runtime_opts to query-command-line-options

2016-10-06 Thread Kevin Wolf
Recently we moved a few options from QemuOptsLists in blockdev.c to bdrv_runtime_opts in block.c in order to make them accissble using blockdev-add. However, this has the side effect that these options are missing from query-command-line-options now, and libvirt consequently disables the

Re: [Qemu-block] [Qemu-devel] [PATCH v2 02/11] blockjob: centralize QMP event emissions

2016-10-06 Thread Kevin Wolf
Am 05.10.2016 um 20:49 hat John Snow geschrieben: > On 10/05/2016 09:43 AM, Kevin Wolf wrote: > >Am 01.10.2016 um 00:00 hat John Snow geschrieben: > >>@@ -3136,10 +3111,10 @@ void qmp_block_commit(bool has_job_id, const char > >>*job_id, const char *device, > >> goto out; > >>