mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-18 00:58:31 +00:00
Some process can share one struct file-s, we may find them by "object IDs". A file descriptor is opened in one process and send to other via unix socket. The procedure of restoring files contains four stages. * Collect data about all file's descriptors On this stage we find process which will restore a file descriptor and create a list of processes, who should get this descriptor. * Create datagrams unix sockets If a file descriptor should be received, a unix socket is created instead of it. * Open file descriptors A process with the least pid opens a file and sends this file descriptors to all one who wait it. * Receive file descriptors. When we were thinking up this algoritm, we wanted to minimize a number of context switches. A number of context switches is proportional of a number of processes. Signed-off-by: Andrey Vagin <avagin@openvz.org> Acked-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
9 lines
244 B
C
9 lines
244 B
C
#ifndef FILES_H_
|
|
#define FILES_H_
|
|
|
|
extern int prepare_fds(int pid);
|
|
extern int prepare_fd_pid(int pid);
|
|
extern int prepare_fdinfo_global(void);
|
|
extern int try_fixup_file_map(int pid, struct vma_entry *vma_entry, int fd);
|
|
|
|
#endif /* FILES_H_ */
|