[CRIU] [PATCH v3 08/16] rst_info: artificial files list introduced
Stanislav Kinsburskiy
skinsbursky at virtuozzo.com
Thu Dec 10 07:16:50 PST 2015
This list is used to collect and handle some service files, which an be used
only during restore procedure for some service perations, and must be closed
before process is released.
AutoFS will use them to fix up mount points druing restore.
Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
files.c | 8 ++++++++
include/rst_info.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/files.c b/files.c
index e6919cd..1a1c811 100644
--- a/files.c
+++ b/files.c
@@ -690,6 +690,7 @@ int prepare_fd_pid(struct pstree_item *item)
INIT_LIST_HEAD(&rst_info->eventpoll);
INIT_LIST_HEAD(&rst_info->tty_slaves);
INIT_LIST_HEAD(&rst_info->tty_ctty);
+ INIT_LIST_HEAD(&rst_info->artificial);
if (!fdinfo_per_id) {
img = open_image(CR_FD_FDINFO, O_RSTR, pid);
@@ -1105,6 +1106,13 @@ int prepare_fds(struct pstree_item *me)
ret = open_fdinfos(me->pid.virt, &rsti(me)->eventpoll, state);
if (ret)
break;
+
+ /* Artificial file descriptors are not transfered within images.
+ * They are created on restore procedure for some internal
+ * needs, like Autofs helper fds. */
+ ret = open_fdinfos(me->pid.virt, &rsti(me)->artificial, state);
+ if (ret)
+ break;
}
if (ret)
diff --git a/include/rst_info.h b/include/rst_info.h
index b72e5d0..74e01ee 100644
--- a/include/rst_info.h
+++ b/include/rst_info.h
@@ -31,6 +31,7 @@ struct rst_info {
struct list_head eventpoll;
struct list_head tty_slaves;
struct list_head tty_ctty;
+ struct list_head artificial;
void *premmapped_addr;
unsigned long premmapped_len;
More information about the CRIU
mailing list