<div dir="ltr">I couldn't reuse network_unlock() function because it is supposed to be called in different environment and supposed to do different things.<div>Compare this two functions:</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">1956 void network_unlock(void)<br>1957 {<br>1958 pr_info("Unlock network\n");<br>1959 <br>1960 cpt_unlock_tcp_connections();<br>1961 rst_unlock_tcp_connections();<br>1962 <br>1963 if (root_ns_mask & CLONE_NEWNET) {<br>1964 run_scripts(ACT_NET_UNLOCK);<br>1965 network_unlock_internal();<br>1966 }<br>1967 }<br>1968 <br>1969 int gc_network_unlock(void)<br>1970 {<br>1971 /*<br>1972 * Unshared ps tree net ns is destroyed after successful dump.<br>1973 * No need to call network_unlock_internal.<br>1974 * Also don't call ACT_NET_UNLOCK script because we don't<br>1975 * resume/restore ps tree - this call would break<br>1976 * ACT_NET_UNLOCK semantics.<br>1977 */<br>1978 return rst_unlock_tcp_connections();<br>1979 }</blockquote><div><br></div><div>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).</div><div>But I've reused function called clean_one_remap which looks quite good (as for me).</div><div><br></div><div>Are my answers ok for you? If yes I'll send updated series rebased onto the latest criu-dev.</div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-10-12 11:57 GMT+03:00 Pavel Emelyanov <span dir="ltr"><<a href="mailto:xemul@virtuozzo.com" target="_blank">xemul@virtuozzo.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">OK, the series looks reasonable :)<br>
The only thing that bothers me is that link remaps gc does<br>
strange things and introduces a lot of preparatory code (e.g.<br>
the cleanup itself, criu does cleanup already, but performs<br>
it from criu process after restore, why can't we re-use this?)<br>
<br>
So let's figure out the details on 4th patch, fix them if needed<br>
and I'll merge the set :)<br>
<span class="HOEnZb"><font color="#888888"><br>
-- Pavel<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Best regards,<br>Eugene Batalov.</div>
</div>