[CRIU] [PATCH] Add root mount point of container as irmap hint
Pavel Emelyanov
xemul at parallels.com
Wed Dec 10 01:56:22 PST 2014
On 12/08/2014 07:25 AM, Nikolay Plotnik wrote:
> From 99e31b5263ee01f177a9c02368de1610d1b807a3 Mon Sep 17 00:00:00 2001
> From: Nikolay Plotnik <nikolay.plotnik at gmail.com <mailto: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 <mailto: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, },
Can the path be "//"? Or at least the "/." one.
It would be much more understandable.
> { .path = "/no-such-path", .nr_kids = -1, },
> { },
> };
> --
> 1.9.3
>
>
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
>
More information about the CRIU
mailing list