Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Max Reitz mre...@redhat.com
---
block/qcow2-snapshot.c |8
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c
index 6a1d9de..70e329e 100644
--- a/block/qcow2
typo fix in comments.
5 typo fix in commit message.
Address Eric's comments:
2 fix 32bit/64bit issue in printf for sizeof and offse.
Wenchao Xia (6):
1 snapshot: add parameter *errp in snapshot create
2 qcow2: add error message in qcow2_write_snapshots()
3 qcow2: do not free clusters
The return value is only used for error report before this patch,
so change the function protype to return void.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/qcow2-snapshot.c| 30 +-
block/qcow2.h |4 +++-
block/rbd.c
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Max Reitz mre...@redhat.com
---
block/qcow2-snapshot.c | 25 +
1 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c
index 70e329e..685ef8b 100644
Some code in qcow2-snapshot.c directly accesses bs-file, so in those
places errors can't be injected by other events. Since the code in
qcow2-snapshot.c is similar to the other qcow2 internal code (in regards
to e.g. the L1 table), add some debug events.
Signed-off-by: Wenchao Xia xiaw
The function still returns int since qcow2_snapshot_delete() will
return the number.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/qcow2-snapshot.c | 43 +--
1 files changed, 37 insertions(+), 6 deletions(-)
diff --git a/block/qcow2
, although the patch changes it,
the final string generated is not changed. The custom function used
before will met problem when capitalized discriminator value is
introduced.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
scripts/qapi-types.py |6 +++---
scripts/qapi-visit.py |8
It will check whether the values specfied are wrotten correctly when
discriminator is a pre-defined enum type, which help check whether the
schema is in good form.
It is allowed that, not every value in enum is used, so do not check
that case.
Signed-off-by: Wenchao Xia xiaw
Later both qapi-types.py and qapi-visit.py need a common function
for enum name generation.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
scripts/qapi-types.py | 10 --
scripts/qapi.py | 10 ++
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git
code.
In short, enum type as discriminator is fully supported now.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
scripts/qapi-types.py | 18 ++
scripts/qapi-visit.py | 19 ++-
scripts/qapi.py |4 +++-
3 files changed, 31 insertions(+), 10
Now it is possible to inherit another struct inside data directly,
which saves trouble to define trivial structure.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
docs/qapi-code-gen.txt | 21 +
scripts/qapi-visit.py | 14 ++
2 files changed, 31
Otherwise they are leaked in a qap_free_STRUCTURE() call.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Cc: qemu-sta...@nongnu.org
---
qapi/qapi-dealloc-visitor.c | 20
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/qapi/qapi-dealloc-visitor.c b
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Cc: qemu-sta...@nongnu.org
---
tests/test-qmp-input-visitor.c |1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/tests/test-qmp-input-visitor.c b/tests/test-qmp-input-visitor.c
index 0beb8fb..1e1c6fa 100644
--- a/tests
Test for inherit and complex union.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
tests/qapi-schema/qapi-schema-test.json | 36 +
tests/qapi-schema/qapi-schema-test.out | 15 ++
tests/test-qmp-input-visitor.c | 188
tests/test-qmp-output
Now enum AIOContext will generate AIO_CONTEXT instead of A_I_O_CONTEXT,
X86CPU will generate X86_CPU instead of X86_C_P_U.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
include/qapi/qmp/qerror.h |2 +-
scripts/qapi.py | 26 +++---
target-i386/cpu.c
Later other script will need to check the enum values.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
scripts/qapi.py| 18 ++
tests/qapi-schema/comments.out |2 +-
tests/qapi-schema/qapi-schema-test.out |4 +++-
3 files changed
Patch 1 and 9 fix two memleak issue.
Patch 2-6 add support for enum type as discriminator
Patch 7 add _base support which can reduce number of defined structure
Patch 8 fix enum name generation issue, now AIOContext-AIO_CONTEXT, X86CPU-
X86_CPU.
Patch 10 are a butch of test cases.
Wenchao Xia (10
于 2013/11/5 8:35, Max Reitz 写道:
Add a new test for mirroring unbacked images in absolute-paths mode.
This should work, if possible, but most importantly, qemu should never
crash.
Signed-off-by: Max Reitz mre...@redhat.com
---
tests/qemu-iotests/070 | 91
于 2013/11/5 21:20, Eric Blake 写道:
On 11/04/2013 05:37 PM, Wenchao Xia wrote:
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Cc: qemu-sta...@nongnu.org
---
tests/test-qmp-input-visitor.c |1 +
1 files changed, 1 insertions(+), 0 deletions(-)
Reviewed-by: Eric Blake ebl
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Eric Blake ebl...@redhat.com
Cc: qemu-sta...@nongnu.org
---
tests/test-qmp-input-visitor.c |1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/tests/test-qmp-input-visitor.c b/tests/test-qmp-input-visitor.c
Otherwise member base is leaked in a qapi_free_STRUCTURE() call.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Eric Blake ebl...@redhat.com
Cc: qemu-sta...@nongnu.org
---
qapi/qapi-dealloc-visitor.c | 20
1 files changed, 20 insertions(+), 0 deletions
The bugfix patches are picked up from RFC series:
http://lists.nongnu.org/archive/html/qemu-devel/2013-11/msg00363.html
Wenchao Xia (2):
qapi: fix memleak by adding implict struct functions in dealloc visitor
tests: fix memleak in error path test for input visitor
qapi/qapi-dealloc
于 2013/11/5 21:25, Eric Blake 写道:
On 11/04/2013 05:37 PM, Wenchao Xia wrote:
It will check whether the values specfied are wrotten correctly when
s/specfied/specified/
s/wrotten/written/
discriminator is a pre-defined enum type, which help check whether the
schema is in good form
于 2013/11/5 21:41, Eric Blake 写道:
On 11/04/2013 05:37 PM, Wenchao Xia wrote:
Now it is possible to inherit another struct inside data directly,
which saves trouble to define trivial structure.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
docs/qapi-code-gen.txt | 21
于 2013/11/5 22:06, Luiz Capitulino 写道:
On Tue, 05 Nov 2013 13:31:09 +0800
Wenchao Xia xiaw...@linux.vnet.ibm.com wrote:
于 2013/11/5 10:51, Luiz Capitulino 写道:
On Tue, 05 Nov 2013 10:17:28 +0800
Wenchao Xia xiaw...@linux.vnet.ibm.com wrote:
于 2013/11/4 21:33, Luiz Capitulino 写道:
On Mon, 04
于 2013/11/4 21:33, Luiz Capitulino 写道:
On Mon, 04 Nov 2013 09:59:50 +0800
Wenchao Xia xiaw...@linux.vnet.ibm.com wrote:
于 2013/11/1 22:02, Luiz Capitulino 写道:
On Mon, 21 Oct 2013 10:16:01 +0800
Wenchao Xia xiaw...@linux.vnet.ibm.com wrote:
Signed-off-by: Wenchao Xia xiaw
于 2013/11/5 3:46, Eric Blake 写道:
On 11/03/2013 06:48 PM, Wenchao Xia wrote:
On 14.10.2013 23:52, Wenchao Xia wrote:
The function still returns int since qcow2_snapshot_delete() will
return the number.
@@ -227,24 +239,40 @@ static int
qcow2_write_snapshots(BlockDriverState *bs
于 2013/11/5 10:51, Luiz Capitulino 写道:
On Tue, 05 Nov 2013 10:17:28 +0800
Wenchao Xia xiaw...@linux.vnet.ibm.com wrote:
于 2013/11/4 21:33, Luiz Capitulino 写道:
On Mon, 04 Nov 2013 09:59:50 +0800
Wenchao Xia xiaw...@linux.vnet.ibm.com wrote:
于 2013/11/1 22:02, Luiz Capitulino 写道:
On Mon, 21
于 2013/11/2 20:39, Max Reitz 写道:
On 14.10.2013 23:52, Wenchao Xia wrote:
The return value is only used for error report before this patch,
so change the function protype to return void.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/qcow2-snapshot.c| 27
On 14.10.2013 23:52, Wenchao Xia wrote:
The function still returns int since qcow2_snapshot_delete() will
return the number.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/qcow2-snapshot.c | 48 ++--
1 files changed, 42
于 2013/11/2 21:56, Max Reitz 写道:
On 02.11.2013 14:04, Max Reitz wrote:
On 14.10.2013 23:52, Wenchao Xia wrote:
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/qcow2-snapshot.c |7 +++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/block/qcow2
于 2013/11/1 22:28, Luiz Capitulino 写道:
On Mon, 21 Oct 2013 10:15:59 +0800
Wenchao Xia xiaw...@linux.vnet.ibm.com wrote:
This series move the event define to qapi code, so later other components
could use it easily, it also make monitor code less and easier to decouple
with other code.
Yes
于 2013/11/1 22:02, Luiz Capitulino 写道:
On Mon, 21 Oct 2013 10:16:01 +0800
Wenchao Xia xiaw...@linux.vnet.ibm.com wrote:
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block.c|2 +-
include/block/block_int.h |2 +-
include/monitor/monitor.h |6
于 2013/10/15 5:52, Wenchao Xia 写道:
V2:
1: all fail case will goto fail section.
2: add the goto code.
v3:
Address Stefan's comments:
2: don't goto fail after allocation failure.
3: use sn-l1size correctly in qcow2_free_cluster().
4-7: add test case to verify the error
于 2013/10/11 10:33, Wenchao Xia 写道:
This series allow user to read internal snapshot's contents without qemu-img
convert.
V2:
Address Stefan's comments:
02: add 'fall through' comments in the case statement.
03: add doc about the difference of internal snapshot and backing chain
于 2013/10/30 0:09, Eric Blake 写道:
On 10/28/2013 11:22 PM, Wenchao Xia wrote:
MONITOR_EVENT seems tide to monitor too much, since it will be present
in qapi-schema, I think Q_EVENT_ or QMP_EVENT_KIND would be better?
I don't have a strong enough opinion on the bikeshed color.
MONITOR_EVENT
于 2013/10/30 2:18, Kevin Wolf 写道:
Am 21.10.2013 um 22:41 hat Eric Blake geschrieben:
On 10/21/2013 03:16 AM, Wenchao Xia wrote:
The define will be moved to qapi-schema.json later, so rename the
prefix to match its naming style.
Wouldn't it be simpler to fix the code generator to special case
于 2013/10/30 7:02, Eric Blake 写道:
On 10/22/2013 06:37 PM, Wenchao Xia wrote:
Hi, here is my draft for qapi-schema.json, please have a look.
Note:
1 it requires directly support of 'base', so I will sent additonal patch
support it by key word '_base' in 'data' contents.
2 some define not labeled
于 2013/10/30 19:55, Paolo Bonzini 写道:
Il 30/10/2013 08:27, Wenchao Xia ha scritto:
于 2013/10/30 2:18, Kevin Wolf 写道:
Am 21.10.2013 um 22:41 hat Eric Blake geschrieben:
On 10/21/2013 03:16 AM, Wenchao Xia wrote:
The define will be moved to qapi-schema.json later, so rename the
prefix to match
于 2013/10/28 18:44, Paolo Bonzini 写道:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Il 21/10/2013 22:41, Eric Blake ha scritto:
On 10/21/2013 03:16 AM, Wenchao Xia wrote:
The define will be moved to qapi-schema.json later, so rename
the prefix to match its naming style.
Wouldn't
Hi, Markus
I am coding V2 which support event in qapi-schema, and just remember
it is on your TODO list. Is it OK to let me implement it instead as V2?
Take another think, I think I may use past tense through the doc,
but with more carefully meaning, such as:
the system has enter powerdown state.
If you agree with the tense, I'd like sent the reformed doc
in the following, before respin.
Indeed, which is why separating the docs from
于 2013/10/22 5:00, Eric Blake 写道:
On 10/21/2013 03:16 AM, Wenchao Xia wrote:
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
qapi-schema.json | 56 ++
1 files changed, 56 insertions(+), 0 deletions(-)
Incomplete. Now that you
于 2013/10/22 14:55, Wenchao Xia 写道:
于 2013/10/22 5:00, Eric Blake 写道:
On 10/21/2013 03:16 AM, Wenchao Xia wrote:
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
qapi-schema.json | 56
++
1 files changed, 56 insertions(+), 0
于 2013/10/18 17:52, Paolo Bonzini 写道:
Il 18/10/2013 03:11, Wenchao Xia ha scritto:
stubs/pci-drive-host-add.o is packaged together with /stubs/mon-printf.o
so it would not work normal, remove it.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
stubs/pci-drive-hot-add.c |1 -
1
The define will be moved to qapi-schema.json later, so rename the
prefix to match its naming style.
Also fixed code style error reported in spice-core.c.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
balloon.c |2 +-
block.c |4 +-
block
block_int.h included monitor.h, so it knows the typedef.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Eric Blake ebl...@redhat.com
---
block.c |2 +-
include/block/block_int.h |2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git
? I hope to state those clearly in the doc, so I would be appreciate if
you have comments on the doc.
Wenchao Xia (6):
1 block: use type MonitorEvent directly
2 qapi: rename MonitorEvent to QEvent
3 qapi: rename prefix QEVENT to Q_EVENT
4 qapi: move event defines to qapi-schema.json
5 qapi
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block.c|2 +-
include/block/block_int.h |2 +-
include/monitor/monitor.h |6 +++---
monitor.c | 12 ++--
stubs/mon-protocol-event.c |2 +-
ui/vnc.c |2
They are defined with capitals for compatibility, see monitor_event_names
in monitor.c, which was used to set the event strings.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
include/monitor/monitor.h | 37 -
qapi-schema.json | 37
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
qapi-schema.json | 56 ++
1 files changed, 56 insertions(+), 0 deletions(-)
diff --git a/qapi-schema.json b/qapi-schema.json
index fbc1fab..0f966ab 100644
--- a/qapi-schema.json
+++ b
Use the generated table in qapi-types.h.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
monitor.c | 36 ++--
1 files changed, 2 insertions(+), 34 deletions(-)
diff --git a/monitor.c b/monitor.c
index b2c64de..7b8bd5e 100644
--- a/monitor.c
+++ b
于 2013/10/22 4:41, Eric Blake 写道:
On 10/21/2013 03:16 AM, Wenchao Xia wrote:
The define will be moved to qapi-schema.json later, so rename the
prefix to match its naming style.
Wouldn't it be simpler to fix the code generator to special case QEvent
to turn into QEVENT, instead of having to go
于 2013/10/22 5:00, Eric Blake 写道:
On 10/21/2013 03:16 AM, Wenchao Xia wrote:
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
qapi-schema.json | 56 ++
1 files changed, 56 insertions(+), 0 deletions(-)
Incomplete. Now that you
于 2013/10/18 17:36, Paolo Bonzini 写道:
Il 18/10/2013 03:11, Wenchao Xia ha scritto:
block_int.h already included it.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Eric Blake ebl...@redhat.com
---
block.c |1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff
于 2013/10/18 20:38, Eric Blake 写道:
On 10/18/2013 03:36 AM, Paolo Bonzini wrote:
Il 18/10/2013 03:11, Wenchao Xia ha scritto:
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
include/monitor/monitor.h | 38 +-
include/qapi/qmp/qevent.h | 66
于 2013/10/18 19:22, Markus Armbruster 写道:
Paolo Bonzini pbonz...@redhat.com writes:
Il 18/10/2013 03:11, Wenchao Xia ha scritto:
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
include/qapi/error.h |5 -
qobject/qerror.c |7 ---
util/error.c |6
于 2013/10/18 19:40, Markus Armbruster 写道:
Paolo Bonzini pbonz...@redhat.com writes:
Il 18/10/2013 03:11, Wenchao Xia ha scritto:
The behavior to set sep brings trouble to modification later,
the logic is not changed by add tailing space in fprintf().
Signed-off-by: Wenchao Xia xiaw
于 2013/10/18 17:44, Paolo Bonzini 写道:
Il 18/10/2013 03:11, Wenchao Xia ha scritto:
This remove additional code path about where to print the error,
error_vprintf() is only the controller now, making future change
easier.
The logic is not changed since when cur_mon = NULL, error_vprintf
于 2013/10/18 17:46, Paolo Bonzini 写道:
Il 18/10/2013 03:11, Wenchao Xia ha scritto:
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
qobject/qerror.c |1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/qobject/qerror.c b/qobject/qerror.c
index 5b487f3..685167a
于 2013/10/18 17:51, Paolo Bonzini 写道:
Il 18/10/2013 03:11, Wenchao Xia ha scritto:
All existing caller are using *cur_mon as its parameter, and *cur_mon
is an internal variable which used inside monitor.c. This patch reduce
the exposing of details in monitor.c, by introduce a new function
block_int.h included monitor.h, so it knows the typedef.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Eric Blake ebl...@redhat.com
---
block.c |2 +-
include/block/block_int.h |2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
include/qemu/error-report.h |1 -
util/qemu-error.c |2 +-
2 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/include/qemu/error-report.h b/include/qemu/error-report.h
index 5297e65..a08ee95 100644
block_int.h already included it.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Eric Blake ebl...@redhat.com
---
block.c |1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/block.c b/block.c
index 2c15e5d..e92a556 100644
--- a/block.c
+++ b/block.c
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
include/qapi/error.h |5 -
qobject/qerror.c |7 ---
util/error.c |6 --
3 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/include/qapi/error.h b/include/qapi/error.h
index 7d4c696..8688aaf
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
include/monitor/monitor.h | 38 +-
include/qapi/qmp/qevent.h | 66 +
include/qapi/qmp/types.h |1 +
3 files changed, 68 insertions(+), 37 deletions(-)
create
This remove additional code path about where to print the error,
error_vprintf() is only the controller now, making future change
easier.
The logic is not changed since when cur_mon = NULL, error_vprintf()
will still print to stderr.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Eric Blake ebl...@redhat.com
---
block.c|2 +-
include/block/block_int.h |2 +-
include/monitor/monitor.h |2 +-
include/qapi/qmp/qevent.h |4 ++--
monitor.c | 12
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
qobject/qerror.c |1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/qobject/qerror.c b/qobject/qerror.c
index 5b487f3..685167a 100644
--- a/qobject/qerror.c
+++ b/qobject/qerror.c
@@ -77,7 +77,6 @@ static void
stubs/pci-drive-host-add.o is packaged together with /stubs/mon-printf.o
so it would not work normal, remove it.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
stubs/pci-drive-hot-add.c |1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/stubs/pci-drive-hot-add.c
All existing caller are using *cur_mon as its parameter, and *cur_mon
is an internal variable which used inside monitor.c. This patch reduce
the exposing of details in monitor.c, by introduce a new function
monitor_get_fd_cur() and make old one static.
Signed-off-by: Wenchao Xia xiaw
The code about how to print the message, is foldered into a function,
so if we want to change the print behavior in the future, just modify
that function only.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
qobject/qerror.c | 28
1 files changed, 16
The behavior to set sep brings trouble to modification later,
the logic is not changed by add tailing space in fprintf().
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
util/qemu-error.c |5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/util/qemu-error.c b
monitor_vprintf() is called in the code path, and it will not print
when monitor is in qmp mode, so checking monitor mode in
error_printf_unless_qmp() is useless, remove it to simplify the code.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
hw/usb/bus.c|2 +-
hw
:
Remove stub mon-protocol-event for block
Wenchao Xia (13):
1 block: use type MonitorEvent directly
2 block: do not include monitor.h in block.c
3 qapi: move MonitorEvent define
4 qapi: rename MonitorEvent to QEvent
5 error: define struct Error in only one place
6 error: remove
于 2013/10/15 18:07, mike 写道:
On 10/15/2013 04:58 PM, Kevin Wolf wrote:
Am 15.10.2013 um 05:38 hat mike geschrieben:
On 10/14/2013 10:36 PM, Markus Armbruster wrote:
Mike Qiu qiud...@linux.vnet.ibm.com writes:
Without this, output of 'info block'
scsi0-hd0: /images/f18-ppc64.qcow2 (qcow2)
于 2013/10/16 15:47, Markus Armbruster 写道:
Wenchao Xiaxiaw...@linux.vnet.ibm.com writes:
于 2013/10/15 18:07, mike 写道:
On 10/15/2013 04:58 PM, Kevin Wolf wrote:
Am 15.10.2013 um 05:38 hat mike geschrieben:
On 10/14/2013 10:36 PM, Markus Armbruster wrote:
Mike Qiuqiud...@linux.vnet.ibm.com
于 2013/10/2 20:28, Stefan Hajnoczi 写道:
On Mon, Sep 09, 2013 at 10:57:55AM +0800, Wenchao Xia wrote:
V2:
1: all fail case will goto fail section.
2: add the goto code.
v3:
Address Stefan's comments:
2: don't goto fail after allocation failure.
3: use sn-l1size correctly
于 2013/10/2 20:23, Stefan Hajnoczi 写道:
On Mon, Sep 30, 2013 at 04:08:53PM -0600, Eric Blake wrote:
On 09/08/2013 08:58 PM, Wenchao Xia wrote:
The message will be print out with a macro enabled, which can
s/print/printed/
be used to check which error path is taken.
Signed-off-by: Wenchao
于 2013/10/1 6:28, Eric Blake 写道:
On 09/08/2013 08:58 PM, Wenchao Xia wrote:
This test will focus on the low level procedure of qcow2 snapshot
operations, now it covers only the create operation. Overlap error
paths are not checked since no good way to trigger those errors.
Signed-off
determined debug printf message.
5: squashed patches that add and use debug events.
6: added comments about test only on Linux.
Wenchao Xia (6):
1 snapshot: add parameter *errp in snapshot create
2 qcow2: add error message in qcow2_write_snapshots()
3 qcow2: do not free clusters when fail
The return value is only used for error report before this patch,
so change the function protype to return void.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/qcow2-snapshot.c| 27 +++
block/qcow2.h |4 +++-
block/rbd.c
This test will focus on the low level procedure of qcow2 snapshot
operations, now it covers only the create operation. Overlap error
paths are not checked since no good way to trigger those errors.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
tests/qemu-iotests/068 | 214
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/qcow2-snapshot.c | 25 +
1 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c
index c933b7f..6d0ffd4 100644
--- a/block/qcow2-snapshot.c
+++ b/block
The function still returns int since qcow2_snapshot_delete() will
return the number.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/qcow2-snapshot.c | 48 ++--
1 files changed, 42 insertions(+), 6 deletions(-)
diff --git a/block
Some code in qcow2-snapshot.c directly access bs-file, so in those
points error can't be injected by other events. Since the code in
qcow2-snapshot.c is qcow2's internal detail similar as L1 table,
so add some debug events.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/qcow2-snapshot.c |7 +++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c
index 4bd494b..c933b7f 100644
--- a/block/qcow2-snapshot.c
+++ b/block/qcow2-snapshot.c
Reviewed-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Logic looks fine to me, only a minor comments.
QemuMutex does not guarantee fairness and cannot be acquired
recursively:
Fairness means each locker gets a turn and the scheduler cannot cause
starvation.
Recursive locking is useful for composition, it allows a sequence of
locking
于 2013/9/26 8:42, Wenchao Xia 写道:
v2:
Address Michael's comments:
01: better commit message to tip what it is doing.
Wenchao Xia (2):
1 tests: build the helper program by default
2 build: add command check-clean
Makefile |1 -
tests/Makefile | 16 ++--
2
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
tests/qemu-iotests/058 | 102
tests/qemu-iotests/058.out | 32 ++
tests/qemu-iotests/check |1 +
tests/qemu-iotests/group |1 +
4 files changed, 136 insertions
as deprecated, added doc
for them.
Wenchao Xia (5):
1 snapshot: distinguish id and name in load_tmp
2 qemu-nbd: support internal snapshot export
3 qemu-iotests: add 058 internal snapshot export with qemu-nbd case
4 qemu-img: add -l for snapshot in convert
5 qemu-iotests: add test
to let caller know the errno, and errno will be used later.
Also fix a typo in comments of bdrv_snapshot_delete().
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/qcow2-snapshot.c| 16 ++-
block/qcow2.h |5 +++-
block/snapshot.c | 60
Now it is possible to directly export an internal snapshot, which
can be used to probe the snapshot's contents without qemu-img
convert.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/snapshot.c | 18 +
include/block/snapshot.h |8 +++
qemu
Now qemu-img convert have similar options as qemu-nbd for internal
snapshot.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
qemu-img-cmds.hx |2 +-
qemu-img.c | 45 -
qemu-img.texi| 12
3 files changed, 45
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
tests/qemu-iotests/058 | 19 ++-
tests/qemu-iotests/058.out | 12
2 files changed, 30 insertions(+), 1 deletions(-)
diff --git a/tests/qemu-iotests/058 b/tests/qemu-iotests/058
index 5b821cf..d4987ae
于 2013/10/11 21:35, Stefan Hajnoczi 写道:
On Fri, Oct 11, 2013 at 04:55:31PM +0800, Wenchao Xia wrote:
+/* Recursive FIFO lock
+ *
+ * This lock provides more features than a plain mutex:
+ *
+ * 1. Fairness - enforces FIFO order.
+ * 2. Nesting - can be taken recursively.
+ * 3. Contention
于 2013/10/2 0:08, Paolo Bonzini 写道:
Il 26/09/2013 02:16, Wenchao Xia ha scritto:
Now it is possible to directly export an internal snapshot, which
can be used to probe the snapshot's contents without qemu-img
convert.
Signed-off-by: Wenchao Xiaxiaw...@linux.vnet.ibm.com
---
block/snapshot.c
于 2013/10/1 22:49, Eric Blake 写道:
On 09/25/2013 06:16 PM, Wenchao Xia wrote:
Signed-off-by: Wenchao Xiaxiaw...@linux.vnet.ibm.com
---
qemu-nbd.c| 11 ++-
qemu-nbd.texi | 11 ++-
2 files changed, 20 insertions(+), 2 deletions(-)
This should be squashed into 2/7
于 2013/10/2 0:07, Paolo Bonzini 写道:
Il 26/09/2013 02:16, Wenchao Xia ha scritto:
+c = getopt(argc, argv, f:O:B:s:hce6o:pS:t:qnL:);
if (c == -1) {
break;
}
@@ -1183,6 +1184,9 @@ static int img_convert(int argc, char **argv)
case 's
401 - 500 of 1818 matches
Mail list logo