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

Andrey Wagin avagin at gmail.com
Wed Apr 16 00:15:07 PDT 2014


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

>
>> +             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