Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/6] block: Fragment reads to max transfer length

2016-07-14 Thread Eric Blake
On 07/08/2016 04:35 PM, Eric Blake wrote: > Drivers should be able to rely on the block layer honoring the > max transfer length, rather than needing to return -EINVAL > (iscsi) or manually fragment things (nbd). This patch adds > the fragmentation in the block layer, after requests have been > al

Re: [Qemu-block] [Qemu-devel] [PATCH] aio_ctx_check: follow CODING_STYLE

2016-07-14 Thread Cao jin
On 07/14/2016 10:08 PM, Eric Blake wrote: On 07/14/2016 07:10 AM, Cao jin wrote: replace tab with spaces Signed-off-by: Cao jin --- async.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Whitespace-only changes are best done as part of a series that is already touching nearby cod

Re: [Qemu-block] [PATCH v3] aio-posix: remove useless parameter

2016-07-14 Thread Cao jin
On 07/14/2016 10:10 PM, Eric Blake wrote: On 07/14/2016 06:57 AM, Cao jin wrote: Parameter **errp of aio_context_setup() is useless, remove it and clean up the related code. Cc: Stefan Hajnoczi Cc: Fam Zheng Cc: Eric Blake Signed-off-by: Cao jin --- aio-posix.c | 3 ++- aio-win

[Qemu-block] [PATCH v9.5 11/17] block: Simplify drive-mirror

2016-07-14 Thread Eric Blake
Now that we can support boxed commands, use it to greatly reduce the number of parameters (and likelihood of getting out of sync) when adjusting drive-mirror parameters. Signed-off-by: Eric Blake Reviewed-by: John Snow --- v9.5: Rebase to commit 71aa9867 adding job-id v9: s/box/boxed/, trivial

Re: [Qemu-block] [Qemu-devel] [PATCH v9 11/17] block: Simplify drive-mirror

2016-07-14 Thread Eric Blake
On 07/13/2016 09:50 PM, Eric Blake wrote: > Now that we can support boxed commands, use it to greatly > reduce the number of parameters (and likelihood of getting > out of sync) when adjusting drive-mirror parameters. > > Signed-off-by: Eric Blake > Reviewed-by: John Snow > > --- > v9: s/box/bo

Re: [Qemu-block] [PATCH v4 11/11] nbd-server: Allow node name for nbd-server-add

2016-07-14 Thread Eric Blake
On 07/14/2016 07:28 AM, Kevin Wolf wrote: > There is no reason why an NBD server couldn't be started for any node, > even if it's not on the top level. This converts nbd-server-add to > accept a node-name. > > Note that there is a semantic difference between using a BlockBackend > name and the nod

Re: [Qemu-block] [PATCH v4 10/11] nbd-server: Use a separate BlockBackend

2016-07-14 Thread Eric Blake
On 07/14/2016 07:28 AM, Kevin Wolf wrote: > The builtin NBD server uses its own BlockBackend now instead of reusing > the monitor/guest device one. > > This means that it has its own writethrough setting now. The builtin > NBD server always uses writeback caching now regardless of whether the > gu

Re: [Qemu-block] [PATCH v2] rbd: reload ceph config for block device

2016-07-14 Thread Eric Blake
On 07/14/2016 02:53 PM, Vaibhav Bhembre wrote: > Thanks Eric! meta-comment - your mailer's default quoting behavior makes it very hard to read your replies. Observe: > > On Thu, Jul 14, 2016 at 4:28 PM, Eric Blake wrote: > >> On 07/14/2016 01:32 PM, Vaibhav Bhembre wrote: >>> This patch adds

Re: [Qemu-block] [PATCH v4 09/11] block: Accept node-name for drive-mirror

2016-07-14 Thread Eric Blake
On 07/14/2016 07:28 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow node-names everywhere. This converts > drive-mirror to accept a node-name without lifting the restriction that > we're operating at a root node. > > In cas

Re: [Qemu-block] [PATCH v4 07/11] block: Accept node-name for change-backing-file

2016-07-14 Thread Eric Blake
On 07/14/2016 07:28 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow node-names everywhere. This converts > change-backing-file to accept a node-name without lifting the > restriction that we're operating at a root node. > >

Re: [Qemu-block] [PATCH v4 08/11] block: Accept node-name for drive-backup

2016-07-14 Thread Eric Blake
On 07/14/2016 07:28 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow node-names everywhere. This converts > drive-backup and the corresponding transaction action to accept a > node-name without lifting the restriction that we

Re: [Qemu-block] [Qemu-devel] [PATCH v5 07/10] hbitmap: serialization

2016-07-14 Thread John Snow
On 06/28/2016 10:15 AM, Vladimir Sementsov-Ogievskiy wrote: > On 03.06.2016 07:32, Fam Zheng wrote: >> From: Vladimir Sementsov-Ogievskiy >> >> Functions to serialize / deserialize(restore) HBitmap. HBitmap should be >> saved to linear sequence of bits independently of endianness and bitmap >> a

Re: [Qemu-block] [PATCH v4 06/11] block: Accept node-name for blockdev-snapshot-internal-sync

2016-07-14 Thread Eric Blake
On 07/14/2016 07:28 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow node-names everywhere. This converts > blockdev-snapshot-internal-sync to accept a node-name without lifting > the restriction that we're operating at a roo

Re: [Qemu-block] [PATCH v2] rbd: reload ceph config for block device

2016-07-14 Thread Eric Blake
On 07/14/2016 01:32 PM, Vaibhav Bhembre wrote: > This patch adds ability to reload ceph configuration for an attached RBD > block device. This is necessary for the cases where rebooting a VM and/or > detaching-reattaching a RBD drive is not an easy option. Probably worth including qemu-block@nongn

Re: [Qemu-block] [PATCH v4 05/11] block: Accept node-name for blockdev-snapshot-delete-internal-sync

2016-07-14 Thread Eric Blake
On 07/14/2016 07:28 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow node-names everywhere. This converts > blockdev-snapshot-delete-internal-sync to accept a node-name without > lifting the restriction that we're operating a

Re: [Qemu-block] [PATCH v4 04/11] block: Accept node-name for blockdev-mirror

2016-07-14 Thread Eric Blake
On 07/14/2016 07:28 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow node-names everywhere. This converts > blockdev-mirror to accept a node-name without lifting the restriction > that we're operating at a root node. > > Sig

Re: [Qemu-block] [PATCH v5 04/10] block: Support meta dirty bitmap

2016-07-14 Thread John Snow
On 06/22/2016 11:53 AM, Max Reitz wrote: > On 03.06.2016 06:32, Fam Zheng wrote: >> The added group of operations enables tracking of the changed bits in >> the dirty bitmap. >> >> Signed-off-by: Fam Zheng >> --- >> block/dirty-bitmap.c | 52 >> +

Re: [Qemu-block] [Qemu-devel] [PATCH 2/2] scsi: scsi-cd without drive property for empty drive

2016-07-14 Thread Eric Blake
On 07/14/2016 07:49 AM, Kevin Wolf wrote: > This allows to create an empty scsi-cd device without manually creating Grammar might sound better as: This allows the creation of an empty or This allows a user to create an empty > a BlockBackend. > > Signed-off-by: Kevin Wolf > --- > hw/scsi/sc

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] ide: ide-cd without drive property for empty drive

2016-07-14 Thread Eric Blake
On 07/14/2016 07:49 AM, Kevin Wolf wrote: > This allows to create an empty ide-cd device without manually creating a > BlockBackend. > > Signed-off-by: Kevin Wolf > --- > hw/ide/qdev.c | 20 +++- > 1 file changed, 15 insertions(+), 5 deletions(-) > @@ -158,6 +154,16 @@ static in

Re: [Qemu-block] [Qemu-devel] [PULL v2 11/34] blockjob: Update description of the 'device' field in the QMP API

2016-07-14 Thread Eric Blake
On 07/13/2016 06:50 AM, Kevin Wolf wrote: > From: Alberto Garcia > > The 'device' field in all BLOCK_JOB_* events and 'block-job-*' command > is no longer the device name, but the ID of the job. This patch > updates the documentation to clarify that. > > Signed-off-by: Alberto Garcia > Reviewed

Re: [Qemu-block] [PATCH v3 4/8] mirror: create mirror_dirty_init helper for mirror_run

2016-07-14 Thread Denis V. Lunev
On 07/14/2016 07:19 PM, Eric Blake wrote: On 07/14/2016 07:33 AM, Denis V. Lunev wrote: The code inside the helper will be extended in the next patch. mirror_run itself is overbloated at the moment. Signed-off-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake

Re: [Qemu-block] [Qemu-devel] [PATCH v6 6/6] tests: changed block job ready event generation order

2016-07-14 Thread John Snow
On 07/14/2016 12:07 PM, Eric Blake wrote: > On 07/14/2016 06:29 AM, Denis V. Lunev wrote: >> From: Evgeny Yakovlev >> >> Due to skipped flushes on bdrv_co_flush BLOCK_JOB_READY events >> for driver-mirror and active block-commit commands now arrives faster, >> before QMP send successfully return

Re: [Qemu-block] [PATCH v2] qcow2: do not allocate extra memory

2016-07-14 Thread John Snow
On 07/14/2016 12:59 PM, Vladimir Sementsov-Ogievskiy wrote: > There are no needs to allocate more than one cluster, as we set > avail_out for deflate to one cluster. > > Zlib docs (http://www.zlib.net/manual.html) says: > "deflate compresses as much data as possible, and stops when the input > b

[Qemu-block] [PATCH v4 30/32] blockdev: Remove the .bdrv_probe field from BlockDrivers

2016-07-14 Thread Colin Lord
This commit finalizes the separation of the block driver and probe function by removing the .bdrv_probe field from all BlockDrivers. Probing is now accomplished solely by iterating over the array of probe function pointers in the format_probes array. Signed-off-by: Colin Lord Reviewed-by: Max Rei

[Qemu-block] [PATCH v4 31/32] blockdev: Separate out bdrv_probe_device functions

2016-07-14 Thread Colin Lord
This puts the bdrv_probe_device functions into their own files to facilitate the modularization of the block drivers. Signed-off-by: Colin Lord Reviewed-by: Max Reitz --- block/Makefile.objs | 1 + block/host_cdrom-probe.c | 40 + block/host_device-pr

[Qemu-block] [PATCH v4 32/32] blockdev: Remove bdrv_probe_device field from BlockDriver

2016-07-14 Thread Colin Lord
This commit finalizes the separation of the BlockDriver from its device probing function. Now the accesses to these functions in block.c occur through the protocol_probes array, and each function returns a score and protocol name with which to find the corresponding driver. Signed-off-by: Colin Lo

[Qemu-block] [PATCH v4 28/32] blockdev: Separate vmdk probe from its driver

2016-07-14 Thread Colin Lord
Completes the separation of the vmdk probe from the vmdk driver. The vmdk probe now returns the format in addition to the score, allowing correlation of the score and driver without the probe function being part of the driver itself. Signed-off-by: Colin Lord Reviewed-by: Max Reitz --- block.c

[Qemu-block] [PATCH v4 23/32] blockdev: Separate qcow2 probe from its driver

2016-07-14 Thread Colin Lord
Completes the separation of the qcow2 probe from the qcow2 driver. The qcow2 probe now returns the format in addition to the score, allowing correlation of the score and driver without the probe function being part of the driver itself. Signed-off-by: Colin Lord Reviewed-by: Max Reitz --- block

[Qemu-block] [PATCH v4 20/32] blockdev: Separate dmg probe from its driver

2016-07-14 Thread Colin Lord
Completes the separation of the dmg probe from the dmg driver. The dmg probe now returns the format in addition to the score, allowing correlation of the score and driver without the probe function being part of the driver itself. Signed-off-by: Colin Lord Reviewed-by: Max Reitz --- block.c

[Qemu-block] [PATCH v4 16/32] blockdev: Move vpc probe to its own file

2016-07-14 Thread Colin Lord
Isolates vpc probe as part of the modularization process. Signed-off-by: Colin Lord Reviewed-by: Max Reitz --- block/Makefile.objs | 2 +- block/vpc-probe.c | 9 + block/vpc.c | 8 +--- include/block/probe.h | 1 + 4 files changed, 12 insertions(+), 8 deletions(-) c

[Qemu-block] [PATCH v4 19/32] blockdev: Separate luks probe from its driver

2016-07-14 Thread Colin Lord
Completes the separation of the luks probe from the crypto driver. The luks probe now returns the format in addition to the score, allowing correlation of the score and driver without the probe function being part of the driver itself. Signed-off-by: Colin Lord Reviewed-by: Max Reitz --- block.

[Qemu-block] [PATCH v4 21/32] blockdev: Separate parallels probe from its driver

2016-07-14 Thread Colin Lord
Completes the separation of the parallels probe from the parallels driver. The parallels probe now returns the format in addition to the score, allowing correlation of the score and driver without the probe function being part of the driver itself. Signed-off-by: Colin Lord Reviewed-by: Max Reitz

[Qemu-block] [PATCH v4 18/32] blockdev: Separate cloop probe from its driver

2016-07-14 Thread Colin Lord
Completes the separation of the cloop probe from the cloop driver. The cloop probe now returns the format in addition to the score, allowing correlation of the score and driver without the probe function being part of the driver itself. Signed-off-by: Colin Lord Reviewed-by: Max Reitz --- block

[Qemu-block] [PATCH v4 12/32] blockdev: Move raw probe to its own file

2016-07-14 Thread Colin Lord
Isolate raw probe as part of the modularization process. Signed-off-by: Colin Lord Reviewed-by: Max Reitz --- block/Makefile.objs | 1 + block/raw-probe.c | 10 ++ block/raw_bsd.c | 9 + include/block/probe.h | 1 + 4 files changed, 13 insertions(+), 8 deletions(-

[Qemu-block] [PATCH v4 22/32] blockdev: Separate qcow probe from its driver

2016-07-14 Thread Colin Lord
Completes the separation of the qcow probe from the qcow driver. The qcow probe now returns the format in addition to the score, allowing correlation of the score and driver without the probe function being part of the driver itself. Signed-off-by: Colin Lord Reviewed-by: Max Reitz --- block.c

[Qemu-block] [PATCH v4 14/32] blockdev: Move vhdx probe to its own file

2016-07-14 Thread Colin Lord
Isolates vhdx probe as part of the modularization process. Signed-off-by: Colin Lord Reviewed-by: Max Reitz --- block/Makefile.objs | 2 +- block/vhdx-probe.c| 21 + block/vhdx.c | 20 +--- include/block/probe.h | 1 + 4 files changed, 24 ins

[Qemu-block] [PATCH v4 17/32] blockdev: Separate bochs probe from its driver

2016-07-14 Thread Colin Lord
Modifies the bochs probe to return the format name as well as the score as the final step of separating the probe function from the driver. This keeps the probe completely independent of the driver, making future modularization easier to accomplish. Returning the format name as well as the score al

[Qemu-block] [PATCH v4 29/32] blockdev: Separate vpc probe from its driver

2016-07-14 Thread Colin Lord
Completes the separation of the vpc probe from the vpc driver. The vpc probe now returns the format in addition to the score, allowing correlation of the score and driver without the probe function being part of the driver itself. Signed-off-by: Colin Lord Reviewed-by: Max Reitz --- block.c

[Qemu-block] [PATCH v4 27/32] blockdev: Separate vhdx probe from its driver

2016-07-14 Thread Colin Lord
Completes the separation of the vhdx probe from the vhdx driver. The vhdx probe now returns the format in addition to the score, allowing correlation of the score and driver without the probe function being part of the driver itself. Signed-off-by: Colin Lord Reviewed-by: Max Reitz --- block.c

[Qemu-block] [PATCH v4 26/32] blockdev: Separate vdi probe from its driver

2016-07-14 Thread Colin Lord
Completes the separation of the vdi probe from the vdi driver. The vdi probe now returns the format in addition to the score, allowing correlation of the score and driver without the probe function being part of the driver itself. Signed-off-by: Colin Lord Reviewed-by: Max Reitz --- block.c

[Qemu-block] [PATCH v4 13/32] blockdev: Move vdi probe to its own file

2016-07-14 Thread Colin Lord
Isolates vdi probe as part of the modularization process. Signed-off-by: Colin Lord Reviewed-by: Max Reitz --- block/Makefile.objs | 2 +- block/vdi-probe.c | 26 +++ block/vdi.c | 69 ++- block/vdi.h | 4

[Qemu-block] [PATCH v4 24/32] blockdev: Separate qed probe from its driver

2016-07-14 Thread Colin Lord
Completes the separation of the qed probe from the qed driver. The qed probe now returns the format in addition to the score, allowing correlation of the score and driver without the probe function being part of the driver itself. Signed-off-by: Colin Lord Reviewed-by: Max Reitz --- block.c

[Qemu-block] [PATCH v4 25/32] blockdev: Separate raw probe from its driver

2016-07-14 Thread Colin Lord
Completes the separation of the raw probe from the raw driver. The raw probe now returns the format in addition to the score, allowing correlation of the score and driver without the probe function being part of the driver itself. Signed-off-by: Colin Lord Reviewed-by: Max Reitz --- block.c

[Qemu-block] [PATCH v4 10/32] blockdev: Move qcow2 probe to its own file

2016-07-14 Thread Colin Lord
Isolates qcow2 probe as part of the modularization process. Signed-off-by: Colin Lord Reviewed-by: Max Reitz --- block/Makefile.objs | 2 +- block/qcow2-probe.c | 16 block/qcow2.c | 13 + include/block/probe.h | 1 + 4 files changed, 19 insertions(+),

[Qemu-block] [PATCH v4 05/32] blockdev: Move cloop probe to its own file

2016-07-14 Thread Colin Lord
Isolates cloop probing function as part of the modularization process. Signed-off-by: Colin Lord Reviewed-by: Max Reitz --- block/Makefile.objs | 2 +- block/cloop-probe.c | 17 + block/cloop.c | 16 +--- include/block/probe.h | 1 + 4 files changed, 20

[Qemu-block] [PATCH v4 04/32] blockdev: Move bochs probe into separate file

2016-07-14 Thread Colin Lord
This puts the bochs probe function into its own separate file as part of the process of modularizing block drivers. Having the probe functions separate from the rest of the driver allows us to probe without having to potentially unnecessarily load the driver. Signed-off-by: Colin Lord Reviewed-by

[Qemu-block] [PATCH v4 02/32] blockdev: Add dynamic generation of module_block.h

2016-07-14 Thread Colin Lord
From: Marc Mari To simplify the addition of new block modules, add a script that generates module_block.h automatically from the modules' source code. This script assumes that the QEMU coding style rules are followed. Signed-off-by: Marc MarĂ­ Signed-off-by: Colin Lord Reviewed-by: Max Reitz

[Qemu-block] [PATCH v4 11/32] blockdev: Move qed probe to its own file

2016-07-14 Thread Colin Lord
Isolate qed probe as part of the modularization process. Signed-off-by: Colin Lord Reviewed-by: Max Reitz --- block/Makefile.objs | 2 +- block/qed-probe.c | 18 ++ block/qed.c | 15 +-- include/block/probe.h | 1 + 4 files changed, 21 insertions(+)

[Qemu-block] [PATCH v4 09/32] blockdev: Move qcow probe to its own file

2016-07-14 Thread Colin Lord
Isolates qcow probe as part of the modularization process. Signed-off-by: Colin Lord Reviewed-by: Max Reitz --- block/Makefile.objs | 2 +- block/qcow-probe.c| 16 block/qcow.c | 31 ++- block/qcow.h | 21

[Qemu-block] [PATCH v4 03/32] blockdev: Add dynamic module loading for block drivers

2016-07-14 Thread Colin Lord
From: Marc Mari Extend the current module interface to allow for block drivers to be loaded dynamically on request. The only block drivers that can be converted into modules are the drivers that don't perform any init operation except for registering themselves. All the necessary module informa

[Qemu-block] [PATCH v4 15/32] blockdev: Move vmdk probe to its own file

2016-07-14 Thread Colin Lord
Isolates vmdk probe as part of the modularization process. Signed-off-by: Colin Lord Reviewed-by: Max Reitz --- block/Makefile.objs | 2 +- block/vmdk-probe.c| 60 +++ block/vmdk.c | 60 ++---

[Qemu-block] [PATCH v4 01/32] blockdev: prepare iSCSI block driver for dynamic loading

2016-07-14 Thread Colin Lord
This commit moves the initialization of the QemuOptsList qemu_iscsi_opts struct out of block/iscsi.c in order to allow the iscsi module to be dynamically loaded. Signed-off-by: Colin Lord Reviewed-by: Fam Zheng --- block/iscsi.c | 36 vl.c | 38

[Qemu-block] [PATCH v4 06/32] blockdev: Move luks probe to its own file

2016-07-14 Thread Colin Lord
Isolates the luks probe function as part of the modularization process. Signed-off-by: Colin Lord Reviewed-by: Max Reitz --- block/Makefile.objs | 2 +- block/crypto-probe.c | 23 +++ block/crypto.c| 21 + include/block/probe.h | 2 ++ 4 file

[Qemu-block] [PATCH v4 00/32] Dynamic module loading for block drivers

2016-07-14 Thread Colin Lord
Here's v4 of the modularization series. Things that have changed since v3 include: - Fix indentation of the generated header file module_block.h - Drivers and probe functions are now all located in the block/ directory, rather than being split between block/ and block/probe/. In addition the h

[Qemu-block] [PATCH v4 08/32] blockdev: Move parallels probe to its own file

2016-07-14 Thread Colin Lord
Isolate parallels probe as part of the modularization process. Signed-off-by: Colin Lord Reviewed-by: Max Reitz --- block/Makefile.objs | 1 + block/parallels-probe.c | 21 + block/parallels.c | 43 ++- block/parallels.h

[Qemu-block] [PATCH v4 07/32] blockdev: Move dmg probe to its own file

2016-07-14 Thread Colin Lord
Isolate dmg probe as part of the modularization process. Signed-off-by: Colin Lord Reviewed-by: Max Reitz --- block/Makefile.objs | 2 +- block/dmg-probe.c | 17 + block/dmg.c | 16 +--- include/block/probe.h | 1 + 4 files changed, 20 insertions(+)

Re: [Qemu-block] [PATCH v2] qcow2: do not allocate extra memory

2016-07-14 Thread Eric Blake
On 07/14/2016 10:59 AM, Vladimir Sementsov-Ogievskiy wrote: > There are no needs to allocate more than one cluster, as we set > avail_out for deflate to one cluster. > > Zlib docs (http://www.zlib.net/manual.html) says: > "deflate compresses as much data as possible, and stops when the input > buf

[Qemu-block] [PATCH v2] mirror: double performance of the bulk stage if the disc is full

2016-07-14 Thread Vladimir Sementsov-Ogievskiy
Mirror can do up to 16 in-flight requests, but actually on full copy (the whole source disk is non-zero) in-flight is always 1. This happens as the request is not limited in size: the data occupies maximum available capacity of s->buf. The patch limits the size of the request to some artificial co

[Qemu-block] [PATCH v2] qcow2: do not allocate extra memory

2016-07-14 Thread Vladimir Sementsov-Ogievskiy
There are no needs to allocate more than one cluster, as we set avail_out for deflate to one cluster. Zlib docs (http://www.zlib.net/manual.html) says: "deflate compresses as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full." So, deflate will

Re: [Qemu-block] [PATCH v3 4/8] mirror: create mirror_dirty_init helper for mirror_run

2016-07-14 Thread Eric Blake
On 07/14/2016 07:33 AM, Denis V. Lunev wrote: > The code inside the helper will be extended in the next patch. mirror_run > itself is overbloated at the moment. > > Signed-off-by: Denis V. Lunev > Reviewed-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Eric Blake I did NOT give R-b on v2 3/7.

Re: [Qemu-block] [PATCH v4 03/11] block: Accept node-name for blockdev-backup

2016-07-14 Thread Eric Blake
On 07/14/2016 07:28 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow node-names everywhere. This converts > blockdev-backup and the corresponding transaction action to accept a > node-name without lifting the restriction that

Re: [Qemu-block] [Qemu-devel] [PATCH v6 6/6] tests: changed block job ready event generation order

2016-07-14 Thread Eric Blake
On 07/14/2016 06:29 AM, Denis V. Lunev wrote: > From: Evgeny Yakovlev > > Due to skipped flushes on bdrv_co_flush BLOCK_JOB_READY events > for driver-mirror and active block-commit commands now arrives faster, > before QMP send successfully returns to caller. > > This change expects for block jo

Re: [Qemu-block] [Qemu-devel] [PATCH v6 5/6] tests: removed skipped flushes from block test traces

2016-07-14 Thread Eric Blake
On 07/14/2016 06:29 AM, Denis V. Lunev wrote: > From: Evgeny Yakovlev > > bdrv_co_flush is now skipping flushes in case underlying media has no > actual changes. This affected some blkdebug testcases that were > expecting error logs from failure-injected flushes which are now > skipped entirely.

Re: [Qemu-block] [Qemu-devel] [PATCH v6 3/6] tests: in IDE and AHCI tests perform DMA write before flushing

2016-07-14 Thread Eric Blake
On 07/14/2016 06:29 AM, Denis V. Lunev wrote: > From: Evgeny Yakovlev > > Due to changes in flush behaviour clean disks stopped generating > flush_to_disk events and IDE and AHCI tests that test flush commands > started to fail. > > This change adds additional DMA writes to affected tests before

Re: [Qemu-block] [PATCH v3 3/8] mirror: create mirror_throttle helper

2016-07-14 Thread Eric Blake
On 07/14/2016 07:33 AM, Denis V. Lunev wrote: > The patch also places last_pause_ns from stack in mirror_run into > MirrorBlockJob structure. This helper will be useful in next patches. > > Signed-off-by: Denis V. Lunev > CC: Vladimir Sementsov-Ogievskiy > CC: Eric Blake > CC: Stefan Hajnoczi

Re: [Qemu-block] [PATCH v4 02/11] block: Accept node-name for block-commit

2016-07-14 Thread Eric Blake
On 07/14/2016 07:28 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow node-names everywhere. This converts > block-commit to accept a node-name without lifting the restriction that > we're operating at a root node. > > As lib

Re: [Qemu-block] [PATCH v3] aio-posix: remove useless parameter

2016-07-14 Thread Eric Blake
On 07/14/2016 06:57 AM, Cao jin wrote: > Parameter **errp of aio_context_setup() is useless, remove it > and clean up the related code. > > Cc: Stefan Hajnoczi > Cc: Fam Zheng > Cc: Eric Blake > Signed-off-by: Cao jin > --- > aio-posix.c | 3 ++- > aio-win32.c | 2 +- > async.

Re: [Qemu-block] [PATCH v4 01/11] block: Accept node-name for block-stream

2016-07-14 Thread Eric Blake
On 07/14/2016 07:28 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow node-names everywhere. This converts > block-stream to accept a node-name without lifting the restriction that > we're operating at a root node. > > In cas

[Qemu-block] [PATCH v3 6/8] mirror: optimize dirty bitmap filling in mirror_run a bit

2016-07-14 Thread Denis V. Lunev
There is no need to scan allocation tables if we have mark_all_dirty flag set. Just mark it all dirty. Signed-off-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Reviewed-by: John Snow Reviewed-by: Fam Zheng CC: Stefan Hajnoczi CC: Kevin Wolf CC: Max Reit

[Qemu-block] [PATCH 0/2] block: Create empty drives without explicit BB

2016-07-14 Thread Kevin Wolf
This series allows creating empty IDE and SCSI CD-ROM drives by leaving out the drive=... option. At the moment, such drives are still relatively useless because you can't insert a medium at runtime yet, but we'll change the QMP commands soon to accept qdev device names instead of BlockBackend name

Re: [Qemu-block] [Qemu-devel] [PATCH] aio_ctx_check: follow CODING_STYLE

2016-07-14 Thread Eric Blake
On 07/14/2016 07:10 AM, Cao jin wrote: > replace tab with spaces > > Signed-off-by: Cao jin > --- > async.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Whitespace-only changes are best done as part of a series that is already touching nearby code for other reasons (depending on the

[Qemu-block] [PATCH v3 2/8] mirror: make sectors_in_flight int64_t

2016-07-14 Thread Denis V. Lunev
We keep here the sum of int fields. Thus this could easily overflow, especially when we will start sending big requests in next patches. Signed-off-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Reviewed-by: John Snow Reviewed-by: Fam Zheng CC: Stefan Haj

[Qemu-block] [PATCH v3 8/8] mirror: improve performance of mirroring of empty disk

2016-07-14 Thread Denis V. Lunev
We should not take into account zero blocks for delay calculations. They are not read and thus IO throttling is not required. In the other case VM migration with 16 Tb QCOW2 disk with 4 Gb of data takes days. Signed-off-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Fa

[Qemu-block] [PATCH 2/2] scsi: scsi-cd without drive property for empty drive

2016-07-14 Thread Kevin Wolf
This allows to create an empty scsi-cd device without manually creating a BlockBackend. Signed-off-by: Kevin Wolf --- hw/scsi/scsi-disk.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 8dbfc10..b4e71ff 100644 --- a/hw/scsi/scsi-disk.c +++

[Qemu-block] [PATCH v4 10/11] nbd-server: Use a separate BlockBackend

2016-07-14 Thread Kevin Wolf
The builtin NBD server uses its own BlockBackend now instead of reusing the monitor/guest device one. This means that it has its own writethrough setting now. The builtin NBD server always uses writeback caching now regardless of whether the guest device has WCE enabled. qemu-nbd respects the cach

[Qemu-block] [PATCH 1/2] ide: ide-cd without drive property for empty drive

2016-07-14 Thread Kevin Wolf
This allows to create an empty ide-cd device without manually creating a BlockBackend. Signed-off-by: Kevin Wolf --- hw/ide/qdev.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index 67c76bf..2eb055a 100644 --- a/hw/ide/qd

[Qemu-block] [PATCH v4 08/11] block: Accept node-name for drive-backup

2016-07-14 Thread Kevin Wolf
In order to remove the necessity to use BlockBackend names in the external API, we want to allow node-names everywhere. This converts drive-backup and the corresponding transaction action to accept a node-name without lifting the restriction that we're operating at a root node. In case of an inval

[Qemu-block] [PATCH v4 09/11] block: Accept node-name for drive-mirror

2016-07-14 Thread Kevin Wolf
In order to remove the necessity to use BlockBackend names in the external API, we want to allow node-names everywhere. This converts drive-mirror to accept a node-name without lifting the restriction that we're operating at a root node. In case of an invalid device name, the command returns the G

[Qemu-block] [PATCH v4 01/11] block: Accept node-name for block-stream

2016-07-14 Thread Kevin Wolf
In order to remove the necessity to use BlockBackend names in the external API, we want to allow node-names everywhere. This converts block-stream to accept a node-name without lifting the restriction that we're operating at a root node. In case of an invalid device name, the command returns the G

[Qemu-block] [PATCH] aio_ctx_check: follow CODING_STYLE

2016-07-14 Thread Cao jin
replace tab with spaces Signed-off-by: Cao jin --- async.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/async.c b/async.c index 1f9754b..8589017 100644 --- a/async.c +++ b/async.c @@ -217,7 +217,7 @@ aio_ctx_check(GSource *source) for (bh = ctx->first_bh; bh; bh = bh-

[Qemu-block] [PATCH v3 1/8] dirty-bitmap: operate with int64_t amount

2016-07-14 Thread Denis V. Lunev
Underlying HBitmap operates even with uint64_t. Thus this change is safe. This would be useful f.e. to mark entire bitmap dirty in one call. Signed-off-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Reviewed-by: John Snow Reviewed-by: Fam Zheng CC: Stefan

[Qemu-block] [PATCH v3 3/8] mirror: create mirror_throttle helper

2016-07-14 Thread Denis V. Lunev
The patch also places last_pause_ns from stack in mirror_run into MirrorBlockJob structure. This helper will be useful in next patches. Signed-off-by: Denis V. Lunev CC: Vladimir Sementsov-Ogievskiy CC: Eric Blake CC: Stefan Hajnoczi CC: Fam Zheng CC: Kevin Wolf CC: Max Reitz CC: Jeff Cody

[Qemu-block] [PATCH v3 5/8] block: remove extra condition in bdrv_can_write_zeroes_with_unmap

2016-07-14 Thread Denis V. Lunev
All .bdrv_co_write_zeroes callbacks nowadays work perfectly even with backing store attached. If future new callbacks would be unable to do that - they have a chance to block this in bdrv_get_info(). Signed-off-by: Denis V. Lunev Reviewed-by: Eric Blake Reviewed-by: John Snow Reviewed-by: Fam Z

[Qemu-block] [PATCH v3 0/8] drive-mirror improvements

2016-07-14 Thread Denis V. Lunev
This patchset contains patches dealing with known-to-be-zero areas in drive mirror from [PATCH 0/9] major rework of drive-mirror patchset. Changes from v2: - added mirror_throttle helper (patch 3) to address Eric' comment about last_time_ns - comment tweaks (thank you, Eric) - marked mirror_dirt

[Qemu-block] [PATCH v3 4/8] mirror: create mirror_dirty_init helper for mirror_run

2016-07-14 Thread Denis V. Lunev
The code inside the helper will be extended in the next patch. mirror_run itself is overbloated at the moment. Signed-off-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Reviewed-by: Fam Zheng CC: Stefan Hajnoczi CC: Kevin Wolf CC: Max Reitz CC: Jeff Cody

[Qemu-block] [PATCH v3 7/8] mirror: efficiently zero out target

2016-07-14 Thread Denis V. Lunev
With a bdrv_co_write_zeroes method on a target BDS and when this method is working as indicated by the bdrv_can_write_zeroes_with_unmap(), zeroes will not be placed into the wire. Thus the target could be very efficiently zeroed out. This should be done with the largest chunk possible. Signed-off-

[Qemu-block] [PATCH v4 05/11] block: Accept node-name for blockdev-snapshot-delete-internal-sync

2016-07-14 Thread Kevin Wolf
In order to remove the necessity to use BlockBackend names in the external API, we want to allow node-names everywhere. This converts blockdev-snapshot-delete-internal-sync to accept a node-name without lifting the restriction that we're operating at a root node. In case of an invalid device name,

[Qemu-block] [PATCH v4 04/11] block: Accept node-name for blockdev-mirror

2016-07-14 Thread Kevin Wolf
In order to remove the necessity to use BlockBackend names in the external API, we want to allow node-names everywhere. This converts blockdev-mirror to accept a node-name without lifting the restriction that we're operating at a root node. Signed-off-by: Kevin Wolf --- blockdev.c | 10

[Qemu-block] [PATCH v6 2/6] ide: set retry_unit for PIO and FLUSH requests

2016-07-14 Thread Denis V. Lunev
From: Evgeny Yakovlev The following sequence of tests discovered a problem in IDE emulation: 1. Send DMA write to IDE device 0 2. Send CMD_FLUSH_CACHE to same IDE device which will be failed by block layer using blkdebug script in tests/ide-test:test_retry_flush When doing DMA request ide/core.c

[Qemu-block] [PATCH v6 5/6] tests: removed skipped flushes from block test traces

2016-07-14 Thread Denis V. Lunev
From: Evgeny Yakovlev bdrv_co_flush is now skipping flushes in case underlying media has no actual changes. This affected some blkdebug testcases that were expecting error logs from failure-injected flushes which are now skipped entirely. This change removes expected flush error logs from block

[Qemu-block] [PATCH v6 4/6] block: ignore flush requests when storage is clean

2016-07-14 Thread Denis V. Lunev
From: Evgeny Yakovlev Some guests (win2008 server for example) do a lot of unnecessary flushing when underlying media has not changed. This adds additional overhead on host when calling fsync/fdatasync. This change introduces a write generation scheme in BlockDriverState. Current write generatio

[Qemu-block] [PATCH v4 11/11] nbd-server: Allow node name for nbd-server-add

2016-07-14 Thread Kevin Wolf
There is no reason why an NBD server couldn't be started for any node, even if it's not on the top level. This converts nbd-server-add to accept a node-name. Note that there is a semantic difference between using a BlockBackend name and the node name of its root: In the former case, the NBD server

[Qemu-block] [PATCH v6 3/6] tests: in IDE and AHCI tests perform DMA write before flushing

2016-07-14 Thread Denis V. Lunev
From: Evgeny Yakovlev Due to changes in flush behaviour clean disks stopped generating flush_to_disk events and IDE and AHCI tests that test flush commands started to fail. This change adds additional DMA writes to affected tests before sending flush commands so that bdrv_flush actually generate

[Qemu-block] [PATCH v4 06/11] block: Accept node-name for blockdev-snapshot-internal-sync

2016-07-14 Thread Kevin Wolf
In order to remove the necessity to use BlockBackend names in the external API, we want to allow node-names everywhere. This converts blockdev-snapshot-internal-sync to accept a node-name without lifting the restriction that we're operating at a root node. In case of an invalid device name, the co

[Qemu-block] [PATCH v4 07/11] block: Accept node-name for change-backing-file

2016-07-14 Thread Kevin Wolf
In order to remove the necessity to use BlockBackend names in the external API, we want to allow node-names everywhere. This converts change-backing-file to accept a node-name without lifting the restriction that we're operating at a root node. In case of an invalid device name, the command return

[Qemu-block] [PATCH v4 03/11] block: Accept node-name for blockdev-backup

2016-07-14 Thread Kevin Wolf
In order to remove the necessity to use BlockBackend names in the external API, we want to allow node-names everywhere. This converts blockdev-backup and the corresponding transaction action to accept a node-name without lifting the restriction that we're operating at a root node. In case of an in

[Qemu-block] [PATCH v4 02/11] block: Accept node-name for block-commit

2016-07-14 Thread Kevin Wolf
In order to remove the necessity to use BlockBackend names in the external API, we want to allow node-names everywhere. This converts block-commit to accept a node-name without lifting the restriction that we're operating at a root node. As libvirt makes use of the DeviceNotFound error class, we m

[Qemu-block] [PATCH v4 00/11] block: Accept node-name in all node level QMP commands

2016-07-14 Thread Kevin Wolf
As stated in the RFC I sent two weeks ago: * Node level commands: We need to complete the conversion that makes commands accept node names instead of BlockBackend names. In some places we intentionally allow only BlockBackends because we don't know if the command works in other p

[Qemu-block] [PATCH v3] aio-posix: remove useless parameter

2016-07-14 Thread Cao jin
Parameter **errp of aio_context_setup() is useless, remove it and clean up the related code. Cc: Stefan Hajnoczi Cc: Fam Zheng Cc: Eric Blake Signed-off-by: Cao jin --- aio-posix.c | 3 ++- aio-win32.c | 2 +- async.c | 8 ++-- include/block/aio.h | 2 +- 4 fil

Re: [Qemu-block] [PATCH v5 11/15] block: simplify blockdev-backup

2016-07-14 Thread Eric Blake
On 07/04/2016 06:28 AM, Denis V. Lunev wrote: > From: Pavel Butsykin > > Now that we can support boxed commands, use it to greatly reduce the > number of parameters (and likelihood of getting out of sync) when > adjusting blockdev-backup parameters. > > Signed-off-by: Pavel Butsykin > Signed-of

  1   2   >