diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-09-28 17:22:51 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-09-28 19:14:32 +0200 |
commit | 6e37fb811ac86739e5ed30dba3a8e4848bd21b56 (patch) | |
tree | 61bfc784684f6fc22ad910a6e8809395c499b63f /hmp-commands.hx | |
parent | 8acc72a4d20910d522516dab31272fe66da8da28 (diff) | |
download | qemu-6e37fb811ac86739e5ed30dba3a8e4848bd21b56.tar.gz qemu-6e37fb811ac86739e5ed30dba3a8e4848bd21b56.tar.bz2 qemu-6e37fb811ac86739e5ed30dba3a8e4848bd21b56.zip |
qmp: add block-job-pause and block-job-resume
Add QMP commands matching the functionality.
Paused jobs cannot be canceled without first resuming them. This
ensures that I/O errors are never missed by management. However, an
optional force argument can be specified to allow that.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hmp-commands.hx')
-rw-r--r-- | hmp-commands.hx | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/hmp-commands.hx b/hmp-commands.hx index ed67e997fd..27d90a24af 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -99,9 +99,10 @@ ETEXI { .name = "block_job_cancel", - .args_type = "device:B", - .params = "device", - .help = "stop an active background block operation", + .args_type = "force:-f,device:B", + .params = "[-f] device", + .help = "stop an active background block operation (use -f" + "\n\t\t\t if the operation is currently paused)", .mhandler.cmd = hmp_block_job_cancel, }, @@ -112,6 +113,34 @@ Stop an active block streaming operation. ETEXI { + .name = "block_job_pause", + .args_type = "device:B", + .params = "device", + .help = "pause an active background block operation", + .mhandler.cmd = hmp_block_job_pause, + }, + +STEXI +@item block_job_pause +@findex block_job_pause +Pause an active block streaming operation. +ETEXI + + { + .name = "block_job_resume", + .args_type = "device:B", + .params = "device", + .help = "resume a paused background block operation", + .mhandler.cmd = hmp_block_job_resume, + }, + +STEXI +@item block_job_resume +@findex block_job_resume +Resume a paused block streaming operation. +ETEXI + + { .name = "eject", .args_type = "force:-f,device:B", .params = "[-f] device", |