Re: [Qemu-devel] [PATCH V2 3/3] qemu-io-test: Disable Quorum test when not compiled in.

2014-02-21 Thread Fam Zheng
On Sat, 02/22 02:20, Benoît Canet wrote: > Quorum is not compiled by default: make the quorum 081 test aware of this. > > Signed-off-by: Benoit Canet > --- > tests/qemu-iotests/081 | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/tests/qemu-iotests/081 b/tests/qemu-iotests/081 > inde

[Qemu-devel] [PATCH] Don't enable a HPET timer if HPET is disabled

2014-02-21 Thread Matt Lupfer
A HPET timer can be started when HPET is not yet enabled. This will not generate an interrupt to the guest, but causes problems when HPET is later enabled. A timer that is created and expires at least once before HPET is enabled will have an initialized comparator based on a hpet_offset of 0 (unin

Re: [Qemu-devel] [PATCH v7 0/2] target-ppc: CPU device tree id

2014-02-21 Thread Benjamin Herrenschmidt
On Sat, 2014-02-22 at 13:20 +1100, Alexey Kardashevskiy wrote: > Sorry for bothering again. This is quite simple patchset, it does not touch > a lot and just a small rework. This is v7, v1 was 31/10/2013 (~4 months), I > sent "ping" to v5 5 times (took 2 months to get any attention), there was > n

Re: [Qemu-devel] [PATCH v7 0/2] target-ppc: CPU device tree id

2014-02-21 Thread Alexey Kardashevskiy
On 02/22/2014 12:31 AM, Alexey Kardashevskiy wrote: > On 02/11/2014 06:20 PM, Alexey Kardashevskiy wrote: >> On 02/02/2014 01:45 AM, Alexey Kardashevskiy wrote: >>> This is some cleanup. Please, comment. Thanks! >> >> Ping? > > pingping? Sorry for bothering again. This is quite simple patchset,

Re: [Qemu-devel] [PATCH V2 2/3] qmp: Make Quorum error events more palatable.

2014-02-21 Thread Eric Blake
On 02/21/2014 07:09 PM, Benoît Canet wrote: >>> +if (ret < 0) { >>> +QDict *dict = qobject_to_qdict(data); >>> +qdict_put(dict, "error", qstring_from_str(strerror(-ret))); >>> +} >> >> This puts it in dict, but never modifies data... > > qobject_to_qdict is an enhanced cas

Re: [Qemu-devel] [PATCH V2 2/3] qmp: Make Quorum error events more palatable.

2014-02-21 Thread Benoît Canet
The Friday 21 Feb 2014 à 18:42:01 (-0700), Eric Blake wrote : > On 02/21/2014 06:20 PM, Benoît Canet wrote: > > Insert quorum QMP events documentation alphabetically. > > > > Also change the "ret" errno value by an optional "error" being an > > strerror(-ret) > > in the QUORUM_REPORT_BAD qmp event

Re: [Qemu-devel] [PATCH V2 2/3] qmp: Make Quorum error events more palatable.

2014-02-21 Thread Eric Blake
On 02/21/2014 06:20 PM, Benoît Canet wrote: > Insert quorum QMP events documentation alphabetically. > > Also change the "ret" errno value by an optional "error" being an > strerror(-ret) > in the QUORUM_REPORT_BAD qmp event. > > Signed-off-by: Benoit Canet > --- > assert(node_name); > -

[Qemu-devel] [PATCH V2 0/3] Fix some quorum nits after merge

2014-02-21 Thread Benoît Canet
in v2: make error optional and return strerror(-ret) [Eric] better documentation of the error string [Eric] apply Eric reviewed by Benoît Canet (3): qmp: Fix BlockdevOptionQuorum. qmp: Make Quorum error events more palatable. qemu-io-test: Disable Quorum test when not compiled i

[Qemu-devel] [PATCH V2 3/3] qemu-io-test: Disable Quorum test when not compiled in.

2014-02-21 Thread Benoît Canet
Quorum is not compiled by default: make the quorum 081 test aware of this. Signed-off-by: Benoit Canet --- tests/qemu-iotests/081 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemu-iotests/081 b/tests/qemu-iotests/081 index f053f11..c1078f6 100755 --- a/tests/qemu-iotests/081 +++

[Qemu-devel] [PATCH V2 2/3] qmp: Make Quorum error events more palatable.

2014-02-21 Thread Benoît Canet
Insert quorum QMP events documentation alphabetically. Also change the "ret" errno value by an optional "error" being an strerror(-ret) in the QUORUM_REPORT_BAD qmp event. Signed-off-by: Benoit Canet --- block/quorum.c | 9 -- docs/qmp/qmp-events.txt| 75 +++

[Qemu-devel] [PATCH V2 1/3] qmp: Fix BlockdevOptionQuorum.

2014-02-21 Thread Benoît Canet
Fix some nits before QEMU 2.0 freeze. Signed-off-by: Benoit Canet Reviewed-by: Eric Blake --- qapi-schema.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index fcb22800..ab5cdde 100644 --- a/qapi-schema.json +++ b/qapi-schema.jso

[Qemu-devel] [PATCH] hw/intc/arm_gic: Fix GIC_SET_LEVEL

2014-02-21 Thread Christoffer Dall
The GIC_SET_LEVEL macro unfortunately overwrote the entire level bitmask instead of just or'ing on the necessary bits, causing active level PPIs on a core to clear PPIs on other cores. I introduced this bug, sorry about that. Reported-by: Rob Herring Signed-off-by: Christoffer Dall --- hw/intc

Re: [Qemu-devel] CentOS 5.x intermittently fails to boot on QEMU 1.7.0

2014-02-21 Thread Matt Lupfer
On 02/21/2014 06:27 AM, Alex Bligh wrote: > > On 21 Feb 2014, at 04:34, Matt Lupfer wrote: > >> >> This doesn't appear to be a solution, because with the timer rewrite, QEMU >> moves its periodic (1 ms) qemu_notify_event() call to break out of >> the main event loop from a SIGALRM handler to the r

Re: [Qemu-devel] [PATCH 1/3] qmp: Fix BlockdevOptionQuorum.

2014-02-21 Thread Eric Blake
On 02/21/2014 04:58 PM, Benoît Canet wrote: > Fix some nits before QEMU 2.0 freeze. > > Signed-off-by: Benoit Canet > --- > qapi-schema.json | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) Reviewed-by: Eric Blake > > diff --git a/qapi-schema.json b/qapi-schema.json > index fcb22

Re: [Qemu-devel] [PATCH 2/3] qmp: Make Quorum error events more palatable.

2014-02-21 Thread Eric Blake
On 02/21/2014 04:58 PM, Benoît Canet wrote: > Insert quorum QMP events documentation alphabetically. > > Also change the "ret" errno value by "error" being an strerror() in the > QUORUM_REPORT_BAD qmp event. > > Signed-off-by: Benoit Canet > --- > block/quorum.c | 5 ++-- > docs/qm

[Qemu-devel] [PULL 17/54] gluster: default scheme to gluster:// and host to localhost.

2014-02-21 Thread Kevin Wolf
From: Paolo Bonzini Currently, "gluster:///volname/img" and (using file. options) "file.driver=gluster,file.filename=foo" will segfault. Also, "//host/volname/img" will be rejected, but it is a valid URL that should be accepted just fine with "file.driver=gluster". Accept all of these, by inferr

[Qemu-devel] [PULL 07/54] block: Remove bdrv_new() from bdrv_file_open()

2014-02-21 Thread Kevin Wolf
From: Max Reitz Change bdrv_file_open() to take a simple pointer to an already existing BDS instead of an indirect one. The BDS will be created in bdrv_open() if necessary. Signed-off-by: Max Reitz Reviewed-by: Benoit Canet Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block.c | 24

[Qemu-devel] [PULL 04/54] block: Add reference parameter to bdrv_open()

2014-02-21 Thread Kevin Wolf
From: Max Reitz Allow bdrv_open() to handle references to existing block devices just as bdrv_file_open() is already capable of. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block.c | 44 +--- block/qcow2.c | 4 ++-- blo

[Qemu-devel] [PULL 09/54] block: Reuse success path from bdrv_open()

2014-02-21 Thread Kevin Wolf
From: Max Reitz The fail and success paths of bdrv_file_open() may be further shortened by reusing code already existent in bdrv_open(). This includes bdrv_file_open() not taking the reference to options which allows the removal of QDECREF(options) in that function. Signed-off-by: Max Reitz Rev

Re: [Qemu-devel] [PATCH V19 06/12] quorum: Add quorum mechanism.

2014-02-21 Thread Eric Blake
On 02/21/2014 03:30 PM, Benoît Canet wrote: >>> + >>> +- "ret": The IO return code. >> >> What values is this likely to contain? Is it a finite set, in which >> case it would be nice to have a QAPI enum that describes the set of >> return codes, rather than a raw number? > > It's anythi

[Qemu-devel] [PULL 42/54] quorum: Create BDRVQuorumState and BlkDriver and do init.

2014-02-21 Thread Kevin Wolf
From: Benoît Canet Create the structure holding the quorum settings and write the minimal block driver instanciation boilerplate. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- block/quorum.c | 31 +++ 1 file changed, 31 insertion

[Qemu-devel] [PULL 28/54] vmdk: correctly propagate errors

2014-02-21 Thread Kevin Wolf
From: Paolo Bonzini Now that we can return the "right" errors, use the Error** parameter to pass them back instead of just printing them. Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/vmdk.c | 11 ++- tests/qemu-iotests/059.out

[Qemu-devel] [PULL 32/54] qemu-img create: Support multiple -o options

2014-02-21 Thread Kevin Wolf
If you specified multiple -o options for qemu-img create, it would silently ignore all but the last one. This patch fixes the problem. Now multiple -o options has the same meaning as having a single option with all settings in the order of their respective -o options. Signed-off-by: Kevin Wolf R

[Qemu-devel] [PULL 34/54] qemu-img amend: Support multiple -o options

2014-02-21 Thread Kevin Wolf
Instead of ignoring all option values but the last one, multiple -o options now have the same meaning as having a single option with all settings in the order of their respective -o options. Signed-off-by: Kevin Wolf Reviewed-by: Jeff Cody Reviewed-by: Eric Blake --- qemu-img.c | 17 ++

Re: [Qemu-devel] [PULL 01/54] qcow2: Set zero flag for discarded clusters

2014-02-21 Thread Eric Blake
On 02/21/2014 03:11 PM, Kevin Wolf wrote: > Instead of making the backing file contents visible again after a discard > request, set the zero flag if possible (i.e. on version >= 3). > > Signed-off-by: Kevin Wolf > Reviewed-by: Eric Blake > --- > block/qcow2-cluster.c | 22

Re: [Qemu-devel] [PATCH 0/3] Extract non-QDicts in qdict_array_split()

2014-02-21 Thread Eric Blake
On 02/21/2014 11:11 AM, Max Reitz wrote: > Currently, qdict_array_split() splits a QDict like > { "0.a": 42, "1": 23, "2.b": 84 } > into the QList > [ { "a": 42 } ] > with the QDict still being > { "1": 23, "2.b": 84 } > > However, it makes more sense to create the QList > [ { "a": 42 }, 2

[Qemu-devel] [PATCH 0/3] Fix some quorum nits after merge

2014-02-21 Thread Benoît Canet
Fix qemu-io test to ignore quorum when not compiled in [Kevin] Fix quorum QMP event [Eric] Fix QMP documentation [Eric] Benoît Canet (3): qmp: Fix BlockdevOptionQuorum. qmp: Make Quorum error events more palatable. qemu-io-test: Disable Quorum test when not compiled in. block/quorum.c

[Qemu-devel] [PATCH 1/3] qmp: Fix BlockdevOptionQuorum.

2014-02-21 Thread Benoît Canet
Fix some nits before QEMU 2.0 freeze. Signed-off-by: Benoit Canet --- qapi-schema.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index fcb22800..ab5cdde 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -4437,10 +4437,11 @@

[Qemu-devel] [PATCH 3/3] qemu-io-test: Disable Quorum test when not compiled in.

2014-02-21 Thread Benoît Canet
Quorum is not compiled by default: make the quorum 081 test aware of this. Signed-off-by: Benoit Canet --- tests/qemu-iotests/081 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemu-iotests/081 b/tests/qemu-iotests/081 index f053f11..c1078f6 100755 --- a/tests/qemu-iotests/081 +++

[Qemu-devel] [PATCH 2/3] qmp: Make Quorum error events more palatable.

2014-02-21 Thread Benoît Canet
Insert quorum QMP events documentation alphabetically. Also change the "ret" errno value by "error" being an strerror() in the QUORUM_REPORT_BAD qmp event. Signed-off-by: Benoit Canet --- block/quorum.c | 5 ++-- docs/qmp/qmp-events.txt| 72 +++--

[Qemu-devel] [PULL 30/54] vdi: say why an image is bad

2014-02-21 Thread Kevin Wolf
From: Paolo Bonzini Instead of just putting it in debugging output, we can now put the value in an Error. Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/vdi.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git

[Qemu-devel] [PULL 27/54] vmdk: do not try opening a file as both image and descriptor

2014-02-21 Thread Kevin Wolf
From: Paolo Bonzini This prepares for propagating errors from vmdk_open_sparse and vmdk_open_desc_file up to the caller of vmdk_open. Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/vmdk.c | 22 +++--- tests/qemu-iotests/0

[Qemu-devel] [PULL 31/54] qemu-option: has_help_option() and is_valid_option_list()

2014-02-21 Thread Kevin Wolf
has_help_option() checks if any help option ('help' or '?') occurs anywhere in an option string, so that things like 'cluster_size=4k,help' are recognised. is_valid_option_list() ensures that the option list doesn't have options with leading commas or trailing unescaped commas. Signed-off-by: Kev

[Qemu-devel] [PULL 24/54] vvfat: correctly propagate errors

2014-02-21 Thread Kevin Wolf
From: Paolo Bonzini Before: $ ./qemu-io-old qemu-io-old> open -r -o driver=vvfat,fat-type=24,dir=i386-softmmu Valid FAT types are only 12, 16 and 32 qemu-io-old: can't open device (null): Could not open image: Invalid argument After: $ ./qemu-io qemu-io> open -r -o drive

[Qemu-devel] [PULL 40/54] check-qdict: Test termination of qdict_array_split()

2014-02-21 Thread Kevin Wolf
From: Max Reitz qdict_array_split() should terminate if it encounters both an entry with a key of "%u" and entries with keys prefixed "%u." for the same index. This patch adds a test for this case. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- tests/check-qd

[Qemu-devel] [PULL 26/54] vmdk: push vmdk_read_desc up to caller

2014-02-21 Thread Kevin Wolf
From: Paolo Bonzini Currently, we just try reading a VMDK file as both image and descriptor. This makes it hard to choose which of the two attempts gave the best error. We'll decide in advance if the file looks like an image or a descriptor, and this patch is the first step to that end. Signed-o

[Qemu-devel] [PULL 15/54] iscsi: fix indentation

2014-02-21 Thread Kevin Wolf
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/iscsi.c | 45 +++-- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index f8e496f..ac5a5c7 100644 -

[Qemu-devel] [PULL 45/54] quorum: Add quorum_aio_readv.

2014-02-21 Thread Kevin Wolf
From: Benoît Canet Add code to do num_children reads in parallel and cleanup the structures afterwards. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- block/quorum.c | 39 ++- 1 file changed, 38 insertions(+), 1 deletion(-

[Qemu-devel] [PULL 38/54] qdict: Extract non-QDicts in qdict_array_split()

2014-02-21 Thread Kevin Wolf
From: Max Reitz Currently, qdict_array_split() only splits off entries with a key prefix of "%u.", packing them into a new QDict. This patch makes it support entries with the plain key "%u" as well, directly putting them into the new QList without creating a QDict. If there is both an entry with

[Qemu-devel] [Bug 1278977] Re: qemu-system-sparc64 crash when initializing disk

2014-02-21 Thread Mark Cave-Ayland
Hi Waldemar, I can't say that I've seen anything like that here, although I don't tend to push my images too much. It does sound like some kind of deadlock though. Are these the straces from the qemu-system-sparc64 host process or the qemu-system-sparc64 guest process? If it's the former, can you

[Qemu-devel] [PULL 19/54] cow: correctly propagate errors

2014-02-21 Thread Kevin Wolf
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/cow.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/block/cow.c b/block/cow.c index d0385be..9e4f624 100644 --- a/block/cow.c +++ b/block/cow.c @@ -82,7 +8

[Qemu-devel] [PULL 20/54] curl: correctly propagate errors

2014-02-21 Thread Kevin Wolf
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/curl.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/block/curl.c b/block/curl.c index bb1fc4a..3494c6d 100644 --- a/block/curl.c +++ b/block/curl.c

[Qemu-devel] [PULL 44/54] blkverify: Extract qemu_iovec_clone() and qemu_iovec_compare() from blkverify.

2014-02-21 Thread Kevin Wolf
From: Benoît Canet qemu_iovec_compare() will be used to compare IOs vectors in quorum blkverify mode. The patch extracts these functions in order to factorize the code. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- block/blkverify.c | 108 +-

[Qemu-devel] [PULL 29/54] block: do not abuse EMEDIUMTYPE

2014-02-21 Thread Kevin Wolf
From: Paolo Bonzini Returning "Wrong medium type" for an image that does not have a valid header is a bit weird. Improve the error by mentioning what format was trying to open it. Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/bochs.c | 3 ++- bl

[Qemu-devel] [PULL 39/54] check-qdict: Adjust test for qdict_array_split()

2014-02-21 Thread Kevin Wolf
From: Max Reitz Test the new functionality of qdict_array_split(), that is, splitting off single objects. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- tests/check-qdict.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --g

[Qemu-devel] [PULL 47/54] quorum: Add quorum_getlength().

2014-02-21 Thread Kevin Wolf
From: Benoît Canet Check that every bs file returns the same length. Otherwise, return -EIO to disable the quorum and avoid length discrepancy. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- block/quorum.c | 26 ++ 1 file changed, 26

[Qemu-devel] [PULL 25/54] vmdk: extract vmdk_read_desc

2014-02-21 Thread Kevin Wolf
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/vmdk.c | 41 ++--- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 54a1c59..b808108 100644 --- a/bl

Re: [Qemu-devel] [PATCH V19 06/12] quorum: Add quorum mechanism.

2014-02-21 Thread Eric Blake
On 02/21/2014 03:50 PM, Benoît Canet wrote: > The Friday 21 Feb 2014 à 15:44:06 (-0700), Eric Blake wrote : >> On 02/21/2014 03:38 PM, Kevin Wolf wrote: >> +- "ret": The IO return code. > > What values is this likely to contain? Is it a finite set, in which > case it would

[Qemu-devel] [PULL 54/54] iotests: Mixed quorum child device specifications

2014-02-21 Thread Kevin Wolf
From: Max Reitz Add a test case to test 081 for mixing full option dicts and reference strings of specifying the quorum child block devices through QMP. Signed-off-by: Max Reitz Reviewed-by: Benoit Canet Signed-off-by: Kevin Wolf --- tests/qemu-iotests/081 | 51 ++

Re: [Qemu-devel] [PATCH V19 06/12] quorum: Add quorum mechanism.

2014-02-21 Thread Benoît Canet
The Friday 21 Feb 2014 à 15:09:42 (-0700), Eric Blake wrote : > On 02/21/2014 02:21 PM, Benoît Canet wrote: > > From: Benoît Canet > > > > This patchset enables the core of the quorum mechanism. > > The num_children reads are compared to get the majority version and if this > > version exists mor

[Qemu-devel] [PULL 46/54] quorum: Add quorum mechanism.

2014-02-21 Thread Kevin Wolf
From: Benoît Canet This patchset enables the core of the quorum mechanism. The num_children reads are compared to get the majority version and if this version exists more than threshold times the guest won't see the error at all. If a block is corrupted or if an error occurs during an IO or if t

[Qemu-devel] [PULL 36/54] qemu-iotests: Check qemu-img command line parsing

2014-02-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Jeff Cody Reviewed-by: Eric Blake --- tests/qemu-iotests/082 | 208 ++ tests/qemu-iotests/082.out | 529 + tests/qemu-iotests/group | 1 + 3 files changed, 738 insertions(+) create mode 1

[Qemu-devel] [PULL 49/54] quorum: Add quorum_co_flush().

2014-02-21 Thread Kevin Wolf
From: Benoît Canet Makes a vote to select error if any. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- block/quorum.c | 28 1 file changed, 28 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 38bc217..840afda 100

[Qemu-devel] [PULL 53/54] quorum: Simplify quorum_open()

2014-02-21 Thread Kevin Wolf
From: Max Reitz Although it may not look like it, this patch simplifies quorum_open(). qdict_array_split() is now able to return QLists with different objects than only QDicts, therefore it will now do all the work and quorum_open() does not have to handle reference strings by itself. This allow

[Qemu-devel] [PULL 21/54] qcow: correctly propagate errors

2014-02-21 Thread Kevin Wolf
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/qcow.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/block/qcow.c b/block/qcow.c index 8d00853..ef8920b 100644 --- a/block/qcow.c +++ b/block/qcow.c @

[Qemu-devel] [PULL 33/54] qemu-img convert: Support multiple -o options

2014-02-21 Thread Kevin Wolf
Instead of ignoring all option values but the last one, multiple -o options now have the same meaning as having a single option with all settings in the order of their respective -o options. Signed-off-by: Kevin Wolf Reviewed-by: Jeff Cody Reviewed-by: Eric Blake --- qemu-img.c | 34 ++

[Qemu-devel] [PULL 37/54] qemu-config: Sections must consist of keys

2014-02-21 Thread Kevin Wolf
From: Max Reitz In config_parse_qdict_section(), the QList returned by qdict_array_split() is assumed to only contain QDicts. Currently, this is true but it may (and will) change in the future. Therefore, check whether the assumption actually holds. Signed-off-by: Max Reitz Reviewed-by: Eric Bl

[Qemu-devel] [PULL 18/54] gluster: correctly propagate errors

2014-02-21 Thread Kevin Wolf
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/gluster.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/block/gluster.c b/block/gluster.c index 89450efd2..14d390b 100644 --- a/block/gl

[Qemu-devel] [PULL 41/54] quorum: Create quorum.c, add QuorumChildRequest and QuorumAIOCB.

2014-02-21 Thread Kevin Wolf
From: Benoît Canet Quorum is a block filter mirroring writes to num_children children. For reads quorum reads each children and does a vote. If more than vote_threshold versions are identical the quorum is reached and this winning version is returned to the guest. So quorum prevents bit corrupti

[Qemu-devel] [PULL 50/54] quorum: Implement recursive .bdrv_recurse_is_first_non_filter in quorum.

2014-02-21 Thread Kevin Wolf
From: Benoît Canet This is used to activate quorum snapshot. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- block/quorum.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 840afda..1b2b56f 100644

[Qemu-devel] [PULL 35/54] qemu-img: Allow -o help with incomplete argument list

2014-02-21 Thread Kevin Wolf
This patch allows using 'qemu-img $subcmd -o help' for the create, convert and amend subcommands, without specifying the previously required filename arguments. Note that it's still allowed and meaningful to specify a filename: An invocation like 'qemu-img create -o help sheepdog:foo' will also di

[Qemu-devel] [PULL 23/54] vhdx: correctly propagate errors

2014-02-21 Thread Kevin Wolf
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/vhdx.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/block/vhdx.c b/block/vhdx.c index 366ff2e..5390ba6 100644 --- a/block/vhdx.c +++ b/bloc

Re: [Qemu-devel] [PATCH V19 06/12] quorum: Add quorum mechanism.

2014-02-21 Thread Kevin Wolf
Am 21.02.2014 um 23:30 hat Benoît Canet geschrieben: > The Friday 21 Feb 2014 à 15:09:42 (-0700), Eric Blake wrote : > > On 02/21/2014 02:21 PM, Benoît Canet wrote: > > > From: Benoît Canet > > > > > > This patchset enables the core of the quorum mechanism. > > > The num_children reads are compar

[Qemu-devel] [PULL 16/54] iscsi: correctly propagate errors in iscsi_open

2014-02-21 Thread Kevin Wolf
From: Paolo Bonzini Before: $ ./qemu-io-old qemu-io-old> open -r -o file.driver=iscsi,file.filename=foo Failed to parse URL : foo qemu-io-old: can't open device (null): Could not open 'foo': Invalid argument After: $ ./qemu-io qemu-io> open -r -o file.driver=iscsi,file.f

Re: [Qemu-devel] [PATCH V19 00/12] Quorum block filter

2014-02-21 Thread Benoît Canet
The Friday 21 Feb 2014 à 15:49:15 (-0700), Eric Blake wrote : > On 02/21/2014 02:21 PM, Benoît Canet wrote: > > Hi this is the latest version of the quorum block filter. > > > > This version fix the qmp events and a small rebase conflict. > > > > tested: > > > > tested that json qmp string are c

[Qemu-devel] [PULL 10/54] block: Remove bdrv_open_image()'s force_raw option

2014-02-21 Thread Kevin Wolf
From: Max Reitz This option is now unnecessary since specifying BDRV_O_PROTOCOL as flag will do exactly the same. Signed-off-by: Max Reitz Reviewed-by: Benoit Canet Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block.c | 27 --- block/blkdebug.c

[Qemu-devel] [PULL 52/54] quorum: Add unit test.

2014-02-21 Thread Kevin Wolf
From: Benoît Canet Signed-off-by: Benoit Canet Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- tests/qemu-iotests/081 | 95 ++ tests/qemu-iotests/081.out | 34 + tests/qemu-iotests/group | 1 + 3 files changed, 130 insert

[Qemu-devel] [PULL 22/54] qed: correctly propagate errors

2014-02-21 Thread Kevin Wolf
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/qed.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/block/qed.c b/block/qed.c index 9bc181f..968028e 100644 --- a/block/qed.c +++ b/block/qed.c @@ -3

[Qemu-devel] [PULL 43/54] quorum: Add quorum_aio_writev and its dependencies.

2014-02-21 Thread Kevin Wolf
From: Benoît Canet Writes are mirrored num_children times on num_children devices. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- block/quorum.c | 103 + 1 file changed, 103 insertions(+) diff --git a/

Re: [Qemu-devel] [PATCH V19 06/12] quorum: Add quorum mechanism.

2014-02-21 Thread Benoît Canet
The Friday 21 Feb 2014 à 15:44:06 (-0700), Eric Blake wrote : > On 02/21/2014 03:38 PM, Kevin Wolf wrote: > +- "ret": The IO return code. > >>> > >>> What values is this likely to contain? Is it a finite set, in which > >>> case it would be nice to have a QAPI enum that describes the

Re: [Qemu-devel] [PATCH V19 00/12] Quorum block filter

2014-02-21 Thread Eric Blake
On 02/21/2014 02:21 PM, Benoît Canet wrote: > Hi this is the latest version of the quorum block filter. > > This version fix the qmp events and a small rebase conflict. > > tested: > > tested that json qmp string are correct and parse well with python > > Ran qemu-iotest including 081 ok > > q

Re: [Qemu-devel] [PATCH V19 06/12] quorum: Add quorum mechanism.

2014-02-21 Thread Eric Blake
On 02/21/2014 03:38 PM, Kevin Wolf wrote: +- "ret": The IO return code. >>> >>> What values is this likely to contain? Is it a finite set, in which >>> case it would be nice to have a QAPI enum that describes the set of >>> return codes, rather than a raw number? >> >> It's anything

[Qemu-devel] [PULL 51/54] quorum: Add quorum_open() and quorum_close().

2014-02-21 Thread Kevin Wolf
From: Benoît Canet Example of command line: -drive if=virtio,driver=quorum,\ children.0.file.filename=1.raw,\ children.0.node-name=1.raw,\ children.0.driver=raw,\ children.1.file.filename=2.raw,\ children.1.node-name=2.raw,\ children.1.driver=raw,\ children.2.file.filename=3.raw,\ children.2.nod

[Qemu-devel] [PULL 48/54] quorum: Add quorum_invalidate_cache().

2014-02-21 Thread Kevin Wolf
From: Benoît Canet We really want that live migration works with quorum so implement quorum_invalidate_cache(). Signed-off-by: Benoit Canet Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- block/quorum.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/block/quorum.c b/bl

[Qemu-devel] [PULL 14/54] nbd: move socket wrappers to qemu-nbd

2014-02-21 Thread Kevin Wolf
From: Paolo Bonzini qemu-nbd is one of the few valid users of qerror_report_err. Move the error-reporting socket wrappers there. Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- include/block/nbd.h | 4 nbd.c | 50

[Qemu-devel] [PULL 08/54] block: Handle bs->options in bdrv_open() only

2014-02-21 Thread Kevin Wolf
From: Max Reitz The fail paths of bdrv_file_open() and bdrv_open() naturally exhibit similarities, thus it is possible to reuse the one from bdrv_open() and shorten the one in bdrv_file_open() accordingly. Also, setting bs->options in bdrv_file_open() is not necessary if it is already done in bd

[Qemu-devel] [PULL 11/54] nbd: produce a better error if neither host nor port is passed

2014-02-21 Thread Kevin Wolf
From: Paolo Bonzini Before: $ qemu-io-old qemu-io-old> open -r -o file.driver=nbd qemu-io-old: can't open device (null): Could not open image: Invalid argument $ ./qemu-io-old qemu-io-old> open -r -o file.driver=nbd,file.host=foo,file.path=bar path and host may not be use

[Qemu-devel] [PULL 12/54] nbd: correctly propagate errors

2014-02-21 Thread Kevin Wolf
From: Paolo Bonzini Before: $ ./qemu-io-old qemu-io-old> open -r -o file.driver=nbd one of path and host must be specified. qemu-io-old: can't open device (null): Could not open image: Invalid argument $ ./qemu-io-old qemu-io-old> open -r -o file.driver=nbd,file.host=foo,

[Qemu-devel] [PULL 13/54] nbd: inline tcp_socket_incoming_spec into sole caller

2014-02-21 Thread Kevin Wolf
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- include/block/nbd.h | 1 - nbd.c | 8 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/include/block/nbd.h b/include/block/nbd.h index e10ab82..1b39c06 10

[Qemu-devel] [PULL 06/54] block: Reuse reference handling from bdrv_open()

2014-02-21 Thread Kevin Wolf
From: Max Reitz Remove the reference parameter and the related handling code from bdrv_file_open(), since it exists in bdrv_open() now as well. Signed-off-by: Max Reitz Reviewed-by: Benoit Canet Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block.c | 32 +++--

[Qemu-devel] [PULL 01/54] qcow2: Set zero flag for discarded clusters

2014-02-21 Thread Kevin Wolf
Instead of making the backing file contents visible again after a discard request, set the zero flag if possible (i.e. on version >= 3). Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- block/qcow2-cluster.c | 22 -- tests/qemu-iotests/046 | 18 ++ 2 fi

[Qemu-devel] [PULL 03/54] block: Change BDS parameter of bdrv_open() to **

2014-02-21 Thread Kevin Wolf
From: Max Reitz Make bdrv_open() take a pointer to a BDS pointer, similarly to bdrv_file_open(). If a pointer to a NULL pointer is given, bdrv_open() will create a new BDS with an empty name; if the BDS pointer is not NULL, that existing BDS will be reused (in the same way as bdrv_open() already

[Qemu-devel] [PULL 05/54] block: Make bdrv_file_open() static

2014-02-21 Thread Kevin Wolf
From: Max Reitz Add the bdrv_open() option BDRV_O_PROTOCOL which results in passing the call to bdrv_file_open(). Additionally, make bdrv_file_open() static and therefore bdrv_open() the only way to call it. Consequently, all existing calls to bdrv_file_open() have to be adjusted to use bdrv_ope

[Qemu-devel] [PULL 00/54] Block patches

2014-02-21 Thread Kevin Wolf
The following changes since commit 3e890c77cf038d8c2de66ed7996fe77a6f94787c: Merge remote-tracking branch 'remotes/stefanha/tags/qtest-monitor-process-pull-request' into staging (2014-02-21 14:54:05 +) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-up

[Qemu-devel] [PULL 02/54] block: Fix bdrv_is_first_non_filter()

2014-02-21 Thread Kevin Wolf
Consider top level BlockDriverStates as well. Signed-off-by: Kevin Wolf Reviewed-by: Benoit Canet Tested-by: Benoit Canet --- block.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/block.c b/block.c index 6f4baca..034e1ab 100644 --- a/block.c +++ b/block.c @@ -5416,11

Re: [Qemu-devel] [PATCH v2 0/2] quorum: Simplify quorum_open()

2014-02-21 Thread Kevin Wolf
Am 21.02.2014 um 22:30 hat Max Reitz geschrieben: > This series employs the new ability of qdict_array_split() to not only > split a QDict into a QList of QDicts (and a remainder QDict), but into a > QList of QObjects of any kind, to simplify quorum_open(). This (in my > opinion) enhances readabili

Re: [Qemu-devel] [PATCH V19 06/12] quorum: Add quorum mechanism.

2014-02-21 Thread Eric Blake
On 02/21/2014 02:21 PM, Benoît Canet wrote: > From: Benoît Canet > > This patchset enables the core of the quorum mechanism. > The num_children reads are compared to get the majority version and if this > version exists more than threshold times the guest won't see the error at all. > +++ b/docs

Re: [Qemu-devel] [PATCH] Sun4m : SCSI ESP controller

2014-02-21 Thread Olivier Danet
On 20/02/2014 09:58, Mark Cave-Ayland wrote: On 16/02/14 23:13, Olivier Danet wrote: Two small fixes for the ESP (AM53C94) SCSI controller * Signal the end of the DMA transfer after a SCSI command. * The status register (RSTAT) is cleared after reading the interrupt status register (RINTR), e

[Qemu-devel] [PATCH V19 02/12] quorum: Create BDRVQuorumState and BlkDriver and do init.

2014-02-21 Thread Benoît Canet
From: Benoît Canet Create the structure holding the quorum settings and write the minimal block driver instanciation boilerplate. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/block/qu

Re: [Qemu-devel] [PATCH V19 11/12] quorum: Add quorum_open() and quorum_close().

2014-02-21 Thread Eric Blake
On 02/21/2014 02:21 PM, Benoît Canet wrote: > From: Benoît Canet > > Example of command line: > > -drive if=virtio,driver=quorum,\ > children.0.file.filename=1.raw,\ > children.0.node-name=1.raw,\ > children.0.driver=raw,\ > children.1.file.filename=2.raw,\ > children.1.node-name=2.raw,\ > child

[Qemu-devel] [PATCH V19 08/12] quorum: Add quorum_invalidate_cache().

2014-02-21 Thread Benoît Canet
From: Benoît Canet We really want that live migration works with quorum so implement quorum_invalidate_cache(). Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index c6ea862.

[Qemu-devel] [PATCH V19 11/12] quorum: Add quorum_open() and quorum_close().

2014-02-21 Thread Benoît Canet
From: Benoît Canet Example of command line: -drive if=virtio,driver=quorum,\ children.0.file.filename=1.raw,\ children.0.node-name=1.raw,\ children.0.driver=raw,\ children.1.file.filename=2.raw,\ children.1.node-name=2.raw,\ children.1.driver=raw,\ children.2.file.filename=3.raw,\ children.2.nod

[Qemu-devel] [PATCH V19 00/12] Quorum block filter

2014-02-21 Thread Benoît Canet
Hi this is the latest version of the quorum block filter. This version fix the qmp events and a small rebase conflict. tested: tested that json qmp string are correct and parse well with python Ran qemu-iotest including 081 ok quorum command line ok quorum command line snapshot transaction ok

[Qemu-devel] [PATCH V19 12/12] quorum: Add unit test.

2014-02-21 Thread Benoît Canet
Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- tests/qemu-iotests/081 | 95 ++ tests/qemu-iotests/081.out | 34 + tests/qemu-iotests/group | 1 + 3 files changed, 130 insertions(+) create mode 100755 tests/qemu-iotests/0

[Qemu-devel] [PATCH V19 04/12] blkverify: Extract qemu_iovec_clone() and qemu_iovec_compare() from blkverify.

2014-02-21 Thread Benoît Canet
From: Benoît Canet qemu_iovec_compare() will be used to compare IOs vectors in quorum blkverify mode. The patch extracts these functions in order to factorize the code. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/blkverify.c | 108 +

Re: [Qemu-devel] Error compiling qemu from source on Ubuntu 12.10

2014-02-21 Thread Jobin Raju George
To fix this issue: - I cloned dtc from its repositoryand extracted the tarball to qemu/dtc/. - Compiled dtc from source first using make - Restarted configuring qemu. The p

[Qemu-devel] [PATCH V19 09/12] quorum: Add quorum_co_flush().

2014-02-21 Thread Benoît Canet
From: Benoît Canet Makes a vote to select error if any. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 28 1 file changed, 28 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 38bc217..840afda 100644 --- a/block/quorum.c ++

Re: [Qemu-devel] [PATCH V19 00/12] Quorum block filter

2014-02-21 Thread Kevin Wolf
Am 21.02.2014 um 22:21 hat Benoît Canet geschrieben: > Hi this is the latest version of the quorum block filter. > > This version fix the qmp events and a small rebase conflict. > > tested: > > tested that json qmp string are correct and parse well with python > > Ran qemu-iotest including 081

[Qemu-devel] [PATCH V19 07/12] quorum: Add quorum_getlength().

2014-02-21 Thread Benoît Canet
From: Benoît Canet Check that every bs file returns the same length. Otherwise, return -EIO to disable the quorum and avoid length discrepancy. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a

Re: [Qemu-devel] [PATCH v2 2/2] iotests: Mixed quorum child device specifications

2014-02-21 Thread Benoît Canet
The Friday 21 Feb 2014 à 22:30:38 (+0100), Max Reitz wrote : > Add a test case to test 081 for mixing full option dicts and reference > strings of specifying the quorum child block devices through QMP. > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/081 | 51 > ++

  1   2   3   4   >