vzctl_env_switch_snapshot(): rename a param

s/param/switch_param/ for struct ploop_snapshot_switch_param

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzctl_env_switch_snapshot: change parameters

1 Remove fs_param since they can be obtained from g_p.

2 Pass full vzctl_snapshot_param instead of just guid.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzctl snapshot-switch: add --skip-resume

A flag to just switch to a given snapshot and leave CT in a stopped
state. Documented in man page and usage, added to bash_completion.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzctl snapshot-switch: add --skip-config

Add --skip-config, document in man page and usage,
add to bash-completion.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
destroy_dump(): don't log "Removing" if no dump

Check for dump file existence and return success if
there is no file. This way we'll avoid printing

	Removing CT dump /vz/dump/Dump.121

in case there is no such file.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzctl(8): rm extra formatting

With .OP, second word is typeset in italics anyway, so no need to
explicitly specify \fI...\fR.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzctl create: add --diskinodes

Add --diskinodes to vzctl create options. Document in vzctl(8).
Add to usage synopsys and to bash-completion.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzctl_resize_image(): don't pass dq_param

All we need (for now) is size and offline arguments.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzctl create, vzctl convert: honor diskinodes

For ploop layout, there is no way to change diskinodes because of
ext4 file system limitation. Therefore, there should be a way to
specify inodes on container creation (or conversion).

This patch does exactly that. On create or convert, diskinodes
(if set) are used to calculate disk space required to have
a requested number of inodes (based on the fact that by default
it's one inode per 16K disk space), and the filesystem of that
size is created. Then, if requested disk space is lower, fs
is resized down (with ballooning).

Signed-off-by: Kir Kolyshkin <kir@openvz.org>