[CRIU] [PATCH 3/3] fsnotify: Bring back ignore queued fsnotify behaviour

Cyrill Gorcunov gorcunov at openvz.org
Wed Sep 3 11:06:17 PDT 2014


Otherwise our inotify test is failing, which is expected
because

 - test should be reworked
 - fsnotify code need to be updated

I'm working on it but to not block CRIU from passing
other tests fail here iif specific command line option
is set only.

As I said in previous commit -- we don't have kernel API
yet to control/modify notify queues so let user to deside
if he wanna proceed in strict mode were we required queues
to be empty.

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

diff --git a/fsnotify.c b/fsnotify.c
index 33563eba800b..8d600196789b 100644
--- a/fsnotify.c
+++ b/fsnotify.c
@@ -237,8 +237,10 @@ static int dump_one_inotify(int lfd, u32 id, const struct fd_parms *p)
 	if (ret < 0)
 		return -1;
 	else if (ret > 0) {
-		pr_err("The %d inotify has queued events\n", id);
-		return -1;
+		if (!(opts.ignore_queues & IGNORE_QUEUE_INOTIFY)) {
+			pr_err("The %x inotify has queued events\n", id);
+			return -1;
+		}
 	}
 
 	ie.id = id;
@@ -349,8 +351,10 @@ static int dump_one_fanotify(int lfd, u32 id, const struct fd_parms *p)
 	if (ret < 0)
 		return -1;
 	else if (ret > 0) {
-		pr_err("The %d inotify has queued events\n", id);
-		return -1;
+		if (!(opts.ignore_queues & IGNORE_QUEUE_FANOTIFY)) {
+			pr_err("The %x fanotify has queued events\n", id);
+			return -1;
+		}
 	}
 	ret = -1;
 
-- 
1.9.3



More information about the CRIU mailing list