Re: [Qemu-block] [PATCH v13 00/10] Block replication for continuous checkpoints

2016-02-04 Thread Dr. David Alan Gilbert
* Changlong Xie (xiecl.f...@cn.fujitsu.com) wrote: > On 02/01/2016 09:18 AM, Wen Congyang wrote: > >On 01/29/2016 06:47 PM, Dr. David Alan Gilbert wrote: > >>* Wen Congyang (we...@cn.fujitsu.com) wrote: > >>>On 01/29/2016 06:07 PM, Dr. David Alan Gilbert wrote: > * Wen Congyang (we...@cn.fujits

Re: [Qemu-block] [PATCH v13 00/10] Block replication for continuous checkpoints

2016-02-04 Thread Wen Congyang
On 02/04/2016 05:07 PM, Dr. David Alan Gilbert wrote: > * Changlong Xie (xiecl.f...@cn.fujitsu.com) wrote: >> On 02/01/2016 09:18 AM, Wen Congyang wrote: >>> On 01/29/2016 06:47 PM, Dr. David Alan Gilbert wrote: * Wen Congyang (we...@cn.fujitsu.com) wrote: > On 01/29/2016 06:07 PM, Dr. Dav

Re: [Qemu-block] [PATCH v13 00/10] Block replication for continuous checkpoints

2016-02-04 Thread Changlong Xie
On 02/04/2016 05:07 PM, Dr. David Alan Gilbert wrote: * Changlong Xie (xiecl.f...@cn.fujitsu.com) wrote: On 02/01/2016 09:18 AM, Wen Congyang wrote: On 01/29/2016 06:47 PM, Dr. David Alan Gilbert wrote: * Wen Congyang (we...@cn.fujitsu.com) wrote: On 01/29/2016 06:07 PM, Dr. David Alan Gilber

Re: [Qemu-block] [PATCH] nbd: avoid unaligned uint64_t store

2016-02-04 Thread Paolo Bonzini
On 04/02/2016 00:48, John Snow wrote: > cpu_to_be64w can't be used to make unaligned stores, but stq_be_p can. > The other stores in this routine are left alone, they're aligned already. > > Signed-off-by: John Snow > --- > nbd/server.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [Qemu-block] [PATCH 2/2] qapi: Allow blockdev-add for NBD

2016-02-04 Thread Paolo Bonzini
On 03/02/2016 17:48, Eric Blake wrote: > On 02/03/2016 09:33 AM, Max Reitz wrote: >> We have to introduce a new object (BlockdevOptionsNbd) for >> several reasons: - Neither of InetSocketAddress nor >> UnixSocketAddress alone is sufficient, because both are >> supported - We cannot use SocketAddr

Re: [Qemu-block] [Qemu-devel] [PATCH 2/2] qapi: Allow blockdev-add for NBD

2016-02-04 Thread Paolo Bonzini
On 03/02/2016 18:16, Max Reitz wrote: > However, the issue remains that the NBD block driver expects > flattened options which is syntactically incompatible to > SocketAddress. Maybe the best way to address this would be to just > make block/nbd.c directly accept a SocketAddress and keep the old

Re: [Qemu-block] [PATCH] qemu-img: initialize MapEntry object

2016-02-04 Thread Kevin Wolf
Am 04.02.2016 um 00:38 hat John Snow geschrieben: > Commit 16b0d555 introduced an issue where we are not initializing > has_filename for the 'next' MapEntry object, which leads to interesting > errors in Valgrind and Clang -fsanitize=undefined both. > > Zero the stack object at allocation AND make

Re: [Qemu-block] [Qemu-devel] [PATCH 2/2] qapi: Allow blockdev-add for NBD

2016-02-04 Thread Kevin Wolf
Am 03.02.2016 um 18:06 hat Daniel P. Berrange geschrieben: > On Wed, Feb 03, 2016 at 05:33:16PM +0100, Max Reitz wrote: > > We have to introduce a new object (BlockdevOptionsNbd) for several > > reasons: > > - Neither of InetSocketAddress nor UnixSocketAddress alone is > > sufficient, because bot

Re: [Qemu-block] [Qemu-devel] [PATCH 2/2] qapi: Allow blockdev-add for NBD

2016-02-04 Thread Daniel P. Berrange
On Thu, Feb 04, 2016 at 02:08:23PM +0100, Kevin Wolf wrote: > Am 03.02.2016 um 18:06 hat Daniel P. Berrange geschrieben: > > On Wed, Feb 03, 2016 at 05:33:16PM +0100, Max Reitz wrote: > > > We have to introduce a new object (BlockdevOptionsNbd) for several > > > reasons: > > > - Neither of InetSock

Re: [Qemu-block] [PATCH v5 07/10] qemu-img: allow specifying image as a set of options args

2016-02-04 Thread Kevin Wolf
Am 02.02.2016 um 13:57 hat Daniel P. Berrange geschrieben: > Currently qemu-img allows an image filename to be passed on the > command line, but unless using the JSON format, it does not have > a way to set any options except the format eg > >qemu-img info https://127.0.0.1/images/centos7.iso

Re: [Qemu-block] [PATCH v5 00/10] Make qemu-img/qemu-nbd/qemu-io CLI more flexible

2016-02-04 Thread Kevin Wolf
Am 02.02.2016 um 13:57 hat Daniel P. Berrange geschrieben: > This series of patches expands the syntax of the qemu-img, > qemu-nbd and qemu-io commands to make them more flexible. > > v0: https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg04365.html > v1: https://lists.gnu.org/archive/ht

Re: [Qemu-block] [PATCH] nbd: avoid unaligned uint64_t store

2016-02-04 Thread John Snow
On 02/04/2016 05:27 AM, Paolo Bonzini wrote: > > > On 04/02/2016 00:48, John Snow wrote: >> cpu_to_be64w can't be used to make unaligned stores, but stq_be_p can. >> The other stores in this routine are left alone, they're aligned already. >> >> Signed-off-by: John Snow >> --- >> nbd/server.c

Re: [Qemu-block] [PATCH v5 07/10] qemu-img: allow specifying image as a set of options args

2016-02-04 Thread Daniel P. Berrange
On Thu, Feb 04, 2016 at 04:42:06PM +0100, Kevin Wolf wrote: > Am 02.02.2016 um 13:57 hat Daniel P. Berrange geschrieben: > > Currently qemu-img allows an image filename to be passed on the > > command line, but unless using the JSON format, it does not have > > a way to set any options except the f

Re: [Qemu-block] [PATCH v5 07/10] qemu-img: allow specifying image as a set of options args

2016-02-04 Thread Daniel P. Berrange
On Thu, Feb 04, 2016 at 08:59:56AM -0700, Eric Blake wrote: > On 02/02/2016 05:57 AM, Daniel P. Berrange wrote: > > Currently qemu-img allows an image filename to be passed on the > > command line, but unless using the JSON format, it does not have > > a way to set any options except the format eg

Re: [Qemu-block] [PATCH] qemu-img: initialize MapEntry object

2016-02-04 Thread John Snow
On 02/04/2016 07:43 AM, Kevin Wolf wrote: > Am 04.02.2016 um 00:38 hat John Snow geschrieben: >> Commit 16b0d555 introduced an issue where we are not initializing >> has_filename for the 'next' MapEntry object, which leads to interesting >> errors in Valgrind and Clang -fsanitize=undefined both.

Re: [Qemu-block] [PATCH] nbd: avoid unaligned uint64_t store

2016-02-04 Thread Paolo Bonzini
On 04/02/2016 16:45, John Snow wrote: > > > On 02/04/2016 05:27 AM, Paolo Bonzini wrote: >> >> >> On 04/02/2016 00:48, John Snow wrote: >>> cpu_to_be64w can't be used to make unaligned stores, but stq_be_p can. >>> The other stores in this routine are left alone, they're aligned already. >>> >>

Re: [Qemu-block] [PATCH v5 07/10] qemu-img: allow specifying image as a set of options args

2016-02-04 Thread Eric Blake
On 02/02/2016 05:57 AM, Daniel P. Berrange wrote: > Currently qemu-img allows an image filename to be passed on the > command line, but unless using the JSON format, it does not have > a way to set any options except the format eg > >qemu-img info https://127.0.0.1/images/centos7.iso > > This

Re: [Qemu-block] [PATCH v4 0/3] Use QCryptoSecret for block device passwords

2016-02-04 Thread Paolo Bonzini
On 21/01/2016 15:19, Daniel P. Berrange wrote: > This series was previously posted: > > v1: https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg04365.html > v2: https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg03809.html > v3: https://lists.gnu.org/archive/html/qemu-devel/2016

Re: [Qemu-block] [PATCH v5 07/10] qemu-img: allow specifying image as a set of options args

2016-02-04 Thread Daniel P. Berrange
On Thu, Feb 04, 2016 at 05:06:06PM +0100, Kevin Wolf wrote: > Am 04.02.2016 um 16:47 hat Daniel P. Berrange geschrieben: > > On Thu, Feb 04, 2016 at 04:42:06PM +0100, Kevin Wolf wrote: > > > Am 02.02.2016 um 13:57 hat Daniel P. Berrange geschrieben: > > > > @@ -1956,7 +2034,13 @@ static int img_con

Re: [Qemu-block] [PATCH v5 07/10] qemu-img: allow specifying image as a set of options args

2016-02-04 Thread Kevin Wolf
Am 04.02.2016 um 16:47 hat Daniel P. Berrange geschrieben: > On Thu, Feb 04, 2016 at 04:42:06PM +0100, Kevin Wolf wrote: > > Am 02.02.2016 um 13:57 hat Daniel P. Berrange geschrieben: > > > @@ -1956,7 +2034,13 @@ static int img_convert(int argc, char **argv) > > > goto out; > > > } >

Re: [Qemu-block] [PATCH v2 02/17] crypto: add cryptographic random byte source

2016-02-04 Thread Eric Blake
On 01/20/2016 10:38 AM, Daniel P. Berrange wrote: > There are three backend impls provided. The preferred > is gnutls, which is backed by nettle in modern distros. > The gcrypt impl is provided for cases where QEMU build > against gnutls is disabled, but crypto is still desired. > No nettle impl is

Re: [Qemu-block] [Qemu-devel] ping: [PATCH v13] block/raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2016-02-04 Thread Eric Blake
On 02/03/2016 08:54 AM, Programmingkid wrote: >> Oops, I shouldn't be writing emails late at night. Let's try this again. > > So you want this: > > #if defined(__APPLE__) && defined(__MACH__) > if (*bsd_path) { > filename = bsd_path; > } > /* if a physical de

Re: [Qemu-block] [PATCH v2 03/17] crypto: add support for PBKDF2 algorithm

2016-02-04 Thread Eric Blake
On 01/20/2016 10:38 AM, Daniel P. Berrange wrote: > The LUKS data format includes use of PBKDF2 (Password-Based > Key Derivation Function). The Nettle library can provide > an implementation of this, but we don't want code directly > depending on a specific crypto library backend. Introduce > a inc

Re: [Qemu-block] [PATCH v2 04/17] crypto: add support for generating initialization vectors

2016-02-04 Thread Eric Blake
On 01/20/2016 10:38 AM, Daniel P. Berrange wrote: > There are a number of different algorithms that can be used > to generate initialization vectors for disk encryption. This > introduces a simple internal QCryptoBlockIV object to provide > a consistent internal API to the different algorithms. The

Re: [Qemu-block] [RFC PATCH 0/2] Early release of -drive QemuOpts

2016-02-04 Thread Paolo Bonzini
On 22/01/2016 23:38, Max Reitz wrote: > On 22.01.2016 15:01, Paolo Bonzini wrote: >> >> >> On 08/01/2016 18:37, Paolo Bonzini wrote: >>> In short, this patch gets rid of blockdev_mark_auto_del and >>> blockdev_auto_del. >>> >>> With these patches, it is possible to create a new -drive with the sa

Re: [Qemu-block] [PATCH v2 05/17] crypto: add support for anti-forensic split algorithm

2016-02-04 Thread Eric Blake
On 01/20/2016 10:38 AM, Daniel P. Berrange wrote: > The LUKS format specifies an anti-forensic split algorithm which > is used to artificially expand the size of the key material on > disk. This is an implementation of that algorithm. > > Signed-off-by: Daniel P. Berrange > --- > crypto/Makefile

Re: [Qemu-block] [PATCH v2 06/17] crypto: add block encryption framework

2016-02-04 Thread Eric Blake
On 01/20/2016 10:38 AM, Daniel P. Berrange wrote: > Add a generic framework for support different block encryption > formats. Upon instantiating a QCryptoBlock object, it will read > the encryption header and extract the encryption keys. It is > then possible to call methods to encrypt/decrypt data

[Qemu-block] [PATCH v14] block/raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2016-02-04 Thread Programmingkid
Mac OS X can be picky when it comes to allowing the user to use physical devices in QEMU. Most mounted volumes appear to be off limits to QEMU. If an issue is detected, a message is displayed showing the user how to unmount a volume. Now QEMU uses both CD and DVD media. Signed-off-by: John Arbuckl

[Qemu-block] [PATCH v12 1/2] mirror: Rewrite mirror_iteration

2016-02-04 Thread Fam Zheng
The "pnum < nb_sectors" condition in deciding whether to actually copy data is unnecessarily strict, and the qiov initialization is unnecessarily for bdrv_aio_write_zeroes and bdrv_aio_discard. Rewrite mirror_iteration to fix both flaws. The output of iotests 109 is updated because we now report

[Qemu-block] [PATCH v12 0/2] mirror: Improve zero write and discard

2016-02-04 Thread Fam Zheng
v12: Treat target cluster size as BDRV_SECTOR_SIZE if bdrv_get_info failed or doesn't set bdi.cluster_size; v11: Rebase. The only difference is the "file" parameter of bdrv_get_block_status_above. Patch 1 rewrites mirror_iteration. Patch 2 is a small DRY cleaning up. The main benefit i

[Qemu-block] [PATCH v12 2/2] mirror: Add mirror_wait_for_io

2016-02-04 Thread Fam Zheng
The three lines are duplicated a number of times now, refactor a function. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- block/mirror.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index 48cd0b3..9635fa8 100

[Qemu-block] [PULL 08/49] virtio: introduce virtqueue_alloc_element

2016-02-04 Thread Michael S. Tsirkin
From: Paolo Bonzini Allocate the arrays for in_addr/out_addr/in_sg/out_sg outside the VirtQueueElement. For now, virtqueue_pop and vring_pop keep allocating a very large VirtQueueElement. Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: M

[Qemu-block] [PULL 10/49] vring: slim down allocation of VirtQueueElements

2016-02-04 Thread Michael S. Tsirkin
From: Paolo Bonzini Build the addresses and s/g lists on the stack, and then copy them to a VirtQueueElement that is just as big as required to contain this particular s/g list. The cost of the copy is minimal compared to that of a large malloc. Reviewed-by: Cornelia Huck Signed-off-by: Paolo

[Qemu-block] [PATCH] blockdev: Unset temporary flag when changing medium.

2016-02-04 Thread Alyssa Milburn
This avoids a 'change' command from the monitor unlink()ing the new file if the bdrv was previously snapshotted. Signed-off-by: Alyssa Milburn --- blockdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/blockdev.c b/blockdev.c index be4ca44..d39c2e6 100644 --- a/blockdev.c +++ b/blockdev.

[Qemu-block] [PULL 47/49] expose floppy drive geometry and CMOS type

2016-02-04 Thread Michael S. Tsirkin
From: Roman Kagan Make it possible to query the geometry and the CMOS type of a floppy drive outside of the respective source files. It will be useful, in particular, when dynamically building ACPI tables, and will allow to properly populate the corresponding ACPI objects and thus enable BIOS-le

[Qemu-block] [PULL 06/49] virtio: move allocation to virtqueue_pop/vring_pop

2016-02-04 Thread Michael S. Tsirkin
From: Paolo Bonzini The return code of virtqueue_pop/vring_pop is unused except to check for errors or 0. We can thus easily move allocation inside the functions and just return a pointer to the VirtQueueElement. The advantage is that we will be able to allocate only the space that is needed fo

[Qemu-block] [PULL 07/49] virtio: introduce qemu_get/put_virtqueue_element

2016-02-04 Thread Michael S. Tsirkin
From: Paolo Bonzini Move allocation to virtio functions also when loading/saving a VirtQueueElement. This will also let the load/save functions keep backwards compatibility when the VirtQueueElement layout is changed. Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini Reviewed-by: Michae

[Qemu-block] [PATCH v15 6/9] auto complete active commit

2016-02-04 Thread Changlong Xie
From: Wen Congyang Auto complete mirror job in background to prevent from blocking synchronously Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- block/mirror.c| 13 + blockdev.c| 2 +- include/block/block_int.h | 3 ++- qemu-img.c

[Qemu-block] [PATCH v15 2/9] Store parent BDS in BdrvChild

2016-02-04 Thread Changlong Xie
From: Wen Congyang We need to access the parent BDS to get the root BDS. Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- block.c | 1 + include/block/block_int.h | 1 + 2 files changed, 2 insertions(+) diff --git a/block.c b/block.c index 70ab625..c18b462 10064

[Qemu-block] [PATCH v15 5/9] docs: block replication's description

2016-02-04 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- docs/block-replication.txt | 238 + 1 file changed, 238 insertions(+) create mode 100644 docs/block-replication.txt

[Qemu-block] [PATCH v15 1/9] unblock backup operations in backing file

2016-02-04 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- block.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/block.c b/block.c index a285de5..70ab625 100644 --- a/block.c +++ b/block.c @@ -1279,6 +1279,24 @@ void bdrv_set_backing_hd(BlockDrive

[Qemu-block] [PATCH v15 3/9] Backup: clear all bitmap when doing block checkpoint

2016-02-04 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- block/backup.c| 15 +++ include/block/block_int.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/block/backup.c b/block/backup

[Qemu-block] [PATCH v15 0/9] Block replication for continuous checkpoints

2016-02-04 Thread Changlong Xie
Block replication is a very important feature which is used for continuous checkpoints(for example: COLO). You can get the detailed information about block replication from here: http://wiki.qemu.org/Features/BlockReplication Usage: Please refer to docs/block-replication.txt This patch series is

[Qemu-block] [PATCH v15 4/9] Link backup into block core

2016-02-04 Thread Changlong Xie
From: Wen Congyang Some programs that add a dependency on it will use the block layer directly. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie Reviewed-by: Stefan Hajnoczi Reviewed-by: Jeff Cody --- block/Makefile.objs | 2 +-

[Qemu-block] [PATCH v15 8/9] Implement new driver for block replication

2016-02-04 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- block/Makefile.objs | 1 + block/replication.c | 594 2 files changed, 595 insertions(+) create mode 100

[Qemu-block] [PATCH v15 7/9] Introduce new APIs to do replication operation

2016-02-04 Thread Changlong Xie
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- Makefile.objs| 1 + qapi/block-core.json | 13 replication.c| 94 replication.h| 53 ++

[Qemu-block] [PATCH v15 9/9] support replication driver in blockdev-add

2016-02-04 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie Reviewed-by: Eric Blake --- qapi/block-core.json | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/qapi/block-core.json b/q