From 4c0d56f4e79bc52c99cf3db702ad3cf6767e18c8 Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Wed, 5 Apr 2017 15:28:39 +0300 Subject: [PATCH] lazy-pages: make epollfd part of global daemon state We only use one epoll instance to manage lazy-pages related I/O. Making epollfd file-visible will allow cleaner implementation of the restored process exit() calls tracking. Signed-off-by: Mike Rapoport Signed-off-by: Andrei Vagin --- criu/uffd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/criu/uffd.c b/criu/uffd.c index 021c07bbd..f8767decb 100644 --- a/criu/uffd.c +++ b/criu/uffd.c @@ -92,9 +92,11 @@ struct lazy_pages_info { void *buf; }; +/* global lazy-pages daemon state */ static LIST_HEAD(lpis); static LIST_HEAD(exiting_lpis); static LIST_HEAD(pending_lpis); +static int epollfd; static int handle_uffd_event(struct epoll_rfd *lpfd); @@ -1119,7 +1121,6 @@ close_uffd: int cr_lazy_pages(bool daemon) { struct epoll_event *events; - int epollfd; int nr_fds; int lazy_sk; int ret;