From 71aa98678c2b5616de5453d55e12f8ea810fbefb Mon Sep 17 00:00:00 2001 From: Alberto Garcia Date: Tue, 5 Jul 2016 17:28:57 +0300 Subject: mirror: Add 'job-id' parameter to 'blockdev-mirror' and 'drive-mirror' This patch adds a new optional 'job-id' parameter to 'blockdev-mirror' and 'drive-mirror', allowing the user to specify the ID of the block job to be created. The HMP 'drive_mirror' command remains unchanged. Signed-off-by: Alberto Garcia Reviewed-by: Kevin Wolf Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- qmp-commands.hx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'qmp-commands.hx') diff --git a/qmp-commands.hx b/qmp-commands.hx index 6937e83..6a2ec8f 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -1656,8 +1656,8 @@ EQMP { .name = "drive-mirror", - .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?," - "node-name:s?,replaces:s?," + .args_type = "job-id:s?,sync:s,device:B,target:s,speed:i?,mode:s?," + "format:s?,node-name:s?,replaces:s?," "on-source-error:s?,on-target-error:s?," "unmap:b?," "granularity:i?,buf-size:i?", @@ -1677,6 +1677,8 @@ of the source. Arguments: +- "job-id": Identifier for the newly-created block job. If omitted, + the device name will be used. (json-string, optional) - "device": device name to operate on (json-string) - "target": name of new image file (json-string) - "format": format of new image (json-string, optional) @@ -1720,7 +1722,7 @@ EQMP { .name = "blockdev-mirror", - .args_type = "sync:s,device:B,target:B,replaces:s?,speed:i?," + .args_type = "job-id:s?,sync:s,device:B,target:B,replaces:s?,speed:i?," "on-source-error:s?,on-target-error:s?," "granularity:i?,buf-size:i?", .mhandler.cmd_new = qmp_marshal_blockdev_mirror, @@ -1735,6 +1737,8 @@ specifies the target of mirror operation. Arguments: +- "job-id": Identifier for the newly-created block job. If omitted, + the device name will be used. (json-string, optional) - "device": device name to operate on (json-string) - "target": device name to mirror to (json-string) - "replaces": the block driver node name to replace when finished -- cgit v1.1 From 70559d499c84b9c7b1874821f970a15d52460d64 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Date: Tue, 5 Jul 2016 17:28:58 +0300 Subject: backup: Add 'job-id' parameter to 'blockdev-backup' and 'drive-backup' This patch adds a new optional 'job-id' parameter to 'blockdev-backup' and 'drive-backup', allowing the user to specify the ID of the block job to be created. The HMP 'drive_backup' command remains unchanged. Signed-off-by: Alberto Garcia Reviewed-by: Kevin Wolf Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- qmp-commands.hx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'qmp-commands.hx') diff --git a/qmp-commands.hx b/qmp-commands.hx index 6a2ec8f..a032089 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -1212,8 +1212,8 @@ EQMP { .name = "drive-backup", - .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?," - "bitmap:s?,on-source-error:s?,on-target-error:s?", + .args_type = "job-id:s?,sync:s,device:B,target:s,speed:i?,mode:s?," + "format:s?,bitmap:s?,on-source-error:s?,on-target-error:s?", .mhandler.cmd_new = qmp_marshal_drive_backup, }, @@ -1229,6 +1229,8 @@ block-job-cancel command. Arguments: +- "job-id": Identifier for the newly-created block job. If omitted, + the device name will be used. (json-string, optional) - "device": the name of the device which should be copied. (json-string) - "target": the target of the new image. If the file exists, or if it is a @@ -1266,7 +1268,7 @@ EQMP { .name = "blockdev-backup", - .args_type = "sync:s,device:B,target:B,speed:i?," + .args_type = "job-id:s?,sync:s,device:B,target:B,speed:i?," "on-source-error:s?,on-target-error:s?", .mhandler.cmd_new = qmp_marshal_blockdev_backup, }, @@ -1280,6 +1282,8 @@ as backup target. Arguments: +- "job-id": Identifier for the newly-created block job. If omitted, + the device name will be used. (json-string, optional) - "device": the name of the device which should be copied. (json-string) - "target": the name of the backup target device. (json-string) -- cgit v1.1 From 2323322ed060749b52864836f6fcb1a906baf95d Mon Sep 17 00:00:00 2001 From: Alberto Garcia Date: Tue, 5 Jul 2016 17:28:59 +0300 Subject: stream: Add 'job-id' parameter to 'block-stream' This patch adds a new optional 'job-id' parameter to 'block-stream', allowing the user to specify the ID of the block job to be created. The HMP 'block_stream' command remains unchanged. Signed-off-by: Alberto Garcia Reviewed-by: Kevin Wolf Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- qmp-commands.hx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'qmp-commands.hx') diff --git a/qmp-commands.hx b/qmp-commands.hx index a032089..d61ea20 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -1106,7 +1106,7 @@ EQMP { .name = "block-stream", - .args_type = "device:B,base:s?,speed:o?,backing-file:s?,on-error:s?", + .args_type = "job-id:s?,device:B,base:s?,speed:o?,backing-file:s?,on-error:s?", .mhandler.cmd_new = qmp_marshal_block_stream, }, @@ -1118,6 +1118,8 @@ Copy data from a backing file into a block device. Arguments: +- "job-id": Identifier for the newly-created block job. If omitted, + the device name will be used. (json-string, optional) - "device": The device's ID, must be unique (json-string) - "base": The file name of the backing image above which copying starts (json-string, optional) -- cgit v1.1 From fd62c609edb32ddaafbe84c466dd21603577a46d Mon Sep 17 00:00:00 2001 From: Alberto Garcia Date: Tue, 5 Jul 2016 17:29:00 +0300 Subject: commit: Add 'job-id' parameter to 'block-commit' This patch adds a new optional 'job-id' parameter to 'block-commit', allowing the user to specify the ID of the block job to be created. Signed-off-by: Alberto Garcia Reviewed-by: Kevin Wolf Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- qmp-commands.hx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'qmp-commands.hx') diff --git a/qmp-commands.hx b/qmp-commands.hx index d61ea20..c46c65c 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -1151,7 +1151,7 @@ EQMP { .name = "block-commit", - .args_type = "device:B,base:s?,top:s?,backing-file:s?,speed:o?", + .args_type = "job-id:s?,device:B,base:s?,top:s?,backing-file:s?,speed:o?", .mhandler.cmd_new = qmp_marshal_block_commit, }, @@ -1164,6 +1164,8 @@ data between 'top' and 'base' into 'base'. Arguments: +- "job-id": Identifier for the newly-created block job. If omitted, + the device name will be used. (json-string, optional) - "device": The device's ID, must be unique (json-string) - "base": The file name of the backing image to write data into. If not specified, this is the deepest backing image -- cgit v1.1