[CRIU] [PATCH CRIU 3/4] mount: do not mark mount internaly shared if match is master not share

Pavel Emelyanov xemul at virtuozzo.com
Wed Feb 3 05:00:44 PST 2016


On 01/20/2016 06:42 PM, Pavel Tikhomirov wrote:
> For mounts which at the same time are slave and shared we
> might've found external master but not external share, so in
> that case we do not need to mark mountinfo as internal sharing.
> 
> https://jira.sw.ru/browse/PSBM-42829
> Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
> ---
>  mount.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/mount.c b/mount.c
> index 424949a..56d732d 100644
> --- a/mount.c
> +++ b/mount.c
> @@ -874,7 +874,11 @@ static int resolve_external_mounts(struct mount_info *info)
>  			if (!opts.enable_external_sharing)
>  				continue;
>  
> -			if (m->shared_id != match->shared_id)
> +			if (m->flags & MS_SLAVE) {

The flags & MS_SLAVE check below obeys the opts.enable_external_masters option.
Should this check do the same?

> +				if (m->shared_id != match->shared_id &&
> +				    m->master_id != match->shared_id)
> +					m->internal_sharing = true;
> +			} else if (m->shared_id != match->shared_id)
>  				m->internal_sharing = true;
>  		}
>  
> 



More information about the CRIU mailing list