[PATCH] fsnotify: Proceed dumping even if queue has data

Cyrill Gorcunov gorcunov at openvz.org
Fri Sep 5 03:09:27 PDT 2014


It turns out that we can't be too strict about
queued events -- criu itself generates a number
of them and there is no clear way yet how to resolve
this situation. So defer "strict" mode for now
but print a warning.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 fsnotify.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/fsnotify.c b/fsnotify.c
index 33563eba800b..ea58e8aa9d7b 100644
--- a/fsnotify.c
+++ b/fsnotify.c
@@ -236,10 +236,8 @@ static int dump_one_inotify(int lfd, u32 id, const struct fd_parms *p)
 	ret = fd_has_data(lfd);
 	if (ret < 0)
 		return -1;
-	else if (ret > 0) {
-		pr_err("The %d inotify has queued events\n", id);
-		return -1;
-	}
+	else if (ret > 0)
+		pr_warn("The 0x%08x inotify events will be dropped\n", id);
 
 	ie.id = id;
 	ie.flags = p->flags;
@@ -348,10 +346,8 @@ static int dump_one_fanotify(int lfd, u32 id, const struct fd_parms *p)
 	ret = fd_has_data(lfd);
 	if (ret < 0)
 		return -1;
-	else if (ret > 0) {
-		pr_err("The %d inotify has queued events\n", id);
-		return -1;
-	}
+	else if (ret > 0)
+		pr_warn("The 0x%08x fanotify events will be dropped\n", id);
 	ret = -1;
 
 	fe.id = id;
-- 
1.9.3


--aT9PWwzfKXlsBJM1--


More information about the CRIU mailing list