mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-20 16:51:37 +00:00
Known issue: * currently only namespaces with the same root is supported * nested namespaces can be dumped and restored only if the root task has own mount namespace. All nested namespaces are restored in a root namespace in temporary directories. All mount points restored in one tree and then they are divided into namesaces. The task with minimal pid for each namespaces unshared mntns and then it makes pivot_root in a proper temporary directory. All other tasks makes setns to enter into a mount namespace of the task with minimal pid. v2: clean up Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
31 lines
882 B
C
31 lines
882 B
C
#ifndef __CR_MOUNT_H__
|
|
#define __CR_MOUNT_H__
|
|
|
|
extern int mntns_collect_root(pid_t pid);
|
|
|
|
struct proc_mountinfo;
|
|
|
|
extern int open_mount(unsigned int s_dev);
|
|
extern int collect_mount_info(pid_t pid);
|
|
extern struct fstype *find_fstype_by_name(char *fst);
|
|
|
|
struct cr_fdset;
|
|
extern int dump_mnt_ns(int pid, int ns_id);
|
|
extern int prepare_mnt_ns(int pid);
|
|
|
|
extern int pivot_root(const char *new_root, const char *put_old);
|
|
|
|
struct mount_info;
|
|
extern struct mount_info *lookup_mnt_id(unsigned int id);
|
|
extern struct mount_info *lookup_mnt_sdev(unsigned int s_dev);
|
|
|
|
extern struct ns_desc mnt_ns_desc;
|
|
|
|
extern dev_t phys_stat_resolve_dev(dev_t st_dev, const char *path);
|
|
extern bool phys_stat_dev_match(dev_t st_dev, dev_t phys_dev, const char *path);
|
|
|
|
struct ns_id;
|
|
extern int restore_task_mnt_ns(struct ns_id *nsid, pid_t pid);
|
|
extern int fini_mnt_ns(void);
|
|
|
|
#endif /* __CR_MOUNT_H__ */
|