[CRIU] [PATCH v4 00/12] criu gc command implementation
Eugene Batalov
eabatalov89 at gmail.com
Mon Oct 24 14:17:37 PDT 2016
I couldn't reuse network_unlock() function because it is supposed to be
called in different environment and supposed to do different things.
Compare this two functions:
1956 void network_unlock(void)
> 1957 {
> 1958 pr_info("Unlock network\n");
> 1959
> 1960 cpt_unlock_tcp_connections();
> 1961 rst_unlock_tcp_connections();
> 1962
> 1963 if (root_ns_mask & CLONE_NEWNET) {
> 1964 run_scripts(ACT_NET_UNLOCK);
> 1965 network_unlock_internal();
> 1966 }
> 1967 }
> 1968
> 1969 int gc_network_unlock(void)
> 1970 {
> 1971 /*
> 1972 * Unshared ps tree net ns is destroyed after successful dump.
> 1973 * No need to call network_unlock_internal.
> 1974 * Also don't call ACT_NET_UNLOCK script because we don't
> 1975 * resume/restore ps tree - this call would break
> 1976 * ACT_NET_UNLOCK semantics.
> 1977 */
> 1978 return rst_unlock_tcp_connections();
> 1979 }
Also I couldn't completely reuse link remaps deletion code from cr-restore
because it is coupled with cr-restore logic (prepare_fd_pid(), and file
descriptors opening in each ps tree process).
But I've reused function called clean_one_remap which looks quite good (as
for me).
Are my answers ok for you? If yes I'll send updated series rebased onto the
latest criu-dev.
2016-10-12 11:57 GMT+03:00 Pavel Emelyanov <xemul at virtuozzo.com>:
> OK, the series looks reasonable :)
> The only thing that bothers me is that link remaps gc does
> strange things and introduces a lot of preparatory code (e.g.
> the cleanup itself, criu does cleanup already, but performs
> it from criu process after restore, why can't we re-use this?)
>
> So let's figure out the details on 4th patch, fix them if needed
> and I'll merge the set :)
>
> -- Pavel
>
--
Best regards,
Eugene Batalov.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20161025/7b658f3d/attachment.html>
More information about the CRIU
mailing list