Re: [Qemu-block] [PATCH] block: add missing call to bdrv_drain_recurse

2016-02-03 Thread Kevin Wolf
Am 23.12.2015 um 11:48 hat Paolo Bonzini geschrieben: > This is also needed in bdrv_drain_all, not just in bdrv_drain. > > Signed-off-by: Paolo Bonzini Reviewed-by: Kevin Wolf

Re: [Qemu-block] [PATCH v9 01/16] block: Release named dirty bitmaps in bdrv_close()

2016-02-03 Thread Fam Zheng
On Fri, 01/29 16:36, Max Reitz wrote: > bdrv_delete() is not very happy about deleting BlockDriverStates with > dirty bitmaps still attached to them. In the past, we got around that > very easily by relying on bdrv_close_all() bypassing bdrv_delete(), and > bdrv_close() simply ignoring that

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-03 Thread Kevin Wolf
Am 02.02.2016 um 20:29 hat Eric Blake geschrieben: > On 02/02/2016 10:28 AM, Programmingkid wrote: > > >> Whats the rationale here ? Using pre-allocated fixed > >> length arrays is pretty bad practice in general, but > >> especially so for filenames > > > > With an automatic variable there is no

Re: [Qemu-block] [Qemu-devel] [PATCH] block: add missing call to bdrv_drain_recurse

2016-02-03 Thread Paolo Bonzini
On 11/01/2016 09:32, Paolo Bonzini wrote: > > > On 25/12/2015 02:55, Fam Zheng wrote: >> On Wed, 12/23 11:48, Paolo Bonzini wrote: >>> This is also needed in bdrv_drain_all, not just in bdrv_drain. >>> >>> Signed-off-by: Paolo Bonzini >>> --- >>> block/io.c | 1 + >>> 1

Re: [Qemu-block] [PATCH v4] blockjob: Fix hang in block_job_finish_sync

2016-02-03 Thread Stefan Hajnoczi
On Tue, Feb 02, 2016 at 10:12:24AM +0800, Fam Zheng wrote: > With a mirror job running on a virtio-blk dataplane disk, sending "q" to > HMP will cause a dead loop in block_job_finish_sync. > > This is because the aio_poll() only processes the AIO context of bs > which has no more work to do,

Re: [Qemu-block] [PATCH v9 05/16] virtio-scsi: Catch BDS-BB removal/insertion

2016-02-03 Thread Fam Zheng
On Fri, 01/29 16:36, Max Reitz wrote: > Make use of the BDS-BB removal and insertion notifiers to remove or set > up, respectively, virtio-scsi's op blockers. > > Signed-off-by: Max Reitz Reviewed-by: Fam Zheng

Re: [Qemu-block] [PATCH] block: add missing call to bdrv_drain_recurse

2016-02-03 Thread Stefan Hajnoczi
On Wed, Dec 23, 2015 at 11:48:25AM +0100, Paolo Bonzini wrote: > This is also needed in bdrv_drain_all, not just in bdrv_drain. > > Signed-off-by: Paolo Bonzini > --- > block/io.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/block/io.c b/block/io.c > index

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

2016-02-03 Thread Eric Blake
On 02/02/2016 05:57 AM, Daniel P. Berrange wrote: > Currently qemu-io 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-io https://127.0.0.1/images/centos7.iso > qemu-io

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

2016-02-03 Thread John Snow
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(-) diff --git a/nbd/server.c

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

2016-02-03 Thread Fam Zheng
On Wed, 02/03 18:38, John Snow wrote: > 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 sure the

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

2016-02-03 Thread Changlong Xie
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.fujitsu.com) wrote: On 01/27/2016 07:03 PM, Dr. David Alan Gilbert

Re: [Qemu-block] [PATCH 1/2] block/nbd: Reject port parameter without host

2016-02-03 Thread Max Reitz
On 03.02.2016 17:38, Eric Blake wrote: > On 02/03/2016 09:33 AM, Max Reitz wrote: >> This is better than the generic block layer finding out later that the >> port parameter has not been used. >> >> Signed-off-by: Max Reitz >> --- >> block/nbd.c | 4 >> 1 file changed, 4

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

2016-02-03 Thread Eric Blake
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 SocketAddress because NBD does not support an fd, >

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

2016-02-03 Thread John Snow
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 sure the utility to populate the fields properly marks

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

2016-02-03 Thread Eric Blake
On 02/02/2016 05:57 AM, Daniel P. Berrange wrote: > Currently qemu-nbd 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-nbd https://127.0.0.1/images/centos7.iso >qemu-nbd

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-03 Thread Programmingkid
On Feb 2, 2016, at 11:36 PM, Eric Blake wrote: > On 02/02/2016 09:21 PM, Programmingkid wrote: > #if defined(__APPLE__) && defined(__MACH__) /* if a physical device experienced an error while being opened */ if (strncmp((*bsd_path ? bsd_path : filename), "/dev/", 5)

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

2016-02-03 Thread Max Reitz
While there are more formats still missing blockdev-add support, I personally felt like NBD really is one we do need, and also it was pretty simple to do. Therefore, I started with NBD. Maybe I'll follow up with other formats. Max Reitz (2): block/nbd: Reject port parameter without host

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

2016-02-03 Thread Max Reitz
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 SocketAddress because NBD does not support an fd, and because it is not a flat union which

[Qemu-block] [PATCH 1/2] block/nbd: Reject port parameter without host

2016-02-03 Thread Max Reitz
This is better than the generic block layer finding out later that the port parameter has not been used. Signed-off-by: Max Reitz --- block/nbd.c | 4 1 file changed, 4 insertions(+) diff --git a/block/nbd.c b/block/nbd.c index 1a90bc7..063c403 100644 --- a/block/nbd.c

Re: [Qemu-block] [PATCH 1/2] block/nbd: Reject port parameter without host

2016-02-03 Thread Eric Blake
On 02/03/2016 09:33 AM, Max Reitz wrote: > This is better than the generic block layer finding out later that the > port parameter has not been used. > > Signed-off-by: Max Reitz > --- > block/nbd.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/block/nbd.c

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

2016-02-03 Thread Max Reitz
On 03.02.2016 02:52, Fam Zheng wrote: > 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

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

2016-02-03 Thread Max Reitz
On 03.02.2016 18:06, Daniel P. Berrange wrote: > 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 both are supported

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

2016-02-03 Thread Daniel P. Berrange
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 both are supported > - We cannot use SocketAddress because NBD does not

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

2016-02-03 Thread Max Reitz
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

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

2016-02-03 Thread Daniel P. Berrange
On Wed, Feb 03, 2016 at 08:37:15AM -0700, Eric Blake wrote: > On 02/02/2016 05:57 AM, Daniel P. Berrange wrote: > > Currently qemu-io 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