.type = VSH_OT_BOOL,
.help = N_("keep the backing chain relatively referenced")
},
+ {.name = "bytes",
+ .type = VSH_OT_BOOL,
+ .help = N_("the bandwidth limit is in bytes/s rather than MiB/s")
+ },
{.name = NULL}
};
bool blocking = vshCommandOptBool(cmd, "wait");
bool verbose = vshCommandOptBool(cmd, "verbose");
bool async = vshCommandOptBool(cmd, "async");
+ bool bytes = vshCommandOptBool(cmd, "bytes");
int timeout = 0;
const char *path = NULL;
const char *base = NULL;
if (vshCommandOptStringReq(ctl, cmd, "base", &base) < 0)
return false;
- if (vshCommandOptULWrap(ctl, cmd, "bandwidth", &bandwidth) < 0)
+ if (vshBlockJobOptionBandwidth(ctl, cmd, bytes, &bandwidth) < 0)
return false;
if (vshCommandOptTimeoutToMs(ctl, cmd, &timeout) < 0)
goto cleanup;
if (base || flags) {
+ if (bytes)
+ flags |= VIR_DOMAIN_BLOCK_REBASE_BANDWIDTH_BYTES;
+
if (virDomainBlockRebase(dom, path, base, bandwidth, flags) < 0)
goto cleanup;
} else {
- if (virDomainBlockPull(dom, path, bandwidth, 0) < 0)
+ if (bytes)
+ flags |= VIR_DOMAIN_BLOCK_PULL_BANDWIDTH_BYTES;
+
+ if (virDomainBlockPull(dom, path, bandwidth, flags) < 0)
goto cleanup;
}
be simultaneously in-flight during the copy; larger values use more memory but
may allow faster completion (the default value is usually correct).
-=item B<blockpull> I<domain> I<path> [I<bandwidth>] [I<base>]
+=item B<blockpull> I<domain> I<path> [I<bandwidth>] [I<--bytes>] [I<base>]
[I<--wait> [I<--verbose>] [I<--timeout> B<seconds>] [I<--async>]]
[I<--keep-relative>]
to a unique target name (<target dev='name'/>) or source file (<source
file='name'/>) for one of the disk devices attached to I<domain> (see
also B<domblklist> for listing these names).
-I<bandwidth> specifies copying bandwidth limit in MiB/s. Specifying a negative
-value is interpreted as an unsigned long long value or essentially
-unlimited. The hypervisor can choose whether to reject the value or
-convert it to the maximum value allowed.
+I<bandwidth> specifies copying bandwidth limit in MiB/s. For further information
+on the I<bandwidth> argument see the corresponding section for the B<blockjob>
+command.
=item B<blkdeviotune> I<domain> I<device>
[[I<--config>] [I<--live>] | [I<--current>]]