Re: [Qemu-block] [PATCH v2 17/21] block: Move cache options into options QDict

2015-11-30 Thread Kevin Wolf
Am 27.11.2015 um 20:57 hat Max Reitz geschrieben: > On 23.11.2015 16:59, Kevin Wolf wrote: > > This adds the cache mode options to the QDict, so that they can be > > specified for child nodes (e.g. backing.cache.direct=off). > > > > The cache modes are not removed from the flags at this point;

Re: [Qemu-block] [Qemu-devel] [PATCH 05/40] virtio: read/write the VirtQueueElement a field at a time

2015-11-30 Thread Fam Zheng
On Tue, 11/24 19:00, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > hw/virtio/virtio.c | 95 > -- > 1 file changed, 93 insertions(+), 2 deletions(-) > > diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c >

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

2015-11-30 Thread Kevin Wolf
Am 30.11.2015 um 17:19 hat Eric Blake geschrieben: > On 11/27/2015 12:35 PM, Programmingkid wrote: > > >> Unusual indentation; more typical is: > >> > >> | static kern_return_t FindEjectableOpticalMedia(io_iterator_t > >> *mediaIterator, > >> | char *mediatType) > > > > I agree. I wanted the

Re: [Qemu-block] [PATCH v7 24/24] iotests: Add test for block jobs and BDS ejection

2015-11-30 Thread Kevin Wolf
Am 09.11.2015 um 23:39 hat Max Reitz geschrieben: > Suggested-by: Paolo Bonzini > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/141 | 166 > + > tests/qemu-iotests/141.out | 47 + >

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

2015-11-30 Thread Eric Blake
On 11/27/2015 02:49 PM, Programmingkid wrote: > 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. > >

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

2015-11-30 Thread Eric Blake
On 11/30/2015 09:38 AM, Programmingkid wrote: >> +/* if a working partition on the device was not found */ >> +if (partition_found == false) { >> +error_setg(errp, "Error: Failed to find a working partition on " >> +

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

2015-11-30 Thread Eric Blake
On 11/30/2015 09:51 AM, Programmingkid wrote: >>> +++ b/block/raw-posix.c >>> @@ -42,9 +42,9 @@ >>> #include >>> #include >>> #include >>> -//#include >>> +#include >>> #include >>> -#endif >>> +#endif /* (__APPLE__) && (__MACH__) */ >>> >> >> I have now mentioned in both v8 and v9 that

Re: [Qemu-block] [PATCH v7 14/24] nbd: Switch from close to eject notifier

2015-11-30 Thread Max Reitz
On 30.11.2015 16:36, Kevin Wolf wrote: > Am 09.11.2015 um 23:39 hat Max Reitz geschrieben: >> The NBD code uses the BDS close notifier to determine when a medium is >> ejected. However, now it should use the BB's BDS removal notifier for >> that instead of the BDS's close notifier. >> >>

Re: [Qemu-block] [Qemu-devel] [PATCH 01/40] 9pfs: allocate pdus with g_malloc/g_free

2015-11-30 Thread Greg Kurz
On Tue, 24 Nov 2015 19:00:52 +0100 Paolo Bonzini wrote: > Prepare for moving the allocation to virtqueue_pop. > > Signed-off-by: Paolo Bonzini > --- And aside from this series goal, it makes the code nicer :) > hw/9pfs/virtio-9p-device.c | 7

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

2015-11-30 Thread Programmingkid
On Nov 30, 2015, at 11:26 AM, Kevin Wolf wrote: > Am 30.11.2015 um 17:19 hat Eric Blake geschrieben: >> On 11/27/2015 12:35 PM, Programmingkid wrote: >> Unusual indentation; more typical is: | static kern_return_t FindEjectableOpticalMedia(io_iterator_t *mediaIterator,

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

2015-11-30 Thread Programmingkid
On Nov 30, 2015, at 11:26 AM, Eric Blake wrote: > On 11/27/2015 02:49 PM, Programmingkid wrote: >> 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

Re: [Qemu-block] [Qemu-devel] [PATCH v6 20/21] iotests: add incremental backup failure recovery test

2015-11-30 Thread John Snow
On 11/27/2015 12:14 PM, Kevin Wolf wrote: > Am 18.04.2015 um 01:50 hat John Snow geschrieben: >> Test the failure case for incremental backups. >> >> Signed-off-by: John Snow >> Reviewed-by: Max Reitz >> --- >> tests/qemu-iotests/124 | 57 >>

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

2015-11-30 Thread Eric Blake
On 11/27/2015 12:35 PM, Programmingkid wrote: >> Unusual indentation; more typical is: >> >> | static kern_return_t FindEjectableOpticalMedia(io_iterator_t >> *mediaIterator, >> | char *mediatType) > > I agree. I wanted the second long to be right justified with the 80 character > line count.

Re: [Qemu-block] [PATCH v2 05/21] block: Consider all block layer options in append_open_options

2015-11-30 Thread Alberto Garcia
On Mon 23 Nov 2015 04:59:44 PM CET, Kevin Wolf wrote: > The code already special-cased "node-name", which is currently the only > option passed in the QDict that isn't driver-specific. Generalise the > code to take all general block layer options into consideration. > > Signed-off-by: Kevin Wolf

Re: [Qemu-block] [PATCH v7 14/24] nbd: Switch from close to eject notifier

2015-11-30 Thread Kevin Wolf
Am 09.11.2015 um 23:39 hat Max Reitz geschrieben: > The NBD code uses the BDS close notifier to determine when a medium is > ejected. However, now it should use the BB's BDS removal notifier for > that instead of the BDS's close notifier. > > Signed-off-by: Max Reitz > --- >

Re: [Qemu-block] [PATCH v2 06/21] block: Exclude nested options only for children in append_open_options()

2015-11-30 Thread Max Reitz
On 30.11.2015 10:01, Kevin Wolf wrote: > Am 27.11.2015 um 18:58 hat Max Reitz geschrieben: >> On 23.11.2015 16:59, Kevin Wolf wrote: >>> Some drivers have nested options (e.g. blkdebug rule arrays), which >>> don't belong to a child node and shouldn't be removed. Don't remove all >>> options with

Re: [Qemu-block] [PATCH v7 15/24] block: Remove BDS close notifier

2015-11-30 Thread Kevin Wolf
Am 09.11.2015 um 23:39 hat Max Reitz geschrieben: > It is unused now, so we can remove it. > > Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf

Re: [Qemu-block] [PATCH for-2.5] blkdebug: silence warning under qtest

2015-11-30 Thread Max Reitz
On 30.11.2015 12:44, Michael S. Tsirkin wrote: > make check always outputs warnings, this > is not nice. Disable blkdebug warnings under qtest. > > Signed-off-by: Michael S. Tsirkin > --- > block/blkdebug.c | 9 +++-- > 1 file changed, 7 insertions(+), 2 deletions(-)

Re: [Qemu-block] [PATCH v7 24/24] iotests: Add test for block jobs and BDS ejection

2015-11-30 Thread Max Reitz
On 30.11.2015 17:23, Kevin Wolf wrote: > Am 09.11.2015 um 23:39 hat Max Reitz geschrieben: >> Suggested-by: Paolo Bonzini >> Signed-off-by: Max Reitz >> --- >> tests/qemu-iotests/141 | 166 >> + >>

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

2015-11-30 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. Signed-off-by: John Arbuckle ---

[Qemu-block] [QEMU 2.12] block in bdrv_drain_all()

2015-11-30 Thread Qian Peng
Hi, I am using qemu 2.1.2 and some VMs hang while playing videos. QEMU parameters and stack information is as follows: /usr/bin/qemu-system-x86_64 -name S398_ABC-047 -S -machine pc-i440fx-2.1,accel=kvm,usb=off -m 1024 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid

Re: [Qemu-block] [PATCH v2 20/21] qemu-iotests: Test cache mode option inheritance

2015-11-30 Thread Kevin Wolf
Am 27.11.2015 um 22:12 hat Max Reitz geschrieben: > On 23.11.2015 16:59, Kevin Wolf wrote: > > This is doing a more complete test on setting cache modes both while > > opening an image (i.e. in a -drive command line) and in reopen > > situations. It checks that reopen can specify options for child

[Qemu-block] [PATCH for-2.5] blkdebug: silence warning under qtest

2015-11-30 Thread Michael S. Tsirkin
make check always outputs warnings, this is not nice. Disable blkdebug warnings under qtest. Signed-off-by: Michael S. Tsirkin --- block/blkdebug.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index

Re: [Qemu-block] [Qemu-devel] [PATCH 05/40] virtio: read/write the VirtQueueElement a field at a time

2015-11-30 Thread Paolo Bonzini
On 30/11/2015 10:47, Fam Zheng wrote: >> > +swap = (elem->out_num & 0x) || (elem->in_num & 0x); > This is interesting, out_num and in_num are 32 bit numbers but there max > values > are both VIRTQUEUE_MAX_SIZE (thanks for explaining this on IRC), so it can be > a > clue for

Re: [Qemu-block] [Qemu-devel] [PATCH 07/40] virtio: slim down allocation of VirtQueueElements

2015-11-30 Thread Paolo Bonzini
On 30/11/2015 04:24, Fam Zheng wrote: > > +for (i = 0; i < out_num; i++) { > > +elem->out_addr[i] = addr[i]; > > +elem->out_sg[i] = iov[i]; > > +} > > Isn't memcpy more efficient here? Otherwise looks good. Probably not, out_num/in_num is usually very small, in fact one

Re: [Qemu-block] [PATCH v3 01/15] block: Add "file" output parameter to block status query functions

2015-11-30 Thread Stefan Hajnoczi
On Thu, Nov 26, 2015 at 01:05:21PM +0800, Fam Zheng wrote: > @@ -1535,13 +1541,14 @@ static int64_t coroutine_fn > bdrv_co_get_block_status(BlockDriverState *bs, > } > } > > -if (bs->file && > +if (*file && *file != bs && > (ret & BDRV_BLOCK_DATA) && !(ret &

Re: [Qemu-block] [PATCH v3 00/15] qemu-img map: Allow driver to return file of the allocated block

2015-11-30 Thread Stefan Hajnoczi
On Thu, Nov 26, 2015 at 01:05:20PM +0800, Fam Zheng wrote: > v3: Add Eric's rev-by in patches 6, 7, 13, 14. > 12: New, split out from the previous 13. > 12->13: Refactor "entry_mergable" from imp_map(). > Don't mess the merge conditions. [Paolo] > Address Eric's comments: >

Re: [Qemu-block] [PATCH v3 01/15] block: Add "file" output parameter to block status query functions

2015-11-30 Thread Fam Zheng
On Mon, 11/30 16:38, Stefan Hajnoczi wrote: > On Thu, Nov 26, 2015 at 01:05:21PM +0800, Fam Zheng wrote: > > @@ -1535,13 +1541,14 @@ static int64_t coroutine_fn > > bdrv_co_get_block_status(BlockDriverState *bs, > > } > > } > > > > -if (bs->file && > > +if (*file && *file

Re: [Qemu-block] [PATCH v2 01/21] qcow2: Add .bdrv_join_options callback

2015-11-30 Thread Alberto Garcia
On Mon 23 Nov 2015 04:59:40 PM CET, Kevin Wolf wrote: > qcow2 accepts a few driver-specific options that overlap semantically > (e.g. "overlap-check" is an alias of "overlap-check.template", and any > missing cache size option is derived from the given ones). > > When

Re: [Qemu-block] [PATCH v2 02/21] block: Fix reopen with semantically overlapping options

2015-11-30 Thread Alberto Garcia
On Mon 23 Nov 2015 04:59:41 PM CET, Kevin Wolf wrote: > This fixes bdrv_reopen() calls like the following one: > > qemu-io -c 'open -o overlap-check.template=all /tmp/test.qcow2' \ > -c 'reopen -o overlap-check=none' > > The approach taken so far would result in an options QDict that has

Re: [Qemu-block] [PATCH v2 03/21] mirror: Error out when a BDS would get two BBs

2015-11-30 Thread Alberto Garcia
On Mon 23 Nov 2015 04:59:42 PM CET, Kevin Wolf wrote: > @@ -370,11 +371,22 @@ static void mirror_exit(BlockJob *job, void *opaque) > if (s->to_replace) { > to_replace = s->to_replace; > } > + > +/* This was checked in mirror_start_job(), but meanwhile one of