[Qemu-devel] [PATCH V5 1/4] block: create bdrv_get_backing_file_depth()

2012-07-26 Thread benoit . canet
From: Benoît Canet Create bdrv_get_backing_file_depth() in order to be able to show in QMP and HMP how many ancestors backing an image a block device have. Signed-off-by: Benoit Canet --- block.c | 13 + block.h |1 + 2 files changed, 14 insertions(+) diff --git a/block.c b

[Qemu-devel] [PATCH V5 2/4] block: Use bdrv_get_backing_file_depth()

2012-07-26 Thread benoit . canet
From: Benoît Canet Use the dedicated counting function in qmp_query_block in order to propagate the backing file depth to HMP. Signed-off-by: Benoit Canet --- block.c |3 +++ qapi-schema.json |9 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/block.c

[Qemu-devel] [PATCH V5 0/4] Show backing file depth in HMP and QMP

2012-07-26 Thread benoit . canet
From: Benoît Canet In some setups many backing files and snapshot are chained. This lead to the formation of huge trees of snapshots all depending on a common ancestor. Hence if something bad happen to this common ancestor all the snapshot of the tree will be broken. This patch add an easy way

[Qemu-devel] [PATCH V5 4/4] hmp: show the backing file depth

2012-07-26 Thread benoit . canet
From: Benoît Canet Signed-off-by: Benoit Canet --- hmp.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/hmp.c b/hmp.c index 6b72a64..25688ab 100644 --- a/hmp.c +++ b/hmp.c @@ -227,6 +227,8 @@ void hmp_info_block(Monitor *mon) if (info->value->inserted->has_bac

[Qemu-devel] [PATCH V5 3/4] qmp: Add backing-file-depth to qmp-commands.hx

2012-07-26 Thread benoit . canet
From: Benoît Canet Signed-off-by: Benoit Canet --- qmp-commands.hx |2 ++ 1 file changed, 2 insertions(+) diff --git a/qmp-commands.hx b/qmp-commands.hx index e3cf3c5..5de3adf 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -1317,6 +1317,7 @@ Each json-object contain the following

[Qemu-devel] [PATCH V4 2/3] block: Use bdrv_get_backing_file_depth()

2012-07-26 Thread benoit . canet
From: Benoît Canet Use the dedicated counting function in qmp_query_block in order to propagate the backing file depth to HMP. Signed-off-by: Benoit Canet --- block.c |3 +++ qapi-schema.json |9 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/block.c

[Qemu-devel] [PATCH V4 3/3] hmp: show the backing file depth

2012-07-26 Thread benoit . canet
From: Benoît Canet Signed-off-by: Benoit Canet --- hmp.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/hmp.c b/hmp.c index 6b72a64..25688ab 100644 --- a/hmp.c +++ b/hmp.c @@ -227,6 +227,8 @@ void hmp_info_block(Monitor *mon) if (info->value->inserted->has_bac

[Qemu-devel] [PATCH V4 1/3] block: create bdrv_get_backing_file_depth()

2012-07-26 Thread benoit . canet
From: Benoît Canet Create bdrv_get_backing_file_depth() in order to be able to show in QMP and HMP how many ancestors backing an image a block device have. Signed-off-by: Benoit Canet --- block.c | 13 + block.h |1 + 2 files changed, 14 insertions(+) diff --git a/block.c b

[Qemu-devel] [PATCH V4 0/3] Show backing file depth in HMP

2012-07-26 Thread benoit . canet
From: Benoît Canet In some setups many backing files and snapshot are chained. This lead to the formation of huge trees of snapshots all depending on a common ancestor. Hence if something bad happen to this common ancestor all the snapshot of the tree will be broken. This patch add an easy way

[Qemu-devel] [PATCH V3 3/3] hmp: show the backing file ancestors count

2012-07-25 Thread benoit . canet
From: Benoît Canet Signed-off-by: Benoit Canet --- hmp.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/hmp.c b/hmp.c index 6b72a64..19dcb65 100644 --- a/hmp.c +++ b/hmp.c @@ -227,6 +227,8 @@ void hmp_info_block(Monitor *mon) if (info->value->inserted->has_bac

[Qemu-devel] [PATCH V3 1/3] block: create bdrv_get_backing_file_ancestors_count()

2012-07-25 Thread benoit . canet
From: Benoît Canet Create bdrv_get_backing_file_ancestors_count() in order to be able to show in QMP and HMP how many ancestors backing an image a block device have. Signed-off-by: Benoit Canet --- block.c | 13 + block.h |1 + 2 files changed, 14 insertions(+) diff --git a

[Qemu-devel] [PATCH V3 2/3] block: Use bdrv_get_backing_file_ancestors_count()

2012-07-25 Thread benoit . canet
From: Benoît Canet Use the dedicated counting function in qmp_query_block in order to propagate the backing file count to HMP. Signed-off-by: Benoit Canet --- block.c |3 +++ qapi-schema.json |9 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/block.c

[Qemu-devel] [PATCH V3 0/3] Show backing file ancestors count in HMP

2012-07-25 Thread benoit . canet
From: Benoît Canet In some setups many backing files and snapshot are chained. This lead to the formation of huge trees of snapshots all depending on a common ancestor. Hence if something bad happen to this common ancestor all the snapshot of the tree will be broken. This patch add an easy way

[Qemu-devel] [PATCH V2 3/3] hmp: show the backing file ancestors count

2012-07-25 Thread benoit . canet
From: Benoît Canet Signed-off-by: Benoit Canet --- hmp.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/hmp.c b/hmp.c index 6b72a64..19dcb65 100644 --- a/hmp.c +++ b/hmp.c @@ -227,6 +227,8 @@ void hmp_info_block(Monitor *mon) if (info->value->inserted->has_bac

[Qemu-devel] [PATCH V2 1/3] block: create bdrv_get_backing_file_ancestors_count()

2012-07-25 Thread benoit . canet
From: Benoît Canet Create bdrv_get_backing_file_ancestors_count() in order to be able to show in QMP and HMP how many ancestors backing an image a block device have. Signed-off-by: Benoit Canet --- block.c | 13 + block.h |1 + 2 files changed, 14 insertions(+) diff --git a

[Qemu-devel] [PATCH V2 0/3] Show backing file ancestors count in HMP

2012-07-25 Thread benoit . canet
From: Benoît Canet In some setups many backing files and snapshot are chained. This lead to the formation of huge trees of snapshots all depending on a common ancestor. Hence if something bad happen to this common ancestor all the snapshot of the tree will be broken. This patch add an easy way

[Qemu-devel] [PATCH V2 2/3] block: Use bdrv_get_backing_file_ancestors_count()

2012-07-25 Thread benoit . canet
From: Benoît Canet Use the dedicated counting function in qmp_query_block in order to propagate the backing file count to HMP. Signed-off-by: Benoit Canet --- block.c |2 ++ qapi-schema.json |9 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/block.c

[Qemu-devel] [PATCH 1/3] block: create bdrv_get_file_ancestors_count()

2012-07-23 Thread benoit . canet
From: Benoît Canet Create bdrv_get_file_ancestors_count() in order to be able to show in QMP and HMP how many ancestors backing an image a block device have. Signed-off-by: Benoit Canet --- block.c | 13 + block.h |1 + 2 files changed, 14 insertions(+) diff --git a/block.c

[Qemu-devel] [PATCH 3/3] hmp: show the files ancestors count

2012-07-23 Thread benoit . canet
From: Benoît Canet Signed-off-by: Benoit Canet --- hmp.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/hmp.c b/hmp.c index 6b72a64..025c59f 100644 --- a/hmp.c +++ b/hmp.c @@ -227,6 +227,8 @@ void hmp_info_block(Monitor *mon) if (info->value->inserted->has_bac

[Qemu-devel] [PATCH 0/3] Show files ancestors count in HMP

2012-07-23 Thread benoit . canet
From: Benoît Canet In some setups many backing files and snapshot are chained. This lead to the formation of huge trees of snapshots all depending on a common ancestor. Hence if something bad happen to this common ancestor all the snapshot of the tree will be broken. This patch add an easy way

[Qemu-devel] [PATCH 2/3] block: Use file_ancestors_count() in qmp_query_block

2012-07-23 Thread benoit . canet
From: Benoît Canet Use the dedicated counting function in qmp_query_block in order to propagate the backing file count to HMP. Signed-off-by: Benoit Canet --- block.c |2 ++ qapi-schema.json |9 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/block.c

[Qemu-devel] [PATCH V4 3/3] migration: block migration when any of the block device is busy

2012-07-23 Thread benoit . canet
From: Benoît Canet Signed-off-by: Benoit Canet --- migration.c |5 + 1 file changed, 5 insertions(+) diff --git a/migration.c b/migration.c index 8db1b43..3d68996 100644 --- a/migration.c +++ b/migration.c @@ -425,6 +425,11 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk

[Qemu-devel] [PATCH V4 0/3] Block migration if any of the block device is busy

2012-07-23 Thread benoit . canet
From: Benoît Canet This patchset is designed to avoid starting a live migration while any of the block device is busy. Tested with the following sequence: QEMU 1.1.50 monitor - type 'help' for more information (qemu) block_stream virtio0 1k (qemu) migrate tcp:localhost: migrate: Migration i

[Qemu-devel] [PATCH V4 2/3] qerror: Add error telling that block dev usage prevents migration

2012-07-23 Thread benoit . canet
From: Benoît Canet Signed-off-by: Benoit Canet --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+) diff --git a/qerror.c b/qerror.c index 92c4eff..d2e76ca 100644 --- a/qerror.c +++ b/qerror.c @@ -283,6 +283,10 @@ static const QErrorStringTable qerror_table

[Qemu-devel] [PATCH V4 1/3] block: Add bdrv_are_busy()

2012-07-23 Thread benoit . canet
From: Benoît Canet bdrv_are_busy will be used to check if any of the bs are in use or if one of them have a running block job. The first user will be qmp_migrate(). Signed-off-by: Benoit Canet --- block.c | 13 + block.h |2 ++ 2 files changed, 15 insertions(+) diff --git

[Qemu-devel] [PATCH V3 0/3] Block migration when streaming block jobs are running

2012-07-23 Thread benoit . canet
From: Benoît Canet This patchset is designed to avoid starting a live migration while one or more streaming block jobs are running. Tested with the following sequence: QEMU 1.1.50 monitor - type 'help' for more information (qemu) block_stream virtio0 1k (qemu) migrate tcp:localhost: migrate

[Qemu-devel] [PATCH V3 1/3] block: Add bdrv_are_busy()

2012-07-23 Thread benoit . canet
From: Benoît Canet bdrv_are_busy will be used to check if any of the bs are in use or if one of them have a running block job. The first user will be qmp_migrate(). Signed-off-by: Benoit Canet --- block.c | 13 + block.h |2 ++ 2 files changed, 15 insertions(+) diff --git

[Qemu-devel] [PATCH V3 3/3] migration: block migration when streaming block jobs are running.

2012-07-23 Thread benoit . canet
From: Benoît Canet Signed-off-by: Benoit Canet --- migration.c |5 + 1 file changed, 5 insertions(+) diff --git a/migration.c b/migration.c index 8db1b43..4ffdcf2 100644 --- a/migration.c +++ b/migration.c @@ -425,6 +425,11 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk

[Qemu-devel] [PATCH V3 2/3] qerror: Add error telling that streaming blocks migration

2012-07-23 Thread benoit . canet
From: Benoît Canet Signed-off-by: Benoit Canet --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+) diff --git a/qerror.c b/qerror.c index 92c4eff..c7889fe 100644 --- a/qerror.c +++ b/qerror.c @@ -283,6 +283,10 @@ static const QErrorStringTable qerror_table

[Qemu-devel] [PATCH V2 3/3] migration: block migration when streaming block jobs are running.

2012-07-23 Thread benoit . canet
From: Benoît Canet Signed-off-by: Benoit Canet --- migration.c |5 + 1 file changed, 5 insertions(+) diff --git a/migration.c b/migration.c index 8db1b43..5196d7e 100644 --- a/migration.c +++ b/migration.c @@ -425,6 +425,11 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk

[Qemu-devel] [PATCH V2 1/3] block: Add bdrv_are_busy()

2012-07-23 Thread benoit . canet
From: Benoît Canet bdrv_are_busy will be used to check if any of the bs are in use or if one of them have a running block job. The first user will be qmp_migrate(). Signed-off-by: Benoit Canet --- block.c | 13 + block.h |2 ++ 2 files changed, 15 insertions(+) diff --git

[Qemu-devel] [PATCH V2 2/3] qerror: Add error telling that streaming blocks migration

2012-07-23 Thread benoit . canet
From: Benoît Canet Signed-off-by: Benoit Canet --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+) diff --git a/qerror.c b/qerror.c index 92c4eff..bcd74b7 100644 --- a/qerror.c +++ b/qerror.c @@ -283,6 +283,10 @@ static const QErrorStringTable qerror_table

[Qemu-devel] [PATCH V2 0/3] Block migration when streaming block jobs are running

2012-07-23 Thread benoit . canet
From: Benoît Canet This patchset is designed to avoid starting a live migration while one or more streaming block jobs are running. Tested with the following sequence: QEMU 1.1.50 monitor - type 'help' for more information (qemu) block_stream virtio0 1k (qemu) migrate tcp:localhost: migrate:

[Qemu-devel] [PATCH 3/3] migration: block migration when streaming block jobs are running.

2012-07-20 Thread benoit . canet
From: Benoît Canet Signed-off-by: Benoit Canet --- migration.c |5 + 1 file changed, 5 insertions(+) diff --git a/migration.c b/migration.c index 8db1b43..dfce680 100644 --- a/migration.c +++ b/migration.c @@ -425,6 +425,11 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk

[Qemu-devel] [PATCH 1/3] block: Add bdrv_have_block_jobs() so migration code abort if needed.

2012-07-20 Thread benoit . canet
From: Benoît Canet qmp_migrate() will be able to check if some block jobs are running using bdrv_have_block_jobs() and abort safely if needed. Signed-off-by: Benoit Canet --- block.c | 14 ++ block.h |2 ++ 2 files changed, 16 insertions(+) diff --git a/block.c b/block.c

[Qemu-devel] [PATCH 2/3] qerror: Add error telling that streaming blocks migration

2012-07-20 Thread benoit . canet
From: Benoît Canet Signed-off-by: Benoit Canet --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+) diff --git a/qerror.c b/qerror.c index 92c4eff..bcd74b7 100644 --- a/qerror.c +++ b/qerror.c @@ -283,6 +283,10 @@ static const QErrorStringTable qerror_table

[Qemu-devel] [PATCH 0/3] Block migration when streaming block jobs are running

2012-07-20 Thread benoit . canet
From: Benoît Canet This patchset is designed to avoid starting a live migration while one or more streaming block jobs are running. Tested with the following sequence: QEMU 1.1.50 monitor - type 'help' for more information (qemu) block_stream virtio0 1k (qemu) migrate tcp:localhost: migrate: