]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: add missing "async" option in opts_block_commit
authorSimone Gotti <simone.gotti@gmail.com>
Thu, 19 Sep 2013 13:08:29 +0000 (15:08 +0200)
committerEric Blake <eblake@redhat.com>
Thu, 19 Sep 2013 19:50:11 +0000 (13:50 -0600)
After commit 8aecd351266a66efa59b7f7be77bf66693d99ce0 it'll detect
that a required option is not defined and it will assert and exit with:

virsh.c:1364: vshCommandOpt: Assertion `valid->name' failed.

Problem has been latent since commit ed23b106.

Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit fe64499dd14315b2d9d62cdf421bd3c97a46b7ac)

tools/virsh-domain.c
tools/virsh.pod

index 568d61d001b47fd3a3fc149912ea45f7cafb52f1..da6ab8771c32d9938a52583dc9edbe670ba7d850 100644 (file)
@@ -1544,6 +1544,10 @@ static const vshCmdOptDef opts_block_commit[] = {
      .type = VSH_OT_INT,
      .help = N_("with --wait, abort if copy exceeds timeout (in seconds)")
     },
+    {.name = "async",
+     .type = VSH_OT_BOOL,
+     .help = N_("with --wait, don't wait for cancel to finish")
+    },
     {.name = NULL}
 };
 
index 0ae51780d5d64e041fec4042a225b464ee58f37e..2864f3d55ff6b8870ebada92cd8afcc94d54ae11 100644 (file)
@@ -737,7 +737,7 @@ I<domif-setlink>) will accept the MAC address printed by this command.
 
 =item B<blockcommit> I<domain> I<path> [I<bandwidth>]
 {[I<base>] | [I<--shallow>]} [I<top>] [I<--delete>]
-[I<--wait> [I<--verbose>] [I<--timeout> B<seconds>]]
+[I<--wait> [I<--verbose>] [I<--timeout> B<seconds>] [I<--async>]]
 
 Reduce the length of a backing image chain, by committing changes at the
 top of the chain (snapshot or delta files) into backing images.  By
@@ -756,7 +756,10 @@ operation can be checked with B<blockjob>.  However, if I<--wait> is
 specified, then this command will block until the operation completes,
 or cancel the operation if the optional I<timeout> in seconds elapses
 or SIGINT is sent (usually with C<Ctrl-C>).  Using I<--verbose> along
-with I<--wait> will produce periodic status updates.
+with I<--wait> will produce periodic status updates.  If job cancellation
+is triggered, I<--async> will return control to the user as fast as
+possible, otherwise the command may continue to block a little while
+longer until the job is done cleaning up.
 
 I<path> specifies fully-qualified path of the disk; it corresponds
 to a unique target name (<target dev='name'/>) or source file (<source