mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 22:35:33 +00:00
ns: Add c/r for /proc/$pid/ns/$ids references
Based on work done by Cyrill Corcunov (many thanks for that). In this commit we implement c/r for files which have opened /proc/$pid/ns/$ids entries. The idea is rather simple one Checkpoint ========== - Check if the file name is the one of known to be ns ref - If match then write protobuf entry Restore ======= - Read all ns entries from the image - When criu tries to open one we lookup over process tree to figure out which PID should be used in path and then just open it Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
@@ -18,8 +18,19 @@ struct rst_info;
|
||||
struct parasite_ctl;
|
||||
|
||||
struct fd_link {
|
||||
char name[PATH_MAX + 1];
|
||||
size_t len;
|
||||
union {
|
||||
/* Link info for generic file (path) */
|
||||
struct {
|
||||
char name[PATH_MAX + 1];
|
||||
size_t len;
|
||||
};
|
||||
|
||||
/* Link info for proc-ns file */
|
||||
struct {
|
||||
struct ns_desc *ns_d;
|
||||
unsigned int ns_kid;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
struct fd_parms {
|
||||
|
Reference in New Issue
Block a user