[CRIU] [PATCH 04/19] unix: image -- Shift mnt_id index

Andrey Vagin avagin at virtuozzo.com
Wed Sep 19 02:48:50 MSK 2018


On Fri, Sep 14, 2018 at 05:08:27PM +0300, Cyrill Gorcunov wrote:
> The index 17 is used in vz7 images, so
> while this member is not yet in stable
> criu lets shift it.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
> ---
>  criu/sk-unix.c       | 6 ++++++
>  images/sk-unix.proto | 6 +++++-
>  2 files changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/criu/sk-unix.c b/criu/sk-unix.c
> index f835fad80099..6f79b182b0c3 100644
> --- a/criu/sk-unix.c
> +++ b/criu/sk-unix.c
> @@ -2056,6 +2056,12 @@ static int init_unix_sk_info(struct unix_sk_info *ui, UnixSkEntry *ue)
>  	ui->is_connected	= 0;
>  	ui->peer_queue_restored = 0;
>  
> +	/* Compatibility with old images */
> +	if (ui->ue->has_old_mnt_id) {
> +		ui->ue->has_mnt_id = true;
> +		ui->ue->mnt_id = ui->ue->old_mnt_id;
> +	}
> +
>  	memzero(&ui->peer_resolve, sizeof(ui->peer_resolve));
>  	memzero(&ui->d, sizeof(ui->d));
>  
> diff --git a/images/sk-unix.proto b/images/sk-unix.proto
> index c59644f6eadd..fc033997a8a8 100644
> --- a/images/sk-unix.proto
> +++ b/images/sk-unix.proto
> @@ -50,5 +50,9 @@ message unix_sk_entry {
>  	optional bool			deleted		= 15;
>  
>  	optional uint32			ns_id		= 16;
> -	optional sint32			mnt_id		= 17 [default = -1];
> +	/*
> +	 * field 17 is reserved for vz7 use
> +	 */
> +	optional sint32			old_mnt_id	= 17 [default = -1];
> +	optional sint32			mnt_id		= 18 [default = -1];

What is a difference between old_mnt_id and mnt_id?

>  }
> -- 
> 2.17.1
> 


More information about the CRIU mailing list