[CRIU] [PATCH] mnt: allow external slaves too

Tycho Andersen tycho.andersen at canonical.com
Tue Oct 11 08:43:15 PDT 2016


From: Tycho Andersen <tycho.andersen at canonical.com>

In particular, if the thing in criu's namespace is also a slave of
something in an external mount namespace (as it is in the tests), we won't
see the master, just the external slave. However, this also counts as an
"external master" because it is an external bind mount, just from something
that was itself a slave.

I'm not sure why the test broke, but it works on ubuntu 16.04 and fails on
16.10, so I suppose something with the debugfs mount configuration has
changed. I can look into it more if we're curious, but this patch fixes it
and should probably go in anyway.

Closes #223

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
 criu/mount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/criu/mount.c b/criu/mount.c
index 1e1e8ef..d429d07 100644
--- a/criu/mount.c
+++ b/criu/mount.c
@@ -857,7 +857,7 @@ static int resolve_external_mounts(struct mount_info *info)
 			 * about slavery relationships in external mounts. This
 			 * seems like an uncommon case, so we punt for not.
 			 */
-			if (m->master_id != match->shared_id)
+			if (m->master_id != match->shared_id && m->master_id != match->master_id)
 				continue;
 		}
 
-- 
2.7.4



More information about the CRIU mailing list