于 2013-5-16 17:32, Stefan Hajnoczi 写道:
On Wed, May 15, 2013 at 04:43:38PM +0800, Wenchao Xia wrote:
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/qcow2-snapshot.c |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/block/qcow2-snapshot.c b/block/qcow2
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/qcow2-snapshot.c |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c
index 992a5c8..a6065a9 100644
--- a/block/qcow2-snapshot.c
+++ b/block/qcow2-snapshot.c
于 2013-5-15 20:28, Luiz Capitulino 写道:
On Wed, 15 May 2013 10:10:37 +0800
Wenchao Xia xiaw...@linux.vnet.ibm.com wrote:
于 2013-5-6 21:22, Luiz Capitulino 写道:
On Mon, 06 May 2013 10:09:43 +0800
Wenchao Xia xiaw...@linux.vnet.ibm.com wrote:
于 2013-5-3 10:51, Wenchao Xia 写道:
于 2013-5-2 20:02
Nice to have it for injecting error.
Reviewed-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
--
Best Regards
Wenchao Xia
-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
--
Best Regards
Wenchao Xia
-growable = 0;
QDECREF(bs-options);
bs-options = NULL;
+assert(QTAILQ_EMPTY(bs-before_write_cbs));
+QTAILQ_INIT(bs-before_write_cbs);
INIT not needed if you assert before.
Paolo
--
Best Regards
Wenchao Xia
Wenchao Xia
于 2013-5-8 19:21, Kevin Wolf 写道:
Am 08.05.2013 um 12:25 hat Wenchao Xia geschrieben:
This serial will package backing chain snapshot code as one case, to make it
possible adding more operations later.
v2:
Address Kevin's comments:
Use the same prototype prepare, commit, rollback model
于 2013-5-6 21:22, Luiz Capitulino 写道:
On Mon, 06 May 2013 10:09:43 +0800
Wenchao Xia xiaw...@linux.vnet.ibm.com wrote:
于 2013-5-3 10:51, Wenchao Xia 写道:
于 2013-5-2 20:02, Luiz Capitulino 写道:
On Thu, 02 May 2013 10:05:08 +0800
Wenchao Xia xiaw...@linux.vnet.ibm.com wrote:
于 2013-4-30 3:05
will be also needed, which may be
a bit complex needing serous plan.
--
Best Regards
Wenchao Xia
.
v5:
better commit message and comments, switch callback function name rollback
to abort.
Wenchao Xia (5):
1 block: package preparation code in qmp_transaction()
2 block: move input parsing code in qmp_transaction()
3 block: package committing code in qmp_transaction()
4 block: package
The code is simply moved into a separate function.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Kevin Wolf kw...@redhat.com
Reviewed-by: Stefan Hajnoczi stefa...@redhat.com
Reviewed-by: Eric Blake ebl...@redhat.com
---
blockdev.c | 19 ---
1 files changed
Make it easier to add other operations to qmp_transaction() by using
callbacks, with external snapshots serving as an example implementation
of the callbacks.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Kevin Wolf kw...@redhat.com
Reviewed-by: Stefan Hajnoczi stefa
The code is moved into preparation function, and changed
a bit to tip more clearly what it is doing.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Kevin Wolf kw...@redhat.com
Reviewed-by: Stefan Hajnoczi stefa...@redhat.com
Reviewed-by: Eric Blake ebl...@redhat.com
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Kevin Wolf kw...@redhat.com
Reviewed-by: Stefan Hajnoczi stefa...@redhat.com
Reviewed-by: Eric Blake ebl...@redhat.com
---
blockdev.c | 11 ---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/blockdev.c b
The code before really committing is moved into a function. Most
code is simply moved from qmp_transaction(), except that on fail it
just returns now. Other code such as input parsing is not touched,
to make it easier in review.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed
于 2013-5-3 22:46, Eric Blake 写道:
On 05/01/2013 08:26 PM, Wenchao Xia wrote:
Make it easier to add other operations to qmp_transaction() by using
callbacks, with external snapshots serving as an example implementation
of the callbacks.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
于 2013-5-3 10:51, Wenchao Xia 写道:
于 2013-5-2 20:02, Luiz Capitulino 写道:
On Thu, 02 May 2013 10:05:08 +0800
Wenchao Xia xiaw...@linux.vnet.ibm.com wrote:
于 2013-4-30 3:05, Luiz Capitulino 写道:
On Fri, 26 Apr 2013 16:46:57 +0200
Stefan Hajnoczi stefa...@gmail.com wrote:
On Fri, Apr 26, 2013
于 2013-5-2 20:02, Luiz Capitulino 写道:
On Thu, 02 May 2013 10:05:08 +0800
Wenchao Xia xiaw...@linux.vnet.ibm.com wrote:
于 2013-4-30 3:05, Luiz Capitulino 写道:
On Fri, 26 Apr 2013 16:46:57 +0200
Stefan Hajnoczi stefa...@gmail.com wrote:
On Fri, Apr 26, 2013 at 05:31:15PM +0800, Wenchao Xia
于 2013-5-1 2:16, Eric Blake 写道:
On 04/26/2013 03:31 AM, Wenchao Xia wrote:
To make it clear about id and name in searching, the API is changed
a bit to distinguish them, and caller can choose to search by id or name.
If not found, *errp will be set to tip why.
Note that the caller logic
于 2013-4-30 3:05, Luiz Capitulino 写道:
On Fri, 26 Apr 2013 16:46:57 +0200
Stefan Hajnoczi stefa...@gmail.com wrote:
On Fri, Apr 26, 2013 at 05:31:15PM +0800, Wenchao Xia wrote:
@@ -2586,10 +2585,12 @@ void do_info_snapshots(Monitor *mon, const QDict *qdict)
}
if (total 0
.
Wenchao Xia (5):
1 block: package preparation code in qmp_transaction()
2 block: move input parsing code in qmp_transaction()
3 block: package committing code in qmp_transaction()
4 block: package rollback code in qmp_transaction()
5 block: make all steps in qmp_transaction() as callback
The code is simply moved into a separate function.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
blockdev.c | 19 ---
1 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 06100d7..26bc78e 100644
--- a/blockdev.c
+++ b
The code before really committing is moved into a function. Most
code are simply moved from qmp_transaction(), except that on fail it
just return now. Other code such as input parsing is not touched,
to make it easier in review.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
The code is moved into preparation function, and changed
a bit to tip more clearly what it is doing.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Eric Blake ebl...@redhat.com
---
blockdev.c | 38 +++---
1 files changed, 19 insertions(+), 19
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
blockdev.c | 11 ---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 26bc78e..77adec8 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -882,6 +882,13 @@ static void external_snapshot_commit
Make it easier to add other operations to qmp_transaction() by using
callbacks, with external snapshots serving as an example implementation
of the callbacks.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
blockdev.c | 92
function to get rid of buffer, avoid string truncation.
Note patch 2 and 3, 5 and 6 can be squashed. Sperating them to make review
easier, since some code is already reviewed before.
Stefan Hajnoczi (1):
1 block: drop bs_snapshots global variable
Wenchao Xia (6):
2 block: move
are always appended to the bdrv_states list. This means that
calling the new find_vmstate_bs() function is idempotent - it returns
the same BlockDriverState unless it was hot-unplugged.
Signed-off-by: Stefan Hajnoczi stefa...@redhat.com
Reviewed-by: Eric Blake ebl...@redhat.com
Reviewed-by: Wenchao Xia
This patch adds block/snapshot.c and then moves the function there.
It also fixes small code style errors reported by check script.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Eric Blake ebl...@redhat.com
Reviewed-by: Kevin Wolf kw...@redhat.com
---
block/Makefile.objs
All snapshot related code, except bdrv_snapshot_dump(), is moved to
block/snapshot.c. bdrv_snapshot_dump() will be moved to another file later.
It also fixes small code style errors reported by check script.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block.c
and name matching.
Savevm, loadvm logic may need to be improved later, to avoid mixing of them.
Some code is borrowed from Pavel's patch.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Signed-off-by: Pavel Hrdina phrd...@redhat.com
---
block/snapshot.c | 72
array 'bdrv_states'.
4 code style fix.
Now block.h and snapshot.h are at the same level in include path,
block_int.h and qapi.h will both include them.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block.c | 185 -
block/qapi.c
This patch introduce a new print function, which will output message to
monitor when it present. With it, bdrv_snapshot_dump() need no more buffer
and can avoid string truncation, bdrv_image_info_dump() can also be used by
hmp code later, besides qemu-img code.
Signed-off-by: Wenchao Xia xiaw
This patch adds block/qapi.c and moves the functions there. To avoid
conflict and tip better, macro in header file is BLOCK_QAPI_H instead
of QAPI_H.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Eric Blake ebl...@redhat.com
Reviewed-by: Kevin Wolf kw...@redhat.com
---
block
于 2013-4-26 22:34, Stefan Hajnoczi 写道:
On Fri, Apr 26, 2013 at 05:31:12PM +0800, Wenchao Xia wrote:
To make it clear about id and name in searching, the API is changed
a bit to distinguish them, and caller can choose to search by id or name.
If not found, *errp will be set to tip why.
Note
于 2013-4-26 22:46, Stefan Hajnoczi 写道:
On Fri, Apr 26, 2013 at 05:31:15PM +0800, Wenchao Xia wrote:
@@ -2586,10 +2585,12 @@ void do_info_snapshots(Monitor *mon, const QDict *qdict)
}
if (total 0) {
-monitor_printf(mon, %s\n, bdrv_snapshot_dump(buf, sizeof(buf),
NULL
block devices. We need qmp_transaction() support for this. Wenchao Xia
is
currently making qmp_transaction() extensible so new action types, like
block-backup, can be added.
2. Sync modes like drive-mirror (top, full, none). This makes it possible to
preserve the backing file
)) {
available = 0;
break;
}
--
Best Regards
Wenchao Xia
-schema.json
--
Best Regards
Wenchao Xia
于 2013-4-24 17:25, Stefan Hajnoczi 写道:
On Fri, Apr 19, 2013 at 08:57:10AM +0800, Wenchao Xia wrote:
diff --git a/blockdev.c b/blockdev.c
index 051be98..b336794 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -779,14 +779,41 @@ void qmp_blockdev_snapshot_sync(const char *device, const
char
于 2013-4-25 20:16, Eric Blake 写道:
On 04/25/2013 12:31 AM, Wenchao Xia wrote:
+
+if (!found) {
+error_setg(errp, Failed to find snapshot '%s', name ? name : id);
suggest not to set error, since it is a normal case.
The way I understand it, failure to find a snapshot might
于 2013-4-25 20:21, Eric Blake 写道:
On 04/25/2013 12:58 AM, Wenchao Xia wrote:
+char buf[256];
I know this fixed-size buffer is just a copy-and-paste from other code
that displays snapshot information, but I really hate it. On the other
hand, I can tolerate if we have
instead of 0/1 is a bit nicer at expressing why we chose a positive
value; but that would be a separate cleanup to all of qemu-img.c.
Hence, I have no problems giving:
Reviewed-by: Eric Blake ebl...@redhat.com
Maybe an incode comments like:
+/* Returns 1 on error. */
Reviewed-by: Wenchao Xia xiaw
bdrv_snapshot_delete() do not return error number now, and I checked
original caller code, they used it only for error reporting, so it is
safe to change.
Reviewed-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Signed-off-by: Pavel Hrdina phrd...@redhat.com
---
block.c | 21
is ready.
If you agree, I will use your logic in my bdrv_snapshot_find() to
progress. But still, if you can upstream your version quickly, or form
a clean patch for this function, I am happy to rebase on it.:
--
Best Regards
Wenchao Xia
value in caller qemu-img.
Address Stefan's comments:
10/18: added doc about the meaning of consistent snapshot in
qmp-commands.hx.
Address Kevin's comments:
12/18: use local_error to detect error in qmp_query_snapshots(), in case
caller set errp = NULL.
Wenchao Xia (18
they are and relationship. From caller,
I think and is better, and taking two parameter in one function
make caller easier to use, in most case.
I'd like a clean serial go for it, hope to know Pavel and
Markus's idea.
--
Best Regards
Wenchao Xia
于 2013-4-18 18:22, Pavel Hrdina 写道:
On 18.4.2013 06:31, Wenchao Xia wrote:
于 2013-4-18 2:14, Eric Blake 写道:
On 04/17/2013 04:51 AM, Pavel Hrdina wrote:
On 17.4.2013 12:19, Wenchao Xia wrote:
于 2013-4-17 15:52, Pavel Hrdina 写道:
Hi Wenchao,
unfortunately no. According to new design of savevm
commit message and comments in code that only one of rollback()
or commit() will be called.
Wenchao Xia (5):
1 block: package preparation code in qmp_transaction()
2 block: move input parsing code in qmp_transaction()
3 block: package committing code in qmp_transaction()
4 block: package
The code is moved into preparation function, and changed
a bit to tip more clearly what it is doing.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Eric Blake ebl...@redhat.com
---
blockdev.c | 38 +++---
1 files changed, 19 insertions(+), 19
The code before really committing is moved into a function. Most
code are simply moved from qmp_transaction(), except that on fail it
just return now. Other code such as input parsing is not touched,
to make it easier in review.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
The code is simply moved into a separate function.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
blockdev.c | 19 ---
1 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 89521bb..275c6f9 100644
--- a/blockdev.c
+++ b
Make it easier to add other operations to qmp_transaction() by using
callbacks, with external snapshots serving as an example implementation
of the callbacks.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
blockdev.c | 84
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
blockdev.c | 11 ---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 275c6f9..051be98 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -882,6 +882,13 @@ static void external_snapshot_commit
On 17.4.2013 04:53, Wenchao Xia wrote:
Hi, Pavel
I have implemented it at
http://lists.nongnu.org/archive/html/qemu-devel/2013-04/msg02533.html
in patch 1,2. Could u check if it satisfy your requirement, if yes maybe
you can directly use them.
Signed-off-by: Pavel Hrdina phrd...@redhat.com
于 2013-4-17 22:42, Stefan Hajnoczi 写道:
On Mon, Apr 01, 2013 at 06:01:30PM +0800, Wenchao Xia wrote:
/* New and old BlockDriverState structs for group snapshots */
-typedef struct BlkTransactionStates {
+typedef struct BdrvActionOps {
+int (*commit)(BlockdevAction *action, void **p_opaque
于 2013-4-18 4:52, Eric Blake 写道:
On 04/13/2013 02:56 AM, Wenchao Xia wrote:
This patch adds a parameter to tell whether return valid snapshots
for whole VM only.
Note that the snapshot check logic is copied from do_info_snapshots(),
which is different with load_vmstate
于 2013-4-18 2:14, Eric Blake 写道:
On 04/17/2013 04:51 AM, Pavel Hrdina wrote:
On 17.4.2013 12:19, Wenchao Xia wrote:
于 2013-4-17 15:52, Pavel Hrdina 写道:
Hi Wenchao,
unfortunately no. According to new design of savevm, loadvm and delvm I
need also search for snapshots that have the specified
.
HMP delvm:
- args_type = name:s?,id:i?
- same rules as loadvm
Same comment as for loadvm.
--
Best Regards
Wenchao Xia
)) {
+if (!bdrv_snapshot_find(bs1, sn_info, sn-name, sn-id_str))
{
available = 0;
break;
}
--
Best Regards
Wenchao Xia
于 2013-4-16 21:52, Kevin Wolf 写道:
Am 13.04.2013 um 13:11 hat Wenchao Xia geschrieben:
Now qmp_transaction() can be extended with other operation,
external snapshot or backing chain creation, is just one case it.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
blockdev.c | 68
于 2013-4-17 7:42, Eric Blake 写道:
On 04/13/2013 02:56 AM, Wenchao Xia wrote:
This patch introduce a new print function, which will output message to
monitor when it present. With it, bdrv_snapshot_dump() need no more buffer
and can avoid string truncation, bdrv_image_info_dump() can also
snapshot in
qmp-commands.hx.
Address Kevin's comments:
12/18: use local_error to detect error in qmp_query_snapshots(), in case
caller set errp = NULL.
Wenchao Xia (18):
1 block: move bdrv_snapshot_find() to block/snapshot.c
2 block: distinguish id and name in bdrv_find_snapshot()
3 qemu-img
Parameter *fmt was not used, so remove it.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Eric Blake ebl...@redhat.com
Reviewed-by: Kevin Wolf kw...@redhat.com
---
qemu-img.c |5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/qemu-img.c b/qemu
This patch adds block/qapi.c and moves the functions there. To avoid
conflict and tip better, macro in header file is BLOCK_QAPI_H instead
of QAPI_H. The moving is for making review easier, those functions
will be modified and renamed later.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
This is a code move patch, except in qmp_query_block bdrv_next(bs)
is used instead of direct traverse of global array 'bdrv_states'.
This patch also fix code style error reported by check script.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Kevin Wolf kw...@redhat.com
This patch adds function bdrv_query_image_info(), which will
retrieve image info in qmp object format. The implementation is
based on the code moved from qemu-img.c, but uses block layer
function to get snapshot info.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/qapi.c
This patch adds function bdrv_query_snapshot_info_list(), which will
retrieve snapshot info of an image in qmp object format. The implementation
is based on the code moved from qemu-img.c with modification to fit more
for qmp based block layer API.
Signed-off-by: Wenchao Xia xiaw
This patch adds a parameter to tell whether return valid snapshots
for whole VM only.
Note that the snapshot check logic is copied from do_info_snapshots(),
which is different with load_vmstate() and will be changed in next patch.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed
They are needed later in hmp command, dump_human_image_info()
is renamed to bdrv_image_info_dump().
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Kevin Wolf kw...@redhat.com
---
block.c | 33
block/qapi.c | 100
, and this patch clearly
tips it.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/qapi.c | 13 -
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/block/qapi.c b/block/qapi.c
index 97c5cd4..49c0eb0 100644
--- a/block/qapi.c
+++ b/block/qapi.c
@@ -46,7 +46,18
Now image info will be retrieved as an embbed json object inside
BlockDeviceInfo, backing chain info and all related internal snapshot
info can be got in the enhanced recursive structure of ImageInfo.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/qapi.c | 40
This patch introduce a new print function, which will output message to
monitor when it present. With it, bdrv_snapshot_dump() need no more buffer
and can avoid string truncation, bdrv_image_info_dump() can also be used by
hmp code later, besides qemu-img code.
Signed-off-by: Wenchao Xia xiaw
New member *backing-image is added to reflect the backing chain
status.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/qapi.c | 18 +-
qapi-schema.json |5 -
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/block/qapi.c b/block
This patch adds block/snapshot.c and then moves the function
there. It also fixes small code style errors reported by check script.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Eric Blake ebl...@redhat.com
Reviewed-by: Kevin Wolf kw...@redhat.com
---
block/Makefile.objs
the qmp object got to strings in stdout or
monitor console.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
hmp.c | 44
hmp.h |1 +
2 files changed, 45 insertions(+), 0 deletions(-)
diff --git a/hmp.c b/hmp.c
index dbe9b90..cef5eee
Now human monitor can show image details, include internal
snapshot and backing chain info for every block device.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
hmp.c | 12
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/hmp.c b/hmp.c
index cef5eee
This patch using new added function in last commit which retrieve
info from qmp for snapshot info.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Kevin Wolf kw...@redhat.com
Reviewed-by: Eric Blake ebl...@redhat.com
---
monitor.c |2 +-
savevm.c | 65
With these parameters, user can choose the information to be showed,
to avoid message flood in the monitor.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Kevin Wolf kw...@redhat.com
---
hmp.c | 23 +++
monitor.c |7 ---
2 files changed, 19
This interface returns info of valid internal snapshots for whole vm.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/qapi.c | 17 +++
qapi-schema.json | 14 +
qmp-commands.hx | 58 ++
3
if there are unwisely chosen name mixed with id. In do_info_snapshots(),
the caller is changed to search id only, which should be the correct behavior.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
block/snapshot.c | 46 ++
include
This serial will package backing chain snapshot code as one case, to make it
possible adding more operations later.
v2:
Address Kevin's comments:
Use the same prototype prepare, commit, rollback model in original code,
commit should never fail.
Wenchao Xia (5):
block: package preparation
Now qmp_transaction() can be extended with other operation,
external snapshot or backing chain creation, is just one case it.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
blockdev.c | 68 +++
1 files changed, 58 insertions
The code before really committing is moved into a function. Most
code are simply moved from qmp_transaction()i, except fail handling
label is changed from delete_and_fail to fail. Other code such
as input parsing is not touched, to make it easier in review.
Signed-off-by: Wenchao Xia xiaw
The code is moved into preparation function, and is changed
a bit to tip more clearly what it is doing.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
blockdev.c | 38 +++---
1 files changed, 19 insertions(+), 19 deletions(-)
diff --git
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
blockdev.c | 12 +---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 38cb7d5..3e69569 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -889,6 +889,14 @@ static void
The code is simply moved into a separate function.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
---
blockdev.c | 20 +---
1 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 8d1faf8..38cb7d5 100644
--- a/blockdev.c
+++ b
于 2013-4-12 11:22, Eric Blake 写道:
On 04/11/2013 09:17 PM, Wenchao Xia wrote:
Hmm, as I typed that, I did another search of qemu-schema.json - we have
the type 'ImageInfo' defined, but none of the existing 'command's ever
call out the use of that type. Is it a type we are only using
于 2013-4-10 23:28, Markus Armbruster 写道:
Wenchao Xia xiaw...@linux.vnet.ibm.com writes:
This patch adds function bdrv_query_image_info(), which will
retrieve image info in qmp object format. The implementation is
based on the code moved from qemu-img.c, but uses block layer
function
--
Best Regards
Wenchao Xia
于 2013-4-11 0:06, Markus Armbruster 写道:
Wenchao Xia xiaw...@linux.vnet.ibm.com writes:
New member *backing-image is added to reflect the backing chain
status.
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
Reviewed-by: Kevin Wolf kw...@redhat.com
Reviewed-by: Eric Blake ebl
Regards
Wenchao Xia
于 2013-4-11 2:57, Luiz Capitulino 写道:
On Wed, 10 Apr 2013 18:17:04 +0200
Markus Armbruster arm...@redhat.com wrote:
Stefan Hajnoczi stefa...@gmail.com writes:
On Tue, Apr 02, 2013 at 07:47:24PM +0800, Wenchao Xia wrote:
diff --git a/qmp-commands.hx b/qmp-commands.hx
index 6b20684..b856be7
于 2013-4-11 0:49, Markus Armbruster 写道:
Wenchao Xia xiaw...@linux.vnet.ibm.com writes:
They are needed later in hmp command, dump_human_image_info()
is renamed to bdrv_image_info_dump().
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com
I'd be tempted move everything that needs
;
int total;
int *available_snapshots;
-char buf[256];
+GString *buf = NULL;
Useless initialization. But if you keep bdrv_snapshot_dump() printing,
it all goes away.
will remove.
--
Best Regards
Wenchao Xia
Regards
Wenchao Xia
于 2013-4-11 17:31, Markus Armbruster 写道:
Wenchao Xia xiaw...@linux.vnet.ibm.com writes:
于 2013-4-11 2:57, Luiz Capitulino 写道:
On Wed, 10 Apr 2013 18:17:04 +0200
Markus Armbruster arm...@redhat.com wrote:
Stefan Hajnoczi stefa...@gmail.com writes:
On Tue, Apr 02, 2013 at 07:47:24PM +0800
于 2013-4-11 20:05, Markus Armbruster 写道:
Wenchao Xia xiaw...@linux.vnet.ibm.com writes:
-void bdrv_image_info_dump(ImageInfo *info)
+void bdrv_image_info_dump(GString *buf, ImageInfo *info)
{
char size_buf[128], dsize_buf[128];
if (!info-has_actual_size) {
@@ -370,43
于 2013-4-8 21:33, Stefan Hajnoczi 写道:
On Tue, Apr 02, 2013 at 07:47:24PM +0800, Wenchao Xia wrote:
diff --git a/qmp-commands.hx b/qmp-commands.hx
index 6b20684..b856be7 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -1703,6 +1703,47 @@ Each json-object contain the following
1001 - 1100 of 1818 matches
Mail list logo