mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-18 09:05:10 +00:00
This patch removes the global mntinfo_tree and collect_mount_info where it was constructed. The mntinfo list is filled from dump_mnt_ns, rst_collect_local_mntns, collect_mnt_namespaces and read_mnt_ns_img. A mountinfo entry contains a reference on a proper ns_id entry, so we cau use mnt_id to look up a proper mount namespace. v2: remove trash after rebasing. Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
39 lines
1.1 KiB
C
39 lines
1.1 KiB
C
#ifndef __CR_MOUNT_H__
|
|
#define __CR_MOUNT_H__
|
|
|
|
extern struct mount_info *mntinfo;
|
|
|
|
extern int mntns_collect_root(pid_t pid);
|
|
extern struct ns_id *lookup_nsid_by_mnt_id(int mnt_id);
|
|
|
|
struct proc_mountinfo;
|
|
|
|
extern int open_mount(unsigned int s_dev);
|
|
extern struct fstype *find_fstype_by_name(char *fst);
|
|
|
|
struct cr_fdset;
|
|
struct ns_id;
|
|
extern struct mount_info * collect_mntinfo(struct ns_id *ns);
|
|
extern int dump_mnt_ns(struct ns_id *ns);
|
|
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(struct mount_info *tree,
|
|
dev_t st_dev, const char *path);
|
|
extern bool phys_stat_dev_match(struct mount_info *tree, dev_t st_dev,
|
|
dev_t phys_dev, const char *path);
|
|
|
|
extern int restore_task_mnt_ns(struct ns_id *nsid, pid_t pid);
|
|
extern int fini_mnt_ns(void);
|
|
|
|
int rst_collect_local_mntns();
|
|
char *rst_get_mnt_root(int mnt_id);
|
|
|
|
#endif /* __CR_MOUNT_H__ */
|