files: save mnt_id on fd_param
files: save mnt_id for reg files
files-ids: generate id-s accoding with mnt_id, st->st_dev and st->st_ino

One device can be mounted a few times, so files are identical only,
if they have the same mnt_id.
mount: return descriptor from mntns_collect_root

We are going to support nested mount namespaces, so files can be opened
from more than one namespace and a root must be collect for each file.
mount: save mount tree for each namespace

We are going to support nested mount namespaces and each NS has own
tree. The mount tree is used for checking that a file is reachable.
mount: move dump_mnt_namespaces in mount.c

It will fill mntinfo list and this is internal logic of mount.c
mount: separate collect_mnt_ns from dump_mnt_ns

We are going to support nested mntns, so the global mntinfo_tree
variable are useless and information about tree should be connected
to a proper namespace.

But when we don't dump mntns, we need to collect mounts for the current
mntns.
resotre: collect mounts of current mntns

It's required for restoring in the current mntns.
mount: __lookup_mnt_id returns the first mi if mnt_id == -1

Kernels before 3.15 doesn't show mnt_id in /proc/PID/fdinfo/X.
When processes are restored in a current mntns, we have only one root,
so here isn't matter which mount will be returned.
mount: set nsid for each mount point

We want to look up mntns by mnt_id.
mounts: mntns_collect_root in __open_mountpoint

We are going to support nested mount namespaces,
file descriptors can be from different namespaces,
so a namespace root must be updated for each of them.
irmap: mntns_collect_root in irmap_lookup
mount: add a function to get a temporary root for mntns

On restore all mount namespaces are restored in the root mntns and
sub-namecpeaces are restored in temorary places.

This function allows to get paths to these places.

It will be used in open_remap_ghost(), because it's called in the root
task, when other tasks are not forked yet.
mount: use per-ns list of mount-points in clean_mnt_ns and free_mnt_ns

We are going to dump nested mount namespaces, so we move the mountinfo
list on the namespace structure.
check: collect mounts of the current mntns

They are used for collecting unix sockets
mount: use per-namespace mntinfo_tree

This patch removes the global mntinfo_tree and collect_mount_info where
it was constructed.
mount: don't open the same root twise
zdtm: mark all mounts as private for one call
zdtm: reexec the mountpoints test in a target mntns

Otherwise it will have external files (from another namespace,
which isn't dumped).
zdtm: check opened files in a second mntns