[CRIU] [PATCH 2/2] mnt: Update can_mount_now to test if master peer is ready

Andrew Vagin avagin at odin.com
Fri Oct 9 01:28:17 PDT 2015


On Thu, Oct 08, 2015 at 10:45:55PM +0300, Cyrill Gorcunov wrote:
> If we're in someone's slave list we have to wait until
> master peer is mounted before mounting ourself otherwise
> we ruin the master/slave order.
> 
> https://jira.sw.ru/browse/PSBM-39957
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  mount.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/mount.c b/mount.c
> index 52cb8a1766d0..f99bce414cff 100644
> --- a/mount.c
> +++ b/mount.c
> @@ -2126,6 +2126,12 @@ static bool can_mount_now(struct mount_info *mi)
>  
>  	if (mi->external)
>  		return true;
> +	/*
> +	 * We're in someone's slave list so wait
> +	 * until master peer is mounted.
> +	 */
> +	if (mi->mnt_master && mi->mnt_master->mounted == false)
> +		return false;

mi->bind is set for slave mounts only if a master mount is mounted,
so this patch do nothing.

>  
>  	if (mi->master_id && mi->bind == NULL)
>  		return false;
> -- 
> 2.4.3
> 


More information about the CRIU mailing list