mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 22:05:36 +00:00
files: Support opened-and-unlinked files with non zero link count
These are not ghost, as they are still on fs, so we cannot take them with us in the image. Neither we can easily find the other name of that file. Sad :( To make it work we linkat() the new name to that file using the AT_EMPTY_PATH flag to link directly to the opened fd. If we could openat() the fd's parent we would better do it, but we can't and thus have to create the link name by explicit absolute path :( This modifies the fs we're dumping, so I'll introduce one more cmd line option for that soon. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
@@ -91,4 +91,8 @@ extern int get_filemap_fd(int pid, VmaEntry *vma_entry);
|
||||
extern int prepare_fs(int pid);
|
||||
extern int set_fd_flags(int fd, int flags);
|
||||
|
||||
#ifndef AT_EMPTY_PATH
|
||||
#define AT_EMPTY_PATH 0x1000
|
||||
#endif
|
||||
|
||||
#endif /* FILES_H_ */
|
||||
|
Reference in New Issue
Block a user