[CRIU] Re: [PATCH 02/28] dump: open global image files with global
helpers
Kinsbursky Stanislav
skinsbursky at openvz.org
Fri Mar 23 08:36:59 EDT 2012
23.03.2012 16:32, Pavel Emelyanov пишет:
> On 03/23/2012 04:25 PM, Kinsbursky Stanislav wrote:
>> 22.03.2012 22:57, Pavel Emelyanov пишет:
>>> How about the pstree file? It's opened with these _glob_ helpers and
>>> thus is no longer unlinked.
>>>
>> No, it is not opened with _glob_ helpers.
> Ah, I see. It's opened with _glob_ in restore _only_:
I'll fix this.
> --- a/cr-restore.c
> +++ b/cr-restore.c
> @@ -1167,7 +1167,7 @@ static int restore_task_with_children(void *_arg)
>
> pr_info("%d: Starting restore\n", me->pid);
>
> - fd = open_image_ro_nocheck(FMT_FNAME_PSTREE, pstree_pid);
> + fd = open_glob_image_ro_nocheck(FMT_FNAME_PSTREE);
> if (fd< 0) {
> pr_perror("%d: Can't reopen pstree image", me->pid);
> exit(1);
>
> This is also wrong. GLobal files should be opened with _glob_ helper always.
The idea of global files was to provide some way to open the same file many
times during dump.
Pstree image files is opened only once. I don't see any need in opening it with
global helpers.
--
Best regards,
Stanislav Kinsbursky
More information about the CRIU
mailing list