]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
blockjob: add 'blockcopy' to virsh
authorEric Blake <eblake@redhat.com>
Thu, 12 Apr 2012 20:31:52 +0000 (14:31 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 23 Apr 2012 13:44:30 +0000 (07:44 -0600)
commit1f06c007fec9df74100046b758eec2c1f827e947
treea5194df3c643b8f8fe90dfdf4984d7354518115a
parent36484692587c1af5077630694f0c51b4864ecff7
blockjob: add 'blockcopy' to virsh

Rather than further overloading 'blockpull', I decided to create a
new virsh command to expose the new flags of virDomainBlockRebase.

Blocking until the command completes naturally is pointless, since
the block copy job is intended to run indefinitely.  Instead, I
made the command support three --wait modes: by default, it runs until
mirroring is started; with --pivot, it pivots as soon as mirroring
is started; and with --finish, it aborts (for a clean copy) as
soon as mirroring is started.

* tools/virsh.c (VSH_CMD_BLOCK_JOB_COPY): New mode.
(blockJobImpl): Support new flags.
(cmdBlockCopy): New command.
(cmdBlockJob): Support new job info, new abort flag.
* tools/virsh.pod (blockcopy, blockjob): Document the new command
and flags.
tools/virsh.c
tools/virsh.pod