[CRIU] [PATCH 1/5] epoll: Defer queued epolls to write at the end of checkpoint

Cyrill Gorcunov gorcunov at gmail.com
Fri Dec 7 14:30:39 MSK 2018


We gonna support epoll targets which are migrated from another
processes so defer queued entries dumping until all files
are collected.

Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
 criu/cr-dump.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/criu/cr-dump.c b/criu/cr-dump.c
index 2c870549683f..59607fe4c2c4 100644
--- a/criu/cr-dump.c
+++ b/criu/cr-dump.c
@@ -1345,11 +1345,6 @@ static int dump_one_task(struct pstree_item *item, InventoryEntry *parent_ie)
 			pr_err("Dump files (pid: %d) failed with %d\n", pid, ret);
 			goto err_cure;
 		}
-		ret = flush_eventpoll_dinfo_queue();
-		if (ret) {
-			pr_err("Dump eventpoll (pid: %d) failed with %d\n", pid, ret);
-			goto err_cure;
-		}
 	}
 
 	mdc.pre_dump = false;
@@ -1854,6 +1849,9 @@ int cr_dump_tasks(pid_t pid)
 		parent_ie = NULL;
 	}
 
+	if (flush_eventpoll_dinfo_queue())
+		goto err;
+
 	/*
 	 * It may happen that a process has completed but its files in
 	 * /proc/PID/ are still open by another process. If the PID has been
-- 
2.17.2



More information about the CRIU mailing list