Re: [Qemu-block] [Qemu-devel] [PATCH RFC v3 2/5] keyval: New keyval_parse()

2017-02-24 Thread Markus Armbruster
Eric Blake writes: > On 02/24/2017 03:06 PM, Eric Blake wrote: > >> On 02/24/2017 02:18 PM, Markus Armbruster wrote: I have a preference for option 1 in the long run, but as it seems to be upwards compatible from option 2 for -blockdev in 2.9, I'm leaning

Re: [Qemu-block] [Qemu-devel] [PATCH RFC v3 2/5] keyval: New keyval_parse()

2017-02-24 Thread Eric Blake
On 02/24/2017 03:06 PM, Eric Blake wrote: > > Also for 2.9: turn on the deprecation warning for QemuOpts negative > sugar, but leave positive sugar unchanged (it seems like positive sugar > is probably more in use than negative sugar, other than chardev nowait). Capturing the gist of an IRC

Re: [Qemu-block] [Qemu-devel] [PATCH RFC v3 2/5] keyval: New keyval_parse()

2017-02-24 Thread Eric Blake
On 02/24/2017 02:18 PM, Markus Armbruster wrote: >> I have a preference for option 1 in the long run, but as it seems to be >> upwards compatible from option 2 for -blockdev in 2.9, I'm leaning >> towards option 2 for this release. > > Let me rename the options: > > * "no sugar -blockdev": both

Re: [Qemu-block] [Qemu-devel] [PATCH RFC v3 2/5] keyval: New keyval_parse()

2017-02-24 Thread Markus Armbruster
Eric Blake writes: > On 02/24/2017 01:06 PM, Markus Armbruster wrote: > >> >> The value of an implied key is not subject to key desugaring. > > And that's a good thing. > >> >> Without an implied key, the "node" would desugar to "de=off". >> >>> How about: >>> >>> for 2.9:

Re: [Qemu-block] [PATCH] qemu-img: make convert async

2017-02-24 Thread Peter Lieven
> Am 24.02.2017 um 16:02 schrieb Kevin Wolf : > > Am 21.02.2017 um 13:29 hat Peter Lieven geschrieben: >> the convert process is currently completely implemented with sync operations. >> That means it reads one buffer and then writes it. No parallelism and each >> sync >>

Re: [Qemu-block] [Qemu-devel] [PULL 00/19] Block layer patches

2017-02-24 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 1487960230-18054-1-git-send-email-kw...@redhat.com Type: series Subject: [Qemu-devel] [PULL 00/19] Block layer patches === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git

Re: [Qemu-block] [Qemu-devel] [PATCH RFC v3 2/5] keyval: New keyval_parse()

2017-02-24 Thread Eric Blake
On 02/24/2017 01:06 PM, Markus Armbruster wrote: > > The value of an implied key is not subject to key desugaring. And that's a good thing. > > Without an implied key, the "node" would desugar to "de=off". > >> How about: >> >> for 2.9: -blockdev has no magic at all (you HAVE to spell

Re: [Qemu-block] [Qemu-devel] Non-flat command line option argument syntax

2017-02-24 Thread Markus Armbruster
Eric Blake writes: > On 02/24/2017 10:39 AM, Daniel P. Berrange wrote: >> On Fri, Feb 24, 2017 at 05:04:34PM +0100, Markus Armbruster wrote: >>> Markus Armbruster writes: >>> >>> [...] === Dotted keys === One sufficiently powerful syntax

[Qemu-block] [PULL 16/19] block: Factor out bdrv_open_driver()

2017-02-24 Thread Kevin Wolf
This is a function that doesn't do any option parsing, but just does some basic BlockDriverState setup and calls the .bdrv_open() function of the block driver. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block.c | 112

[Qemu-block] [PULL 14/19] block: Factor out bdrv_open_child_bs()

2017-02-24 Thread Kevin Wolf
This is the part of bdrv_open_child() that opens a BDS with option inheritance, but doesn't attach it as a child to the parent yet. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block.c | 61

[Qemu-block] [PULL 12/19] block: Pass BdrvChild to bdrv_truncate()

2017-02-24 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block.c| 3 ++- block/blkdebug.c | 2 +- block/block-backend.c | 2 +- block/crypto.c | 2 +- block/parallels.c | 8 block/qcow.c | 4 ++--

[Qemu-block] [PULL 11/19] mirror: Resize active commit base in mirror_run()

2017-02-24 Thread Kevin Wolf
This is more consistent with the commit block job, and it moves the code to a place where we already have the necessary BlockBackends to resize the base image when bdrv_truncate() is changed to require a BdrvChild. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz

Re: [Qemu-block] [Qemu-devel] [PATCH RFC v3 2/5] keyval: New keyval_parse()

2017-02-24 Thread Markus Armbruster
Eric Blake writes: > On 02/24/2017 01:58 AM, Markus Armbruster wrote: > >>> I hate the 'no$key' sugar, and would love to get rid of it. It makes >>> things ambiguous (thus confusing) for precious little gain: 'novocaine' >>> can mean 'novocaine=on' or 'vocaine=off'. QemuOpts

[Qemu-block] [PULL 04/19] qemu-img: Do not truncate before preallocation

2017-02-24 Thread Kevin Wolf
From: Nir Soffer When using file system that does not support fallocate() (e.g. NFS < 4.2), truncating the file only when preallocation=OFF speeds up creating raw file. Here is example run, tested on Fedora 24 machine, creating raw file on NFS version 3 server. $ time

[Qemu-block] [PULL 17/19] block: Add bdrv_new_open_driver()

2017-02-24 Thread Kevin Wolf
This function allows to create more or less normal BlockDriverStates even for BlockDrivers that aren't globally registered (e.g. helper filters for block jobs). Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block.c | 30

[Qemu-block] [PULL 18/19] vvfat: Use opened node as backing file

2017-02-24 Thread Kevin Wolf
We should not try to assign a not yet opened node as the backing file, because as soon as the permission system is added it will fail. The just added bdrv_new_open_driver() function is the right tool to open a file with an internal driver, use it. In case anyone wonders whether that magic fake

[Qemu-block] [PULL 13/19] block: Attach bs->file only during .bdrv_open()

2017-02-24 Thread Kevin Wolf
The way that attaching bs->file worked was a bit unusual in that it was the only child that would be attached to a node which is not opened yet. Because of this, the block layer couldn't know yet which permissions the driver would eventually need. This patch moves the point where bs->file is

[Qemu-block] [PULL 19/19] tests: Use opened block node for block job tests

2017-02-24 Thread Kevin Wolf
blk_insert_bs() and block job related functions will soon require an opened block node (permission calculations will involve the block driver), so let our tests be consistent with the real users in this respect. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz

[Qemu-block] [PULL 15/19] block: Use BlockBackend for image probing

2017-02-24 Thread Kevin Wolf
This fixes the use of a parent-less BdrvChild in bdrv_open_inherit() by converting it into a BlockBackend. Which is exactly what it should be, image probing is an external, standalone user of a node. The requests can't be considered to originate from the format driver node because that one isn't

[Qemu-block] [PULL 01/19] qemu-iotests: Test 137 only supports 'file' protocol

2017-02-24 Thread Kevin Wolf
From: Jeff Cody Since test 137 make uses of qcow2.py, only local files are supported. Signed-off-by: Jeff Cody Signed-off-by: Kevin Wolf --- tests/qemu-iotests/137 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Qemu-block] [PULL 02/19] qemu-iotests: add ability to exclude certain protocols from tests

2017-02-24 Thread Kevin Wolf
From: Jeff Cody Add the ability for shell script tests to exclude specific protocols. This is useful to allow all protocols except ones known to not support a feature used in the test (e.g. .bdrv_create). Signed-off-by: Jeff Cody Signed-off-by: Kevin Wolf

[Qemu-block] [PULL 05/19] qemu-img: Add tests for raw image preallocation

2017-02-24 Thread Kevin Wolf
From: Nir Soffer Add tests for creating raw image with and without the preallocation option. Signed-off-by: Nir Soffer Signed-off-by: Kevin Wolf --- tests/qemu-iotests/175 | 61 ++

[Qemu-block] [PULL 08/19] iotests: Fix another race in 030

2017-02-24 Thread Kevin Wolf
From: John Snow We can't rely on a non-paused job to be present and running for us. Assume that if the job is not present that it completed already. Signed-off-by: John Snow Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf

[Qemu-block] [PULL 07/19] qemu-img: Improve documentation for PREALLOC_MODE_FALLOC

2017-02-24 Thread Kevin Wolf
From: Nir Soffer Now that we are truncating the file in both PREALLOC_MODE_FULL and PREALLOC_MODE_OFF, not truncating in PREALLOC_MODE_FALLOC looks odd. Add a comment explaining why we do not truncate in this case. Signed-off-by: Nir Soffer Signed-off-by:

[Qemu-block] [PULL 09/19] blockdev: Use BlockBackend to resize in qmp_block_resize()

2017-02-24 Thread Kevin Wolf
In order to be able to do permission checking and to keep working with the BdrvChild based bdrv_truncate() that this involves, we need to create a temporary BlockBackend to resize the image. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- blockdev.c |

[Qemu-block] [PULL 06/19] qemu-img: Truncate before full preallocation

2017-02-24 Thread Kevin Wolf
From: Nir Soffer In a previous commit (qemu-img: Do not truncate before preallocation) we moved truncate to the PREALLOC_MODE_OFF branch to avoid slowdown in posix_fallocate(). However this change is not optimal when using PREALLOC_MODE_FULL, since knowing the final size from

[Qemu-block] [PULL 3/3] RBD: Add support readv,writev for rbd

2017-02-24 Thread Jeff Cody
From: tianqing Rbd can do readv and writev directly, so wo do not need to transform iov to buf or vice versa any more. Signed-off-by: tianqing Reviewed-by: Jeff Cody Signed-off-by: Jeff Cody ---

[Qemu-block] [PULL 00/19] Block layer patches

2017-02-24 Thread Kevin Wolf
The following changes since commit 63f495beb4007de5444614125fd6fd178ca6e2b1: Merge remote-tracking branch 'remotes/kraxel/tags/pull-cve-2017-2620-20170224-1' into staging (2017-02-24 13:55:26 +) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream

[Qemu-block] [PULL 0/3] Block patches

2017-02-24 Thread Jeff Cody
The following changes since commit fe8ee082db5038a05dbd8872e946049e9a9c550e: Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2017-02-22' into staging (2017-02-24 15:00:51 +) are available in the git repository at: https://github.com/codyprime/qemu-kvm-jtc.git

[Qemu-block] [PULL 1/3] block/nfs: convert to preadv / pwritev

2017-02-24 Thread Jeff Cody
From: Peter Lieven Signed-off-by: Peter Lieven Reviewed-by: Jeff Cody Message-id: 1487349541-10201-2-git-send-email...@kamp.de Signed-off-by: Jeff Cody --- block/nfs.c | 33 +++-- 1 file changed, 15

[Qemu-block] [PULL 2/3] block/nfs: try to avoid the bounce buffer in pwritev

2017-02-24 Thread Jeff Cody
From: Peter Lieven if the passed qiov contains exactly one iov we can pass the buffer directly. Signed-off-by: Peter Lieven Reviewed-by: Jeff Cody Message-id: 1487349541-10201-3-git-send-email...@kamp.de Signed-off-by: Jeff Cody

Re: [Qemu-block] [PATCH 36/54] commit: Use real permissions in commit block job

2017-02-24 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > This is probably one of the most interesting conversions to the new > op blocker system because a commit block job intentionally leaves some > intermediate block nodes in the backing chain that aren't valid on their > own any more; only the whole chain

Re: [Qemu-block] Non-flat command line option argument syntax

2017-02-24 Thread Eric Blake
On 02/24/2017 10:39 AM, Daniel P. Berrange wrote: > On Fri, Feb 24, 2017 at 05:04:34PM +0100, Markus Armbruster wrote: >> Markus Armbruster writes: >> >> [...] >>> === Dotted keys === >>> >>> One sufficiently powerful syntax extension already exists: the dotted >>> key

Re: [Qemu-block] Non-flat command line option argument syntax

2017-02-24 Thread Daniel P. Berrange
On Fri, Feb 24, 2017 at 05:04:34PM +0100, Markus Armbruster wrote: > Markus Armbruster writes: > > [...] > > === Dotted keys === > > > > One sufficiently powerful syntax extension already exists: the dotted > > key convention. It's syntactically unambiguous only when none of

Re: [Qemu-block] [Qemu-devel] [PATCH RFC v3 2/5] keyval: New keyval_parse()

2017-02-24 Thread Eric Blake
On 02/24/2017 01:58 AM, Markus Armbruster wrote: >> I hate the 'no$key' sugar, and would love to get rid of it. It makes >> things ambiguous (thus confusing) for precious little gain: 'novocaine' >> can mean 'novocaine=on' or 'vocaine=off'. QemuOpts picks the latter, >> even when a QemuOpt

Re: [Qemu-block] Non-flat command line option argument syntax

2017-02-24 Thread Markus Armbruster
Markus Armbruster writes: [...] > === Dotted keys === > > One sufficiently powerful syntax extension already exists: the dotted > key convention. It's syntactically unambiguous only when none of the > KEYs involved contains '.' To adopt it across the board, we'd have to >

Re: [Qemu-block] [PATCH] qemu-img: make convert async

2017-02-24 Thread Kevin Wolf
Am 21.02.2017 um 13:29 hat Peter Lieven geschrieben: > the convert process is currently completely implemented with sync operations. > That means it reads one buffer and then writes it. No parallelism and each > sync > request takes as long as it takes until it is completed. > > This can be a

Re: [Qemu-block] [PATCH 00/54] New op blocker system, part 1

2017-02-24 Thread Kevin Wolf
Am 21.02.2017 um 15:57 hat Kevin Wolf geschrieben: > This series is the first part of implementing the new op blocker system > whose design was agreed on quite a while ago, but proved a bit tricky to > implement in places. There is more work to do to fully replace the old op > blocker system, but

Re: [Qemu-block] [PATCH 35/54] blockjob: Add permissions to block_job_add_bdrv()

2017-02-24 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > Block jobs don't actually do I/O through the the reference they create > with block_job_add_bdrv(), but they might want to use the permisssion > system to express what the block job does to intermediate nodes. This > adds permissions to block_job_add_bdrv()

Re: [Qemu-block] [PATCH 32/54] block: Add BdrvChildRole.get_parent_desc()

2017-02-24 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > For meaningful error messages in the permission system, we need to get > some human-readable description of the parent of a BdrvChild. > > Signed-off-by: Kevin Wolf > --- > block.c | 9 + >

Re: [Qemu-block] [PATCH 33/54] block: Include details on permission errors in message

2017-02-24 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > Instead of just telling that there was some conflict, we can be specific > and tell which permissions were in conflict and which way the conflict > is. > > Signed-off-by: Kevin Wolf > --- > block.c | 67 >

Re: [Qemu-block] [PATCH 31/54] blockjob: Add permissions to block_job_create()

2017-02-24 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > This functions creates a BlockBackend internally, so the block jobs need > to tell it what they want to do with the BB. > > Signed-off-by: Kevin Wolf > --- > block/backup.c | 5 +++-- > block/commit.c | 5

Re: [Qemu-block] [PATCH 30/54] hw/block: Introduce share-rw qdev property

2017-02-24 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > By default, don't allow another writer for block devices that are > attached to a guest device. For the cases where this setup is intended > (e.g. using a cluster filesystem on the disk), the new option can be > used to allow it. > > This change affects

Re: [Qemu-block] [PATCH 29/54] hw/block: Request permissions

2017-02-24 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > This makes all device emulations with a qdev drive property request > permissions on their BlockBackend. The only thing we block at this point > is resizing images for some devices that can't support it. > > Signed-off-by: Kevin Wolf >

Re: [Qemu-block] [PATCH 28/54] block: Allow error return in BlockDevOps.change_media_cb()

2017-02-24 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > Some devices allow a media change between read-only and read-write > media. They need to adapt the permissions in their .change_media_cb() > implementation, which can fail. So add an Error parameter to the > function. > > Signed-off-by: Kevin Wolf

Re: [Qemu-block] [PATCH 12/17] migration: add postcopy migration of dirty bitmaps

2017-02-24 Thread Dr. David Alan Gilbert
* Vladimir Sementsov-Ogievskiy (vsement...@virtuozzo.com) wrote: > Postcopy migration of dirty bitmaps. Only named dirty bitmaps, > associated with root nodes and non-root named nodes are migrated. > > If destination qemu is already containing a dirty bitmap with the same name > as a migrated

Re: [Qemu-block] [RFC v6] RBD: Add support readv,writev for rbd

2017-02-24 Thread Jaze Lee
Sorry, I do not know. I thought we should always add RFC all though the patch's life... What is the prefix i should add? PATH 0 ? 2017-02-24 19:42 GMT+08:00 Jeff Cody : > On Fri, Feb 24, 2017 at 02:09:31PM +0800, Jaze Lee wrote: >> 2017-02-24 11:52 GMT+08:00 Jeff Cody

Re: [Qemu-block] [RFC v6] RBD: Add support readv,writev for rbd

2017-02-24 Thread Jeff Cody
On Fri, Feb 24, 2017 at 02:09:31PM +0800, Jaze Lee wrote: > 2017-02-24 11:52 GMT+08:00 Jeff Cody : > > On Tue, Feb 21, 2017 at 02:50:03PM +0800, jaze...@gmail.com wrote: > >> From: tianqing > >> > >> Rbd can do readv and writev directly, so wo do not

Re: [Qemu-block] [PATCH 33/54] block: Include details on permission errors in message

2017-02-24 Thread Fam Zheng
On Tue, 02/21 15:58, Kevin Wolf wrote: > Instead of just telling that there was some conflict, we can be specific > and tell which permissions were in conflict and which way the conflict > is. > > Signed-off-by: Kevin Wolf > --- > block.c | 67 >