Re: [Qemu-block] write_zeroes/trim on the whole disk

2016-09-23 Thread Wouter Verhelst
On Fri, Sep 23, 2016 at 02:00:06PM -0500, Eric Blake wrote: > My preference would be a new flag to the existing commands, with > explicit documentation that 0 offset and 0 length must be used with that > flag, when requesting a full-device wipe. Alternatively, what about a flag that says "if you

Re: [Qemu-block] [PATCH 1/3] block: Add '-blockdev' command line option

2016-09-23 Thread Kevin Wolf
Am 22.09.2016 um 20:45 hat Eric Blake geschrieben: > On 09/22/2016 10:42 AM, Kevin Wolf wrote: > > This is an option that is directly mapped to the blockdev-add QMP > > command. It works more or less like -drive, except that it doesn't > > create a BlockBackend and doesn't support legacy options.

Re: [Qemu-block] [Qemu-devel] [PATCH v3 2/2] mirror: fix improperly filled copy_bitmap for mirror block job

2016-09-23 Thread Vladimir Sementsov-Ogievskiy
On 15.09.2016 19:34, Denis V. Lunev wrote: bdrv_is_allocated_above() returns true in the case even for completel zeroed areas as BDRV_BLOCK_ALLOCATED flag is set in both cases. The patch stops using bdrv_is_allocated_above() wrapper and switches to bdrv_get_block_status_above() to distinguish

[Qemu-block] [PATCH] block-backend: Preserve AioContext of root across medium change

2016-09-23 Thread Fam Zheng
This is nop for non-dataplane case, but it prevents crash (virtio_scsi_ctx_check assertion failure) when a scsi-cd change operation happens on a virtio-scsi dataplane device. Cc: qemu-sta...@nongnu.org Signed-off-by: Fam Zheng --- block/block-backend.c | 7 +++

Re: [Qemu-block] [PATCH 3/3] doc: Document driver-specific -blockdev options

2016-09-23 Thread Kevin Wolf
Am 22.09.2016 um 21:02 hat Eric Blake geschrieben: > On 09/22/2016 10:42 AM, Kevin Wolf wrote: > > This documents the driver-specific options for the raw, qcow2 and file > > block drivers for the man page. For everything else, we refer to the > > QAPI documentation. > > > > Signed-off-by: Kevin

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

2016-09-23 Thread Peter Maydell
On 22 September 2016 at 17:29, Kevin Wolf wrote: > The following changes since commit 430da7a81d356e368ccd88dcca60f38da9aa5b9a: > > Merge remote-tracking branch 'remotes/riku/tags/pull-linux-user-20160915' > into staging (2016-09-22 15:39:54 +0100) > > are available in the

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

2016-09-23 Thread Kevin Wolf
Am 23.09.2016 um 13:12 hat Peter Maydell geschrieben: > On 22 September 2016 at 17:29, Kevin Wolf wrote: > > The following changes since commit 430da7a81d356e368ccd88dcca60f38da9aa5b9a: > > > > Merge remote-tracking branch 'remotes/riku/tags/pull-linux-user-20160915' > > into

Re: [Qemu-block] [PATCH] block-backend: Preserve AioContext of root across medium change

2016-09-23 Thread Paolo Bonzini
On 23/09/2016 12:58, Fam Zheng wrote: > This is nop for non-dataplane case, but it prevents crash > (virtio_scsi_ctx_check assertion failure) when a scsi-cd change > operation happens on a virtio-scsi dataplane device. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Fam Zheng >

Re: [Qemu-block] [PATCH 1/3] block: Add '-blockdev' command line option

2016-09-23 Thread Eric Blake
On 09/23/2016 04:37 AM, Kevin Wolf wrote: >> >>> +static int blockdev_init_func(void *opaque, QemuOpts *opts, Error **errp) >>> +{ >>> +BlockdevOptions *options; >> >> Uninitialized... > > Oops, good catch. Thanks. > >>> +visit_free(v); >>> + >>> +v = qapi_dealloc_visitor_new(); >>>

[Qemu-block] [PULL v2 00/33] Block layer patches

2016-09-23 Thread Kevin Wolf
The following changes since commit e678c56f169bb576b607cda2a39c0b626ebfb221: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20160922' into staging (2016-09-22 18:23:14 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream

Re: [Qemu-block] [PATCH v5 0/3] block: allow flush on devices with open tray

2016-09-23 Thread Max Reitz
On 23.09.2016 03:45, John Snow wrote: > When I said "Final re-send," I was lying. Here's a v5. > The title is also a misnomer by now :) > > The move to blk_flush altered the behavior of migration and flushing > nodes that are not reachable via the guest, but are still reachable > via QEMU and may

[Qemu-block] [PATCH v2 3/7] block/qapi: Move 'aio' option to file driver

2016-09-23 Thread Kevin Wolf
The option whether or not to use a native AIO interface really isn't a generic option for all drivers, but only applies to the native file protocols. This patch moves the option in blockdev-add to the appropriate places (raw-posix and raw-win32). We still have to keep the flag BDRV_O_NATIVE_AIO

[Qemu-block] [PATCH v2 5/7] block: Use 'detect-zeroes' option for 'blockdev-change-medium'

2016-09-23 Thread Kevin Wolf
Instead of modifying the new BDS after it has been opened, use the newly supported 'detect-zeroes' option in bdrv_open_common() so that all requirements are checked (detect-zeroes=unmap requires discard=unmap). Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake

Re: [Qemu-block] [PATCH v2 3/7] block/qapi: Move 'aio' option to file driver

2016-09-23 Thread Eric Blake
On 09/23/2016 09:32 AM, Kevin Wolf wrote: > The option whether or not to use a native AIO interface really isn't a > generic option for all drivers, but only applies to the native file > protocols. This patch moves the option in blockdev-add to the > appropriate places (raw-posix and raw-win32). >

Re: [Qemu-block] [PATCH v2 4/7] block: Parse 'detect-zeroes' in bdrv_open_common()

2016-09-23 Thread Eric Blake
On 09/23/2016 09:32 AM, Kevin Wolf wrote: > Amongst others, this means that you can now use the 'detect-zeroes' > option for non-top-level nodes in blockdev-add, like the QAPI schema > promises. > > Signed-off-by: Kevin Wolf > --- > block.c| 33

Re: [Qemu-block] [PATCH v4 0/3] block: Fix libbz2 library dependency regresssion

2016-09-23 Thread Max Reitz
On 05.09.2016 04:50, Fam Zheng wrote: > v4: Remove unused variable in patch 1 and unwanted warning in patch 2. [Max] > > v3: Fix typo in copyright header. [Max] > Fix pre-existing type casting. [Max] > > v2: Rebase on top of Max's block-next tree, which has Colin's patches to >

[Qemu-block] [PATCH v2 1/7] block: Drop aio/cache consistency check from qmp_blockdev_add()

2016-09-23 Thread Kevin Wolf
The TODO comment has been addressed a while ago and this is now checked in raw-posix, so we don't have to special case this in blockdev-add any more. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- blockdev.c | 15 ---

[Qemu-block] [PATCH v2 6/7] block: Move 'discard' option to bdrv_open_common()

2016-09-23 Thread Kevin Wolf
This enables its use for nested child nodes. The compatibility between the 'discard' and 'detect-zeroes' setting is checked in bdrv_open_common() now as the former setting isn't available before calling bdrv_open() any more. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake

[Qemu-block] [PATCH v2 0/7] block: Make more blockdev-add options work

2016-09-23 Thread Kevin Wolf
This series moves a few more options from flags to the appropriate place. This doesn't only result in cleaner code, but also allows using these options in nested node definitions. After this series, bds_tree_init() is only a thin wrapper around bdrv_open() which sets the right defaults for cache

[Qemu-block] [PATCH v2 4/7] block: Parse 'detect-zeroes' in bdrv_open_common()

2016-09-23 Thread Kevin Wolf
Amongst others, this means that you can now use the 'detect-zeroes' option for non-top-level nodes in blockdev-add, like the QAPI schema promises. Signed-off-by: Kevin Wolf --- block.c| 33 + blockdev.c | 9 + 2 files changed, 34

[Qemu-block] [PATCH v2 2/7] block/qapi: Use separate options type for curl driver

2016-09-23 Thread Kevin Wolf
We're going to add an option to the file drivers which doesn't apply to the curl drivers, so give them a separate option type. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- qapi/block-core.json | 25 ++--- 1 file changed, 18

[Qemu-block] [PATCH v2 7/7] block: Remove qemu_root_bds_opts

2016-09-23 Thread Kevin Wolf
The remaining options in qemu_root_bds_opts (aio and copy-on-read) aren't used any more, the QAPI schema doesn't contain them. Therefore all the code processing qemu_root_bds_opts options is dead and can be removed. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake

Re: [Qemu-block] [PATCH v3 1/3] qemu-nbd: Add --fork option

2016-09-23 Thread Max Reitz
On 29.08.2016 18:59, Sascha Silbe wrote: > Dear Max, > > > thanks for taking the time to fix the race condition! > > > Max Reitz writes: > >> Using the --fork option, one can make qemu-nbd fork the worker process. >> The original process will exit on error of the worker or

Re: [Qemu-block] [PATCH] block-backend: Preserve AioContext of root across medium change

2016-09-23 Thread Max Reitz
On 23.09.2016 12:58, Fam Zheng wrote: > This is nop for non-dataplane case, but it prevents crash > (virtio_scsi_ctx_check assertion failure) when a scsi-cd change > operation happens on a virtio-scsi dataplane device. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Fam Zheng >

[Qemu-block] [PATCH v2 1/3] block: Add '-blockdev' command line option

2016-09-23 Thread Kevin Wolf
This is an option that is directly mapped to the blockdev-add QMP command. It works more or less like -drive, except that it doesn't create a BlockBackend and doesn't support legacy options. This patch adds minimal documentation, the next patches will improve it. Signed-off-by: Kevin Wolf

Re: [Qemu-block] [PATCH v4 1/1] block: improve error handling in raw_open

2016-09-23 Thread Max Reitz
On 23.09.2016 18:04, Max Reitz wrote: > On 08.09.2016 15:59, Halil Pasic wrote: >> Make raw_open for POSIX more consistent in handling errors by setting >> the error object also when qemu_open fails. The error object was set >> generally set in case of errors, but I guess this case was overlooked.

Re: [Qemu-block] [PATCH v2 1/3] block: Add '-blockdev' command line option

2016-09-23 Thread Eric Blake
On 09/23/2016 11:06 AM, Kevin Wolf wrote: > This is an option that is directly mapped to the blockdev-add QMP > command. It works more or less like -drive, except that it doesn't > create a BlockBackend and doesn't support legacy options. > > This patch adds minimal documentation, the next

Re: [Qemu-block] [Qemu-devel] [PATCH v2 0/3] Add -blockdev command line option

2016-09-23 Thread no-reply
Hi, Your series failed automatic 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: 1474646781-18951-1-git-send-email-kw...@redhat.com Subject: [Qemu-devel] [PATCH v2 0/3] Add

[Qemu-block] [PATCH v2 0/3] Add -blockdev command line option

2016-09-23 Thread Kevin Wolf
This series adds an option that is directly mapped to the blockdev-add QMP command. It works more or less like -drive, except that it doesn't create a BlockBackend (creating just a BDS without a BB is impossible with -drive) and doesn't support legacy options. Depends on Dan's "[PATCH v13 0/6]

[Qemu-block] [PATCH v2 2/3] doc: Document generic -blockdev options

2016-09-23 Thread Kevin Wolf
This adds documentation for the -blockdev options that apply to all nodes independent of the block driver used. All options that are shared by -blockdev and -drive are now explained in the section for -blockdev. The documentation of -drive mentions that all -blockdev options are accepted as well.

[Qemu-block] [PATCH] MAINTAINERS: Add some more headers to the IDE section

2016-09-23 Thread Thomas Huth
The folder include/hw/ide/ belongs to the IDE section. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index d8a0cfc..acf6d6c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -791,6 +791,7 @@ M: John Snow

Re: [Qemu-block] [Qemu-devel] [PATCH] MAINTAINERS: Add some more headers to the IDE section

2016-09-23 Thread John Snow
On 09/23/2016 12:09 PM, Thomas Huth wrote: The folder include/hw/ide/ belongs to the IDE section. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index d8a0cfc..acf6d6c 100644 --- a/MAINTAINERS +++

Re: [Qemu-block] [PATCH v2 2/3] doc: Document generic -blockdev options

2016-09-23 Thread Max Reitz
On 23.09.2016 18:06, Kevin Wolf wrote: > This adds documentation for the -blockdev options that apply to all > nodes independent of the block driver used. > > All options that are shared by -blockdev and -drive are now explained in > the section for -blockdev. The documentation of -drive mentions

Re: [Qemu-block] [PATCH v4 1/1] block: improve error handling in raw_open

2016-09-23 Thread Max Reitz
On 08.09.2016 15:59, Halil Pasic wrote: > Make raw_open for POSIX more consistent in handling errors by setting > the error object also when qemu_open fails. The error object was set > generally set in case of errors, but I guess this case was overlooked. > Do the same for win32. > >

[Qemu-block] [PATCH v2 3/3] doc: Document driver-specific -blockdev options

2016-09-23 Thread Kevin Wolf
This documents the driver-specific options for the raw, qcow2 and file block drivers for the man page. For everything else, we refer to the QAPI documentation. Signed-off-by: Kevin Wolf --- qemu-options.hx | 104 +++- 1 file

Re: [Qemu-block] [PULL v2 00/33] Block layer patches

2016-09-23 Thread Peter Maydell
On 23 September 2016 at 13:01, Kevin Wolf wrote: > The following changes since commit e678c56f169bb576b607cda2a39c0b626ebfb221: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20160922' into staging (2016-09-22 > 18:23:14 +0100) > > are available in

Re: [Qemu-block] [PATCH v2 3/3] doc: Document driver-specific -blockdev options

2016-09-23 Thread Eric Blake
On 09/23/2016 11:06 AM, Kevin Wolf wrote: > This documents the driver-specific options for the raw, qcow2 and file > block drivers for the man page. For everything else, we refer to the > QAPI documentation. > > Signed-off-by: Kevin Wolf > --- > qemu-options.hx | 104 >

Re: [Qemu-block] [Qemu-devel] [PATCH v5 0/3] block: allow flush on devices with open tray

2016-09-23 Thread John Snow
On 09/23/2016 11:35 AM, Max Reitz wrote: On 23.09.2016 03:45, John Snow wrote: When I said "Final re-send," I was lying. Here's a v5. The title is also a misnomer by now :) The move to blk_flush altered the behavior of migration and flushing nodes that are not reachable via the guest, but

Re: [Qemu-block] [PATCH v2 3/3] doc: Document driver-specific -blockdev options

2016-09-23 Thread Max Reitz
On 23.09.2016 18:06, Kevin Wolf wrote: > This documents the driver-specific options for the raw, qcow2 and file > block drivers for the man page. For everything else, we refer to the > QAPI documentation. > > Signed-off-by: Kevin Wolf > --- > qemu-options.hx | 104 >

Re: [Qemu-block] [PATCH v2 1/3] block: Add '-blockdev' command line option

2016-09-23 Thread Max Reitz
On 23.09.2016 18:06, Kevin Wolf wrote: > This is an option that is directly mapped to the blockdev-add QMP > command. It works more or less like -drive, except that it doesn't > create a BlockBackend and doesn't support legacy options. > > This patch adds minimal documentation, the next patches

[Qemu-block] write_zeroes/trim on the whole disk

2016-09-23 Thread Vladimir Sementsov-Ogievskiy
Hi all! There is a following problem. When we need to write_zeroes or trim the whole disk, we have to do it iteratively, because of 32-bit restriction on request length. For example, current implementation of mirror (see mirror_dirty_init()) do this by chunks of 2147418112 bytes (with default

Re: [Qemu-block] write_zeroes/trim on the whole disk

2016-09-23 Thread Eric Blake
On 09/23/2016 01:32 PM, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > There is a following problem. When we need to write_zeroes or trim the > whole disk, we have to do it iteratively, because of 32-bit restriction > on request length. > For example, current implementation of mirror (see