[CRIU] [PATCH 2/2] mount: support recursive bind mounts
Pavel Emelyanov
xemul at virtuozzo.com
Fri May 20 04:28:57 PDT 2016
On 05/17/2016 01:30 AM, Tycho Andersen wrote:
> The inital mount() call for a bind mount needs to have the MS_REC flag
> present if the bind mount is recursive.
Is it still needed after the latest version of tracefs patch?
> 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 e85e5d9..30e7203 100644
> --- a/criu/mount.c
> +++ b/criu/mount.c
> @@ -2586,7 +2586,7 @@ do_bind:
> }
> }
>
> - if (mount(root, mi->mountpoint, NULL, MS_BIND, NULL) < 0) {
> + if (mount(root, mi->mountpoint, NULL, MS_BIND | (mi->flags & MS_REC), NULL) < 0) {
> pr_perror("Can't mount at %s", mi->mountpoint);
> goto err;
> }
>
More information about the CRIU
mailing list