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

Submitted by Cyrill Gorcunov on Dec. 7, 2018, 11:30 a.m.

Details

Message ID 20181207113043.21992-2-gorcunov@gmail.com
State New
Series "epoll: Add support of migrated targses"
Headers show

Commit Message

Cyrill Gorcunov Dec. 7, 2018, 11:30 a.m.
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@gmail.com>
---
 criu/cr-dump.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Patch hide | download patch | download mbox

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