
On 4/30/14 11:30 , "Daniel P. Berrange" <berrange@redhat.com> wrote:
On Tue, Apr 29, 2014 at 08:04:24PM -0400, Tomoki Sekiyama wrote:
These are exposed under domfsfreeze command and domfsthaw command.
Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com> --- tools/virsh-domain.c | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++ tools/virsh.pod | 23 +++++++++ 2 files changed, 153 insertions(+)
+static const vshCmdOptDef opts_domfsfreeze[] = { + {.name = "domain", + .type = VSH_OT_DATA, + .flags = VSH_OFLAG_REQ, + .help = N_("domain name, id or uuid") + }, + {.name = "mountpoints", + .type = VSH_OT_DATA, + .help = N_("comma separated list of mountpoints to be frozen") + },
By using a command separated list, you prevent freezing of mount points whose directoy name contains a comma.
Virsh parser treats ",," as an escaped character for a comma, so you can specify '/path,to/mnt' by '--mountpoints /path,,to/mnt'. And ...
I'd think it'd be better to just allow multiple instances of the arg eg
virsh fsfreeze --mount <path1> --mount <path2> <guest>
the virsh option parser rejects repeated options by error: option --mount already seen so I chose comma separated list, which is also used in the "undefine --storage" option that takes a list of targets or source paths. Do we need to extend the parser to enable the repeated options? Regards, Tomoki Sekiyama