mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 18:07:57 +00:00
The AUFS support code handles the "bad" information that we get from the kernel in /proc/<pid>/map_files and /proc/<pid>/mountinfo files. For details see comments in sysfs_parse.c. The main motivation for this work was dumping and restoring Docker containers which by default use the AUFS graph driver. For dump, --aufs-root <container_root> should be added to the command line options. For restore, there is no need for AUFS-specific command line options but the container's AUFS filesystem should already be set up before calling criu restore. [ xemul: With AUFS files sometimes, in particular -- in case of a mapping of an executable file (likekely the one created at elf load), in the /proc/pid/map_files/xxx link target we see not the path by which the file is seen in AUFS, but the path by which AUFS accesses this file from one of its "branches". In order to fix the path we get the info about branches from sysfs and when we meet such a file, we cut the branch part of the path. ] Signed-off-by: Saied Kazemi <saied@google.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
15 lines
492 B
C
15 lines
492 B
C
#ifndef __CR_SYSFS_PARSE_H__
|
|
#define __CR_SYSFS_PARSE_H__
|
|
|
|
#define SYSFS_AUFS "/sys/fs/aufs/"
|
|
#define SBINFO_LEN (3 + 16 + 1) /* si_%lx */
|
|
#define SBINFO_PATH_LEN (sizeof SYSFS_AUFS + SBINFO_LEN) /* /sys/fs/aufs/<sbinfo> */
|
|
#define AUFSBR_PATH_LEN (SBINFO_PATH_LEN + 6 + 1) /* /sys/fs/aufs/<sbinfo>/br%3d */
|
|
|
|
extern int parse_aufs_branches(struct mount_info *mi);
|
|
extern int fixup_aufs_vma_fd(struct vma_area *vma);
|
|
extern void free_aufs_branches(void);
|
|
|
|
#endif /* __CR_SYSFS_PARSE_H__ */
|
|
|