[CRIU] [PATCH v5 4/5] mount: Forced mount unmounted binfmt_misc to do not lost its content

Kirill Tkhai ktkhai at virtuozzo.com
Mon Aug 15 01:40:28 PDT 2016



On 05.08.2016 18:39, Pavel Emelyanov wrote:
> 
>> @@ -1136,6 +1137,53 @@ static int attach_option(struct mount_info *pm, char *opt)
>>  	return pm->options ? 0 : -1;
>>  }
>>  
>> +static int add_cr_time_mount(struct mount_info *root, char *fsname, const char *path, unsigned int s_dev)
>> +{
>> +	struct mount_info *mi, *t, *parent;
>> +
>> +	mi = mnt_entry_alloc();
>> +	if (!mi)
>> +		return -1;
>> +	mi->mountpoint = xmalloc(strlen(path) + 2);
>> +	if (!mi->mountpoint)
>> +		return -1;
>> +	mi->ns_mountpoint = mi->mountpoint;
>> +	sprintf(mi->mountpoint, ".%s", path);
>> +	mi->mnt_id = mi->flags = mi->sb_flags = 0;
> 
> Please, add CRTIME_MNT_ID or smth like this to make grep over sources for
> cr-time mountpoints handling possible.

Ok

> 
>> +	mi->root = xstrdup("/");
>> +	mi->fsname = xstrdup(fsname);
>> +	mi->source = xstrdup(fsname);
>> +	mi->options = xstrdup("");
>> +	if (!mi->root || !mi->fsname || !mi->source || !mi->options)
>> +		return -1;
> 


More information about the CRIU mailing list