[CRIU] Re: [PATCH 2/4] restore: Add checkpoint/restore for /proc/pid/exe symlink

Pavel Emelyanov xemul at parallels.com
Tue Feb 7 07:24:35 EST 2012


On 02/07/2012 04:22 PM, Cyrill Gorcunov wrote:
> On Tue, Feb 07, 2012 at 04:17:08PM +0400, Pavel Emelyanov wrote:
>>> @@ -230,6 +231,16 @@ static int restore_cwd(struct fdinfo_entry *fe, int fd)
>>>  	return 0;
>>>  }
>>>  
>>> +static int restore_exe_early(struct fdinfo_entry *fe, int fd)
>>> +{
>>> +	char path[PATH_MAX];
>>> +
>>> +	if (get_file_path(path, fe, fd))
>>> +		return -1;
>>> +
>>> +	pr_info("Skips restoring EXE (%s) symlink at this stage\n", path);
>>> +	return 0;
>>
>> What is this function for?
>>
> 
> It's informative message, we can live without it but note that we have
> to skip EXE name in image, so if we drop this function we need to do
> lseek somewhere else in code and skip the name of exe link in image
> reading procedure.

Just place a comment here, saying that the restore is done later, in function
called "xxx", so we just skip it, and call lseek(fd, fe->len);

> 	Cyrill
> 



More information about the CRIU mailing list