[CRIU] [PATCH 29/32] tools: cpt2 -- Add writing of per-task images
Pavel Emelyanov
xemul at parallels.com
Mon Apr 1 07:06:09 EDT 2013
On 04/01/2013 02:59 PM, Cyrill Gorcunov wrote:
> On Mon, Apr 01, 2013 at 02:31:11PM +0400, Pavel Emelyanov wrote:
>>> +
>>> + ret = write_task_netdev(ctx, t);
>>> + if (ret) {
>>> + pr_err("Failed writing netdev for task %d\n",
>>> + t->ti.cpt_pid);
>>> + goto out;
>>> + }
>>> +
>>> + ret = write_task_ifaddr(ctx, t);
>>> + if (ret) {
>>> + pr_err("Failed writing ifaddr for task %d\n",
>>> + t->ti.cpt_pid);
>>> + goto out;
>>> + }
>>> +
>>> + ret = write_task_route(ctx, t);
>>> + if (ret) {
>>> + pr_err("Failed writing route for task %d\n",
>>> + t->ti.cpt_pid);
>>> + goto out;
>>> + }
>>
>> When have netdevs, ifaddrs and routes become per-task information?
>
> int dump_net_ns(int pid, struct cr_fdset *fds)
> {
> int ret;
>
> ret = switch_ns(pid, &net_ns_desc, NULL);
> if (!ret)
> ret = dump_links(fds);
> if (!ret)
> ret = dump_ifaddr(fds);
> if (!ret)
> ret = dump_route(fds);
>
> return ret;
> }
>
> as far as I understand we dump info for task which has own ns.
Tasks can share namespaces, can't they? Plz, fix this write_-s.
> .
>
More information about the CRIU
mailing list