name.
For sheepdog, it does nothing.
After this patch:
For qcow2, logic is the same by call it twice in caller.
For rbd, it always fails in delete with id, but still search for name
in second try, no change for user.
Some code for *errp is based on Pavel's patch.
Signed-off-by: Wenchao X
. The check can be also taken in
qcow2_snapshot_create(), but require it to return error reason.
For rbd, it have no ID, so have no impact.
For sheepdog, ID can't be determined in qemu, so still can't guarantee
that no more mess up for ID and name.
Signed-off-by: Wenchao Xia
---
block/
Signed-off-by: Wenchao Xia
---
tests/qemu-iotests/055 | 157
tests/qemu-iotests/055.out |5 ++
tests/qemu-iotests/group |1 +
3 files changed, 163 insertions(+), 0 deletions(-)
create mode 100755 tests/qemu-iotests/055
create mode
probably
follow the same pattern, so allow .commit() to be NULL.
Suggested-by: Eric Blake
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Eric Blake
Reviewed-by: Wenchao Xia
Signed-off-by: Wenchao Xia
---
blockdev.c |6 --
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git
This interface can generate snapshot name automatically if it is not
specified, since it is a single opertion.
Snapshot ID can't be specified in this interface.
Signed-off-by: Wenchao Xia
---
blockdev.c | 25 +
qapi-schema.json |
drop an empty line between bdrv_open() and checking its return
value. This may be due to copy-pasting from earlier code that performed
other operations before handling errors.
Reported-by: Kevin Wolf
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Eric Blake
Reviewed-by: Wenchao Xia
Signed-off-by
12: better error message.
08/12: better document and spell fix.
10/12, 11/12: rename the command and related function to
snapshot_blkdev_internal.
Stefan Hajnoczi (3):
1 blockdev: drop redundant proto_drv check
2 blockdev: rename BlkTransactionStates to singular
3 blockdev: allow BdrvActio
于 2013-6-13 14:33, Fam Zheng 写道:
On Thu, 06/13 14:07, Wenchao Xia wrote:
于 2013-6-13 14:03, Wenchao Xia 写道:
于 2013-6-7 15:18, Stefan Hajnoczi 写道:
On Thu, Jun 06, 2013 at 04:56:49PM +0800, Fam Zheng wrote:
On Thu, 06/06 10:05, Stefan Hajnoczi wrote:
On Thu, Jun 06, 2013 at 11:56:18AM +0800
于 2013-6-13 14:03, Wenchao Xia 写道:
于 2013-6-7 15:18, Stefan Hajnoczi 写道:
On Thu, Jun 06, 2013 at 04:56:49PM +0800, Fam Zheng wrote:
On Thu, 06/06 10:05, Stefan Hajnoczi wrote:
On Thu, Jun 06, 2013 at 11:56:18AM +0800, Fam Zheng wrote:
On Thu, 05/30 14:34, Stefan Hajnoczi wrote:
+
+static
hink adding that in qemu emulator helps much, and it will make things
more complicit user won't care who is doing the job, qemu or
qemu-img.
--
Best Regards
Wenchao Xia
于 2013-6-11 17:25, Stefan Hajnoczi 写道:
On Sat, Jun 08, 2013 at 02:58:02PM +0800, Wenchao Xia wrote:
static int find_snapshot_by_id_or_name(BlockDriverState *bs, const char *name)
I suggest renaming the argument to make it less confusing: const char
*name_or_id
will rename it
于 2013-6-11 17:14, Stefan Hajnoczi 写道:
On Sat, Jun 08, 2013 at 02:58:01PM +0800, Wenchao Xia wrote:
+/*
+ * Every internal snapshot have an ID used by qemu block layer, this function
+ * check whether name used by user mess up with ID. An empty string is also
+ * invalid.
+ */
+bool
于 2013-6-11 16:26, Stefan Hajnoczi 写道:
On Sat, Jun 08, 2013 at 02:58:00PM +0800, Wenchao Xia wrote:
+if (id && name) {
+for (i = 0; i < nb_sns; i++) {
+sn = &sn_tab[i];
+if (!strcmp(sn->id_str, id) && !strcmp(sn->name, name)) {
+
memset. If incoming page is
zero, then if on destination it is not zero, memset. Logic is OK.
Only question is if the read operation in is_zero_page() consumes
memory, as there are doubt in the discuss before.
Any way this patch will not break migration in my opinion.
Reviewed-by: Wenchao Xia
clear patch, I don't see any issue.
Reviewed-by: Wenchao Xia
> Not sending zero pages breaks migration if a page is zero
> at the source but not at the destination. This can e.g. happen
> if different BIOS versions are used at source and destination.
> It has also been report
#x27;s copy-on-write, not copy-on-read :) we can just
check for pages that are zero and not rewrite them with zeros. That's
I think it is the right way to improve overcommit without breaking
anything.
what Peter's patches do, I'll review them right away.
Paolo
--
Best Regards
Wenchao Xia
于 2013-6-9 11:09, Alexey Kardashevskiy 写道:
On 06/09/2013 01:01 PM, Wenchao Xia wrote:
于 2013-6-9 10:34, Alexey Kardashevskiy 写道:
On 06/09/2013 12:16 PM, Wenchao Xia wrote:
于 2013-6-8 16:30, Alexey Kardashevskiy 写道:
On 06/08/2013 06:27 PM, Wenchao Xia wrote:
On 04.06.2013 16:40, Paolo
于 2013-6-9 10:34, Alexey Kardashevskiy 写道:
On 06/09/2013 12:16 PM, Wenchao Xia wrote:
于 2013-6-8 16:30, Alexey Kardashevskiy 写道:
On 06/08/2013 06:27 PM, Wenchao Xia wrote:
On 04.06.2013 16:40, Paolo Bonzini wrote:
Il 04/06/2013 16:38, Peter Lieven ha scritto:
On 04.06.2013 16:14, Paolo
于 2013-6-8 16:21, Fam Zheng 写道:
On Sat, 06/08 14:58, Wenchao Xia wrote:
Signed-off-by: Wenchao Xia
---
hmp-commands.hx | 24 ++--
hmp.c | 10 ++
hmp.h |1 +
3 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/hmp
于 2013-6-8 16:35, Fam Zheng 写道:
On Sat, 06/08 15:58, Wenchao Xia wrote:
于 2013-6-8 15:31, Fam Zheng 写道:
On Sat, 06/08 14:58, Wenchao Xia wrote:
To make it clear about id and name in searching, add this API
to distinguish them. Caller can choose to search by id or name,
*errp will be set only
于 2013-6-8 16:05, Fam Zheng 写道:
On Sat, 06/08 14:58, Wenchao Xia wrote:
This interface can generate snapshot name automatically if it is not
specified, since it is a single opertion.
Snapshot ID can't be specified in this interface.
Signed-off-by: Wenchao Xia
---
blockdev.c |
于 2013-6-8 16:30, Alexey Kardashevskiy 写道:
On 06/08/2013 06:27 PM, Wenchao Xia wrote:
On 04.06.2013 16:40, Paolo Bonzini wrote:
Il 04/06/2013 16:38, Peter Lieven ha scritto:
On 04.06.2013 16:14, Paolo Bonzini wrote:
Il 04/06/2013 15:52, Peter Lieven ha scritto:
On 30.05.2013 16:41, Paolo
rusage( RUSAGE_SELF, &rusage );
printf("read offset: %d kB, RSS size: %ld kB", ((i+1) << 10),
rusage.ru_maxrss);
getchar();
}
printf("%d zero pages\n", ret);
}
--
Best Regards
Wenchao Xia
s not available immediately.
You could also scan the page for nonzero values before writing it.
Paolo
--
Best Regards
Wenchao Xia
于 2013-6-8 15:31, Fam Zheng 写道:
On Sat, 06/08 14:58, Wenchao Xia wrote:
To make it clear about id and name in searching, add this API
to distinguish them. Caller can choose to search by id or name,
*errp will be set only for exception.
Some code are modified based on Pavel's patch.
Signe
nfusing to call the single structure "States". This patch
renames it to "State", just like BlockDriverState is singular.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Wenchao Xia
---
blockdev.c | 104 ++--
1 files
Signed-off-by: Wenchao Xia
---
hmp-commands.hx | 24 ++--
hmp.c | 10 ++
hmp.h |1 +
3 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/hmp-commands.hx b/hmp-commands.hx
index 396691a..65fb94d 100644
--- a/hmp-commands.hx
+++ b
name.
For sheepdog, it does nothing.
After this patch:
For qcow2, logic is the same by call it twice in caller.
For rbd, it always fails in delete with id, but still search for name
in second try, no change for user.
Some code for *errp is based on Pavel's patch.
Signed-off-by: Wenchao X
This interface can generate snapshot name automatically if it is not
specified, since it is a single opertion.
Snapshot ID can't be specified in this interface.
Signed-off-by: Wenchao Xia
---
blockdev.c | 25 +
qapi-schema.json | 21 +
Signed-off-by: Wenchao Xia
---
hmp-commands.hx | 19 +++
hmp.c | 10 ++
hmp.h |1 +
3 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/hmp-commands.hx b/hmp-commands.hx
index 65fb94d..9d9229c 100644
--- a/hmp-commands.hx
+++ b/hmp
To make it clear about id and name in searching, add this API
to distinguish them. Caller can choose to search by id or name,
*errp will be set only for exception.
Some code are modified based on Pavel's patch.
Signed-off-by: Wenchao Xia
Signed-off-by: Pavel Hrdina
---
block/snaps
probably
follow the same pattern, so allow .commit() to be NULL.
Suggested-by: Eric Blake
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Eric Blake
Reviewed-by: Wenchao Xia
---
blockdev.c |6 --
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/blockdev.c b/blockdev.c
inde
ed in this interface.
Signed-off-by: Wenchao Xia
---
blockdev.c | 118 ++
qapi-schema.json | 16 +++
qmp-commands.hx | 32 +++---
3 files changed, 159 insertions(+), 7 deletions(-)
diff --git a/blockdev.c b/blockdev.c
Snapshot ID can't be specified in this interface.
Signed-off-by: Wenchao Xia
---
blockdev.c | 12
qapi-schema.json | 19 +++
qmp-commands.hx | 30 ++
3 files changed, 61 insertions(+), 0 deletions(-)
diff --git a/block
. The check can be also taken in
qcow2_snapshot_create(), but require it to return error reason.
For rbd, it have no ID, so have no impact.
For sheepdog, ID can't be determined in qemu, so still can't guarantee
that no more mess up for ID and name.
Signed-off-by: Wenchao Xia
---
block/
_drv check
2 blockdev: rename BlkTransactionStates to singular
3 blockdev: allow BdrvActionOps->commit() to be NULL
Wenchao Xia (8):
4 snapshot: new function bdrv_snapshot_find_by_id_and_name()
5 snapshot: add paired functions for internal snapshot id and name
6 snapshot: distinguish id a
drop an empty line between bdrv_open() and checking its return
value. This may be due to copy-pasting from earlier code that performed
other operations before handling errors.
Reported-by: Kevin Wolf
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Eric Blake
Reviewed-by: Wenchao Xia
I insist to remove compile warning since I want gcc check my code with
strict rule.
Wenchao Xia writes:
This patch simply remove "variable may be used uninitialized" warning.
Signed-off-by: Wenchao Xia
---
V2: Address Stefan and Peter's comments, use 0 in send_msg() instea
This patch simply remove "variable may be used uninitialized" warning.
Signed-off-by: Wenchao Xia
---
V2: Address Stefan and Peter's comments, use 0 in send_msg() instead of
initialize mhHeader.
libcacard/vscclient.c |3 +--
util/iov.c|2 +-
2 files change
于 2013-6-6 14:42, Fam Zheng 写道:
On Thu, 06/06 12:27, Wenchao Xia wrote:
This series lets qmp interface show delaied info, including internal snapshot
Typo? s/delaied/detailed/
yep, it should be detailed, mistype.
/backing chain on all block device at runtime, which helps management
42 +-
> include/qemu/notify.h | 25
> qapi-schema.json | 97 -
> qmp-commands.hx| 46 ++
> tests/qemu-iotests/055 | 256 ++++++++++++
> tests/qemu-iotests/055.out | 5 +
> tests/qemu-iotests/group | 1 +
> util/notify.c | 30
> 12 files changed, 1088 insertions(+), 81 deletions(-)
> create mode 100644 block/backup.c
> create mode 100755 tests/qemu-iotests/055
> create mode 100644 tests/qemu-iotests/055.out
>
Reviewed patch 4, 7, 8 and they seems good, will use them in my
following work.
--
Best Regards
Wenchao Xia
NULL, flags | BDRV_O_NO_BACKING,
> drv);
> -
> if (ret < 0) {
> bdrv_delete(target_bs);
> error_set(errp, QERR_OPEN_FILE_FAILED, target);
>
Although it is not merged yet, I'll use it as pre-patches in my
series which add internal snapshot support in qmp_transaction.
Reviewed-by: Wenchao Xia
--
Best Regards
Wenchao Xia
With these parameters, user can choose the information to be showed,
to avoid message flood in the monitor.
Signed-off-by: Wenchao Xia
---
hmp.c | 25 -
monitor.c |7 ---
2 files changed, 20 insertions(+), 12 deletions(-)
diff --git a/hmp.c b/hmp.c
index
: Wenchao Xia
---
block/qapi.c | 50 ++--
include/block/qapi.h |4 ++-
qapi-schema.json | 10 ++-
qmp-commands.hx | 69 -
4 files changed, 125 insertions(+), 8 deletions(-)
diff --git a
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
Reviewed-by: Eric
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
---
block/qapi.c | 43
rule that use qmp to retrieve information,
hmp layer just does a translation from qmp object it got. To make code
graceful, snapshot and image info retrieving code in qemu and qemu-img are
merged into block layer, and some function names were adjusted to describe
them better. For the part touched
Now human monitor can show image details, include internal
snapshot and backing chain info for every block device.
Signed-off-by: Wenchao Xia
---
hmp.c | 14 ++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/hmp.c b/hmp.c
index 4fb76ec..2aa832c 100644
--- a/hmp.c
This patch simply remove "variable may be used uninitialized" warning.
Signed-off-by: Wenchao Xia
---
libcacard/vscclient.c |2 +-
util/iov.c|2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c
ind
于 2013-6-3 11:14, Wenchao Xia 写道:
>This series lets qmp interface show delaied info, including internal
> snapshot
> /backing chain on all block device at runtime, which helps management stack
> and
> human user, by retrieving exactly the same info of what qemu see
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
---
block/qapi.c | 43
With these parameters, user can choose the information to be showed,
to avoid message flood in the monitor.
Signed-off-by: Wenchao Xia
Reviewed-by: Kevin Wolf
---
hmp.c | 25 -
monitor.c |7 ---
2 files changed, 20 insertions(+), 12 deletions(-)
diff
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
---
block/qapi.c | 43
Now human monitor can show image details, include internal
snapshot and backing chain info for every block device.
Signed-off-by: Wenchao Xia
---
hmp.c | 14 ++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/hmp.c b/hmp.c
index 4fb76ec..2aa832c 100644
--- a/hmp.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
Reviewed-by: Eric
New member *backing-image is added to reflect the backing chain
status.
Signed-off-by: Wenchao Xia
---
block/qapi.c |7 +++
qapi-schema.json |5 -
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/block/qapi.c b/block/qapi.c
index e9d8b74..a407c3d 100644
--- a
rule that use qmp to retrieve information,
hmp layer just does a translation from qmp object it got. To make code
graceful, snapshot and image info retrieving code in qemu and qemu-img are
merged into block layer, and some function names were adjusted to describe
them better. For the par
于 2013-5-31 21:19, Luiz Capitulino 写道:
On Fri, 31 May 2013 21:04:10 +0800
Wenchao Xia wrote:
于 2013-5-30 10:41, Wenchao Xia 写道:
于 2013-5-27 23:41, Kevin Wolf 写道:
Am 25.05.2013 um 05:09 hat Wenchao Xia geschrieben:
These patches are the common part of my hmp/qmp block query series
and
于 2013-5-30 10:41, Wenchao Xia 写道:
于 2013-5-27 23:41, Kevin Wolf 写道:
Am 25.05.2013 um 05:09 hat Wenchao Xia geschrieben:
These patches are the common part of my hmp/qmp block query series
and Pavel's
qmp snapshot command converion series. It mainly does following things:
1 move sna
于 2013-5-27 23:41, Kevin Wolf 写道:
Am 25.05.2013 um 05:09 hat Wenchao Xia geschrieben:
These patches are the common part of my hmp/qmp block query series and Pavel's
qmp snapshot command converion series. It mainly does following things:
1 move snapshot related code to block/snapshot.c, qm
于 2013-5-29 23:10, Badari Pulavarty 写道:
> On 05/29/2013 02:05 AM, Wenchao Xia wrote:
>> 于 2013-5-28 17:00, Wenchao Xia 写道:
>>> 于 2013-5-28 16:33, Asias He 写道:
>>>> On Tue, May 28, 2013 at 10:01:14AM +0200, Paolo Bonzini wrote:
>>>>> Il 28/05/2013
于 2013-5-29 17:09, Stefan Hajnoczi 写道:
On Wed, May 29, 2013 at 03:54:46PM +0800, Wenchao Xia wrote:
于 2013-5-28 15:46, Stefan Hajnoczi 写道:
On Mon, May 27, 2013 at 05:25:16PM +0200, Kevin Wolf wrote:
Am 25.05.2013 um 05:09 hat Wenchao Xia geschrieben:
From: Stefan Hajnoczi
The bs_snapshots
于 2013-5-28 17:00, Wenchao Xia 写道:
于 2013-5-28 16:33, Asias He 写道:
On Tue, May 28, 2013 at 10:01:14AM +0200, Paolo Bonzini wrote:
Il 28/05/2013 09:13, Wenchao Xia ha scritto:
From: Nicholas Bellinger
The WWPN specified in configfs is passed to "-device vhost-scsi-pci".
The tgpt fi
于 2013-5-28 15:46, Stefan Hajnoczi 写道:
On Mon, May 27, 2013 at 05:25:16PM +0200, Kevin Wolf wrote:
Am 25.05.2013 um 05:09 hat Wenchao Xia geschrieben:
From: Stefan Hajnoczi
The bs_snapshots global variable points to the BlockDriverState which
will be used to save vmstate. This is really a
于 2013-5-29 12:43, Wenchao Xia 写道:
于 2013-5-29 8:08, Kevin O'Connor 写道:
On Mon, May 27, 2013 at 05:11:46PM +0400, Michael Tokarev wrote:
27.05.2013 16:59, Kevin O'Connor wrote:
A new stable release of SeaBIOS (version 1.7.2.2) has been tagged.
This release contains bug fixes.
The
upplied the parameter -bios to replace bios.bin in qemu
command line, did I miss something?
--
Best Regards
Wenchao Xia
于 2013-5-28 16:33, Asias He 写道:
On Tue, May 28, 2013 at 10:01:14AM +0200, Paolo Bonzini wrote:
Il 28/05/2013 09:13, Wenchao Xia ha scritto:
From: Nicholas Bellinger
The WWPN specified in configfs is passed to "-device vhost-scsi-pci".
The tgpt field of the SET_ENDPOINT ioctl is ob
COPYING.LIB file in the top-level directory.
> + *
> + */
> +
> +#ifndef VHOST_SCSI_H
> +#define VHOST_SCSI_H
> +
> +#include "qemu-common.h"
> +#include "hw/qdev.h"
> +#include "hw/virtio/virtio-scsi.h"
> +#include "hw/virtio/vhost.h"
> +
> +/*
> + * Used by QEMU userspace to ensure a consistent vhost-scsi ABI.
> + *
> + * ABI Rev 0: July 2012 version starting point for v3.6-rc merge candidate +
> + *RFC-v2 vhost-scsi userspace. Add GET_ABI_VERSION ioctl usage
> + * ABI Rev 1: January 2013. Ignore vhost_tpgt filed in struct
> vhost_scsi_target.
> + * All the targets under vhost_wwpn can be seen and used by guest.
> + */
> +
> +#define VHOST_SCSI_ABI_VERSION 1
> +
> +/* TODO #include properly */
> +/* For VHOST_SCSI_SET_ENDPOINT/VHOST_SCSI_CLEAR_ENDPOINT ioctl */
> +struct vhost_scsi_target {
> +int abi_version;
> +char vhost_wwpn[224];
> +unsigned short vhost_tpgt;
> +unsigned short reserved;
> +};
> +
> +enum vhost_scsi_vq_list {
> +VHOST_SCSI_VQ_CONTROL = 0,
> +VHOST_SCSI_VQ_EVENT = 1,
> +VHOST_SCSI_VQ_NUM_FIXED = 2,
> +};
> +
> +#define VHOST_VIRTIO 0xAF
> +#define VHOST_SCSI_SET_ENDPOINT _IOW(VHOST_VIRTIO, 0x40, struct
> vhost_scsi_target)
> +#define VHOST_SCSI_CLEAR_ENDPOINT _IOW(VHOST_VIRTIO, 0x41, struct
> vhost_scsi_target)
> +#define VHOST_SCSI_GET_ABI_VERSION _IOW(VHOST_VIRTIO, 0x42, int)
> +
> +#define TYPE_VHOST_SCSI "vhost-scsi"
> +#define VHOST_SCSI(obj) \
> +OBJECT_CHECK(VHostSCSI, (obj), TYPE_VHOST_SCSI)
> +
> +typedef struct VHostSCSI {
> +VirtIOSCSICommon parent_obj;
> +
> +Error *migration_blocker;
> +
> +struct vhost_dev dev;
> +} VHostSCSI;
> +
> +#define DEFINE_VHOST_SCSI_PROPERTIES(_state, _conf_field) \
> +DEFINE_PROP_STRING("vhostfd", _state, _conf_field.vhostfd), \
> +DEFINE_PROP_STRING("wwpn", _state, _conf_field.wwpn), \
> +DEFINE_PROP_UINT32("num_queues", _state, _conf_field.num_queues, 1), \
> +DEFINE_PROP_UINT32("max_sectors", _state, _conf_field.max_sectors,
> 0x), \
> +DEFINE_PROP_UINT32("cmd_per_lun", _state, _conf_field.cmd_per_lun, 128)
> +
> +
> +#endif
> diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scsi.h
> index 4a961b9..4db346b 100644
> --- a/include/hw/virtio/virtio-scsi.h
> +++ b/include/hw/virtio/virtio-scsi.h
> @@ -151,6 +151,8 @@ struct VirtIOSCSIConf {
> uint32_t num_queues;
> uint32_t max_sectors;
> uint32_t cmd_per_lun;
> +char *vhostfd;
> +char *wwpn;
> };
>
> typedef struct VirtIOSCSICommon {
>
--
Best Regards
Wenchao Xia
于 2013-5-27 23:25, Kevin Wolf 写道:
Am 25.05.2013 um 05:09 hat Wenchao Xia geschrieben:
From: Stefan Hajnoczi
The bs_snapshots global variable points to the BlockDriverState which
will be used to save vmstate. This is really a savevm.c concept but was
moved into block.c:bdrv_snapshots() when
于 2013-5-27 23:18, Kevin Wolf 写道:
Am 25.05.2013 um 05:09 hat Wenchao Xia geschrieben:
From: Stefan Hajnoczi
The bs_snapshots global variable points to the BlockDriverState which
will be used to save vmstate. This is really a savevm.c concept but was
moved into block.c:bdrv_snapshots() when
于 2013-5-27 23:40, Kevin Wolf 写道:
Am 27.05.2013 um 17:02 hat Luiz Capitulino geschrieben:
On Sat, 25 May 2013 11:09:45 +0800
Wenchao Xia wrote:
bdrv_snapshot_dump() and bdrv_image_info_dump() do not dump to a buffer now,
some internal buffers are still used for format control, which have no
于 2013-5-26 0:10, Eric Blake 写道:
On 05/24/2013 10:24 PM, Wenchao Xia wrote:
New member *backing-image is added to reflect the backing chain
status.
Signed-off-by: Wenchao Xia
---
block/qapi.c | 16 +++-
qapi-schema.json |5 -
2 files changed, 19 insertions(+), 2
Now human monitor can show image details, include internal
snapshot and backing chain info for every block device.
Signed-off-by: Wenchao Xia
---
hmp.c | 14 ++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/hmp.c b/hmp.c
index 4fb76ec..2aa832c 100644
--- a/hmp.c
New member *backing-image is added to reflect the backing chain
status.
Signed-off-by: Wenchao Xia
---
block/qapi.c | 16 +++-
qapi-schema.json |5 -
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/block/qapi.c b/block/qapi.c
index 680ec23..cbef584
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
---
block/qapi.c | 43
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
---
block/qapi.c | 36
With these parameters, user can choose the information to be showed,
to avoid message flood in the monitor.
Signed-off-by: Wenchao Xia
Reviewed-by: Kevin Wolf
---
hmp.c | 25 -
monitor.c |7 ---
2 files changed, 20 insertions(+), 12 deletions(-)
diff
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
Reviewed-by: Eric
erial, it works as:
qemu qemu-img
dump_monitordump_stdout
|--|
|
block/qapi.c
Special thanks for Markus, Stefan, Kevin, Eric reviewing many times.
v13:
Renamed the serial as "enhancement for qmp/hmp interfaces of block info".
parameter specified.
Signed-off-by: Wenchao Xia
---
block/qapi.c | 66 +++--
include/block/qapi.h |6 +++-
qemu-img.c |9 ---
savevm.c |7 +++--
4 files changed, 49 insertions(+), 39 deletions(-)
diff
-off-by: Wenchao Xia
---
block.c | 100 -
block/Makefile.objs |1 +
block/snapshot.c | 157 ++
include/block/block.h| 26 ++--
include/block/snapshot.h | 53
e level in
include path, block_int.h and qapi.h will both include them.
Signed-off-by: Wenchao Xia
Reviewed-by: Eric Blake
---
block.c | 185 ---
block/Makefile.objs |2 +-
block/qapi.c | 360
ed 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
Reviewed-by: Eric Blake
Reviewed-by: Wenchao Xia
Signed-off-by: Wenchao Xia
---
bl
t, instead of use
global variable "cur_mon" inside.
v3:
Address Stefan's comments:
2/4: do not move bdrv_is_snapshot().
4/4: reuse fprintf_function function pointer instead of a new function.
Stefan Hajnoczi (1):
1 block: drop bs_snapshots global variable
Wenchao Xia (3):
于 2013-5-24 9:48, Wenchao Xia 写道:
于 2013-5-23 23:31, Eric Blake 写道:
On 05/23/2013 02:47 AM, Wenchao Xia wrote:
Buffer is not used now so the string would not be truncated any more.
They can be used
by both qemu and qemu-img with correct parameter specified.
Signed-off-by: Wenchao Xia
于 2013-5-23 23:31, Eric Blake 写道:
On 05/23/2013 02:47 AM, Wenchao Xia wrote:
Buffer is not used now so the string would not be truncated any more. They can
be used
by both qemu and qemu-img with correct parameter specified.
Signed-off-by: Wenchao Xia
---
block/qapi.c | 65
于 2013-5-23 23:05, Eric Blake 写道:
On 05/23/2013 02:47 AM, Wenchao Xia wrote:
This function takes an input parameter *output, which can be specified by
caller as stderr, stdout or a monitor. error_vprintf() now calls
message_vprintf(),
which is a static function added in this patch.
Signed-off
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
Reviewed-by: Eric Blake
---
block.c | 105
ed 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
Reviewed-by: Eric Blake
Reviewed-by: Wenchao Xia
Signed-off-by: Wenchao Xia
---
bl
Buffer is not used now so the string would not be truncated any more. They can
be used
by both qemu and qemu-img with correct parameter specified.
Signed-off-by: Wenchao Xia
---
block/qapi.c | 65 +++---
include/block/qapi.h |5
This function takes an input parameter *output, which can be specified by
caller as stderr, stdout or a monitor. error_vprintf() now calls
message_vprintf(),
which is a static function added in this patch.
Signed-off-by: Wenchao Xia
---
include/qemu/error-report.h | 13 +
util
array 'bdrv_states'.
4 code style fix.
To avoid conflict and tip better, macro in header file is BLOCK_QAPI_H
instead of QAPI_H. 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
Reviewed-by:
7;s serial.
Use a parameter in message_printf() to tell where to print, instead of use
global variable "cur_mon" inside.
Wenchao Xia (4):
2 block: move snapshot code in block.c to block/snapshot.c
3 block: move qmp and info dump related code to block/qapi.c
4 util: add new function
于 2013-5-20 10:39, Wenchao Xia 写道:
> 于 2013-5-17 20:30, Luiz Capitulino 写道:
>> On Fri, 17 May 2013 11:30:31 +0800
>> Wenchao Xia wrote:
>>
>>> 于 2013-5-16 20:17, Luiz Capitulino 写道:
>>>> On Thu, 16 May 2013 10:22:09 +0800
>>>> Wenchao Xia w
于 2013-5-17 17:14, Stefan Hajnoczi 写道:
On Fri, May 17, 2013 at 02:58:57PM +0800, Wenchao Xia wrote:
于 2013-5-16 15:47, Stefan Hajnoczi 写道:
On Thu, May 16, 2013 at 02:16:20PM +0800, Wenchao Xia wrote:
After checking the code, I found it possible to add delta data backup
support also, If an
于 2013-5-17 20:30, Luiz Capitulino 写道:
On Fri, 17 May 2013 11:30:31 +0800
Wenchao Xia wrote:
于 2013-5-16 20:17, Luiz Capitulino 写道:
On Thu, 16 May 2013 10:22:09 +0800
Wenchao Xia wrote:
于 2013-5-15 20:28, Luiz Capitulino 写道:
On Wed, 15 May 2013 10:10:37 +0800
Wenchao Xia wrote:
于 2013
于 2013-5-17 17:27, Stefan Hajnoczi 写道:
On Fri, May 17, 2013 at 03:56:45PM +0800, Wenchao Xia wrote:
Signed-off-by: Wenchao Xia
---
block/qcow2-snapshot.c | 17 ++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c
Signed-off-by: Wenchao Xia
---
block/qcow2-snapshot.c | 17 ++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c
index 45da32d..033f705 100644
--- a/block/qcow2-snapshot.c
+++ b/block/qcow2-snapshot.c
@@ -367,7 +367,7
Signed-off-by: Wenchao Xia
---
block/qcow2-snapshot.c | 10 ++
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c
index 992a5c8..45da32d 100644
--- a/block/qcow2-snapshot.c
+++ b/block/qcow2-snapshot.c
@@ -180,13 +180,13
V2:
1/2: all fail case will goto fail section.
2/2: add the goto code.
Wenchao Xia (2):
1 qcow2: free allocated cluster on fail in qcow2_write_snapshots()
2 qcow2: cancel the modification on fail in qcow2_snapshot_create()
block/qcow2-snapshot.c | 27 ---
1
901 - 1000 of 1825 matches
Mail list logo