[CRIU] [PATCH 4/4] mount: open_mount uses __open_mountpoint instead of own logic

Pavel Emelyanov xemul at parallels.com
Wed Apr 16 00:59:15 PDT 2014


On 04/16/2014 11:15 AM, Andrey Wagin wrote:
> 2014-04-16 10:35 GMT+04:00 Pavel Emelyanov <xemul at parallels.com>:
>> On 04/16/2014 09:04 AM, Andrey Vagin wrote:
>>
>>> @@ -488,7 +476,8 @@ static int __open_mountpoint(struct mount_info *pm, int mnt_fd)
>>>
>>>               mntns_root = get_service_fd(ROOT_FD_OFF);
>>>
>>> -             snprintf(path, sizeof(path), ".%s", pm->mountpoint);
>>> +             /* paths starts from "." on restore and "/" on dump */
>>
>> Can you be more descriptive here, please?
> 
> I don't know what to write here
> openat(fd, "/") will ignore fd
> openat(fd, ".asdf") and openat(fd, "./asdf") are not the same

Why are we converting paths from .foo into ./foo in this hunk? What
are we trying to "fix"?

>>
>>> +             snprintf(path, sizeof(path), "./%s", pm->mountpoint);
>>>               mnt_fd = openat(mntns_root, path, O_RDONLY);
>>>               if (mnt_fd < 0) {
>>>                       pr_perror("Can't open %s", pm->mountpoint);
>>>
>>
>>
> .
> 




More information about the CRIU mailing list