[CRIU] [PATCH 2/2] introduce --skip-mnt cli option

Pavel Emelyanov xemul at parallels.com
Wed Apr 1 00:41:09 PDT 2015


On 03/31/2015 07:24 PM, Oleg Nesterov wrote:

> @@ -1004,6 +1035,13 @@ struct mount_info *parse_mountinfo(pid_t pid, struct ns_id *nsid, bool for_dump)
>  			goto end;
>  		}
>  
> +		if (for_dump && should_skip_mount(new->mountpoint + 1)) {

This check is not enough. If we have a file opened on skipped mountpoint, then
dump will succeed, but we will fail on restore. Such behavior is actually not
good, restore shouldn't fail due to badly created images :)

Other than this I have no objections against the feature.

> +			pr_info("\tskip %s @ %s\n", fsname,  new->mountpoint);
> +			mnt_entry_free(new);
> +			new = NULL;
> +			goto end;
> +		}
> +
>  		pr_info("\ttype %s source %s mnt_id %d s_dev %#x %s @ %s flags %#x options %s\n",
>  				fsname, new->source,
>  				new->mnt_id, new->s_dev, new->root, new->mountpoint,
> 



More information about the CRIU mailing list