mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-23 10:09:57 +00:00
Instead of scanning btrfs subvolumes (which can be even unaccessbile if mount point lays on directory instead of subvolume itself) we use path resolving feature here -- once we need to figure out if some device number need to be altered up to mount point (as we know stat() called on subvolume returns st_dev for subvolume itself, but not one that associated with a superblock and shown in /proc/self/mountinfo output). This as well implies that we need to check if device number for ghost files are to be updated to match mountinfo, thus we use phys_stat_resolve_dev helper here. After this patch the previously merged btrfs engine is no longer needed (at least it seems so) and can be dropped. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
28 lines
809 B
C
28 lines
809 B
C
#ifndef __CR_MOUNT_H__
|
|
#define __CR_MOUNT_H__
|
|
|
|
extern int mntns_root;
|
|
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, bool parse);
|
|
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);
|
|
|
|
#endif /* __CR_MOUNT_H__ */
|