2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-27 20:37:57 +00:00

6 Commits

Author SHA1 Message Date
Pavel Emelyanov
60738eaa78 files: Rework send/recv-fds to be more generic
Remove getting opts from descriptors out from scm engine,
this stuff is pure criu thing, so make it collect the data.

The tricky change here is that parasite code needs memory
to keep fd_opts on. The memory is taken from parasite args
region, which is now bigger than it used to be. But that's
not a big deal, as previously this space was allocated on
the parasite stack (!, but with smaller chunks).

On the other hand, now we have one memcpy less, as opts are
put directly into the destination buffer.

travis-ci: success for files: Rework send/recv-fds to be more generic
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-12-12 16:22:19 +03:00
Cyrill Gorcunov
a1f674e34b scm: common -- Hide struct fd_opts argument
When SCM_FDSET_HAS_OPTS is not set the scm-code.c
can't be built because it declares struct fd_opts
in parameters. Lets rather hide this type and
allow to build without SCM_FDSET_HAS_OPTS definition.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-12-12 16:07:50 +03:00
Cyrill Gorcunov
187377a526 scm: scm_fdset_init -- Drop unused @with_flags argument
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-12-12 16:07:41 +03:00
Pavel Emelyanov
7279c0e7b4 scm: Compile out opts management
In pure-compel library messing with opts is not required,
only criu and criu's pie will need it, so make it possible
to compile out common/scm-code's opts management.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-12-12 16:07:15 +03:00
Pavel Emelyanov
bc102ea1bf scm: Define __memcpy
Depending on the code using it, memcpy will be different.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-12-12 16:07:06 +03:00
Pavel Emelyanov
554d0f0ab4 scm: Move fd-sending core code AS IS into include/common/
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-12-12 16:06:50 +03:00