mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-30 18:50:18 +03:00
tools: remote --parallel from virsh save command
There is no need to have --parallel and --parallel-channels especially when --parallel on its own is the same as not used at all. In both cases libvirt will default to single channel. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Jim Fehlig <jfehlig@suse.com>
This commit is contained in:
parent
ec274a96b6
commit
2582f4dcab
@ -4179,7 +4179,7 @@ save
|
||||
::
|
||||
|
||||
save domain state-file [--bypass-cache] [--xml file]
|
||||
[--parallel] [--parallel-channels channels]
|
||||
[--parallel-channels channels]
|
||||
[{--running | --paused}] [--verbose]
|
||||
|
||||
Saves a running domain (RAM, but not disk state) to a state file so that
|
||||
@ -4213,11 +4213,10 @@ based on the state the domain was in when the save was done; passing
|
||||
either the *--running* or *--paused* flag will allow overriding which
|
||||
state the ``restore`` should use.
|
||||
|
||||
*--parallel* option will cause the save data to be written to file
|
||||
over multiple parallel IO channels. The number of channels can be
|
||||
specified using *--parallel-channels*. Using parallel IO channels
|
||||
requires the use of ``sparse`` image save format. Parallel save may
|
||||
significantly reduce the time required to save large memory domains.
|
||||
*--parallel-channels* option can specify number of parallel IO channels
|
||||
to be used when saving memory to file. Using parallel IO channels requires
|
||||
the use of ``sparse`` image save format. Parallel save may significantly
|
||||
reduce the time required to save large memory domains.
|
||||
|
||||
Domain saved state files assume that disk images will be unchanged
|
||||
between the creation and restore point. For a more complete system
|
||||
|
@ -4530,13 +4530,9 @@ static const vshCmdOptDef opts_save[] = {
|
||||
.type = VSH_OT_BOOL,
|
||||
.help = N_("avoid file system cache when saving")
|
||||
},
|
||||
{.name = "parallel",
|
||||
.type = VSH_OT_BOOL,
|
||||
.help = N_("enable parallel save")
|
||||
},
|
||||
{.name = "parallel-channels",
|
||||
.type = VSH_OT_INT,
|
||||
.help = N_("number of extra IO channels to use for parallel save")
|
||||
.help = N_("number of IO channels to use for parallel save")
|
||||
},
|
||||
{.name = "xml",
|
||||
.type = VSH_OT_STRING,
|
||||
@ -4571,8 +4567,7 @@ doSave(void *opaque)
|
||||
virTypedParameterPtr params = NULL;
|
||||
int nparams = 0;
|
||||
int maxparams = 0;
|
||||
int nchannels = 1;
|
||||
int rv = -1;
|
||||
int nchannels = 0;
|
||||
unsigned int flags = 0;
|
||||
const char *xmlfile = NULL;
|
||||
g_autofree char *xml = NULL;
|
||||
@ -4592,8 +4587,6 @@ doSave(void *opaque)
|
||||
flags |= VIR_DOMAIN_SAVE_RUNNING;
|
||||
if (vshCommandOptBool(cmd, "paused"))
|
||||
flags |= VIR_DOMAIN_SAVE_PAUSED;
|
||||
if (vshCommandOptBool(cmd, "parallel"))
|
||||
flags |= VIR_DOMAIN_SAVE_PARALLEL;
|
||||
|
||||
if (vshCommandOptString(ctl, cmd, "file", &to) < 0)
|
||||
goto out;
|
||||
@ -4602,13 +4595,14 @@ doSave(void *opaque)
|
||||
VIR_DOMAIN_SAVE_PARAM_FILE, to) < 0)
|
||||
goto out;
|
||||
|
||||
if (flags & VIR_DOMAIN_SAVE_PARALLEL) {
|
||||
if ((rv = vshCommandOptInt(ctl, cmd, "parallel-channels", &nchannels)) < 0)
|
||||
goto out;
|
||||
|
||||
if ((rc = vshCommandOptInt(ctl, cmd, "parallel-channels", &nchannels)) < 0)
|
||||
goto out;
|
||||
if (rc == 1) {
|
||||
if (virTypedParamsAddInt(¶ms, &nparams, &maxparams,
|
||||
VIR_DOMAIN_SAVE_PARAM_PARALLEL_CHANNELS, nchannels) < 0)
|
||||
goto out;
|
||||
|
||||
flags |= VIR_DOMAIN_SAVE_PARALLEL;
|
||||
}
|
||||
|
||||
if (vshCommandOptString(ctl, cmd, "xml", &xmlfile) < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user