[CRIU] [PATCH] Add root mount point of container as irmap hint

Nikolay Plotnik nikolay.plotnik at gmail.com
Sun Dec 7 20:25:12 PST 2014


>From 99e31b5263ee01f177a9c02368de1610d1b807a3 Mon Sep 17 00:00:00 2001
From: Nikolay Plotnik <nikolay.plotnik at gmail.com>
Date: Mon, 8 Dec 2014 06:55:18 +0300
Subject: [PATCH] Add root mount point of container as irmap hint

It appears container can have some notifications on its root path /.
So irmap mechanism should handle it appropriately - without recursive walk
into all filesystem tree.
For that purposes new irmap hint with path ".." is added with special
nr_kids value - 0.
This value is used to identify directory from simple file.
Two dots is used instead of one because of some irmap functions need
non-absolute,
relative to root path - they throw away first symbol in the hint path(/).

Signed-off-by: Nikolay Plotnik <nikolay.plotnik at gmail.com>

---
 irmap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/irmap.c b/irmap.c
index 10ebb0a..c21339b 100644
--- a/irmap.c
+++ b/irmap.c
@@ -57,6 +57,7 @@ static struct irmap hints[] = {
        { .path = "/etc", .nr_kids = -1, },
        { .path = "/var/spool", .nr_kids = -1, },
        { .path = "/lib/udev", .nr_kids = -1, },
+       { .path = "..", .nr_kids = 0, },
        { .path = "/no-such-path", .nr_kids = -1, },
        { },
 };
--
1.9.3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20141208/4beffa7d/attachment.html>


More information about the CRIU mailing list