<div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 15, 2014 at 11:03 AM, Pavel Emelyanov <span dir="ltr">&lt;<a href="mailto:xemul@parallels.com" target="_blank">xemul@parallels.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">On 08/15/2014 08:54 PM, Ying Han wrote:<br>
&gt; Ping?<br>
<br>
We all agreed to commit the change that makes _dumping_ of absent properties<br>
non-fatal (I&#39;ll do that soon). As far as writing is concerned -- it looks like<br>
just ignoring the absence of properties from image dumps is not good as generic<br>
solution. Instead, for restore we need some fine-grained control over which<br>
properties to restore and which to ignore.<br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">​Hmm. The one you mentioned above seems to be another patchset which is different from this one. This is purely to fix a bug where trying to write <span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">default value of memory.limit_in_bytes causes unclean restoration. </span></div>

<div class="gmail_default" style="font-size:small"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><br></span></div><div class="gmail_default"><font color="#000000" face="arial, sans-serif">Sorry If i am confused here.</font></div>

<div class="gmail_default"><font color="#000000" face="arial, sans-serif"><br></font></div><div class="gmail_default"><font color="#000000" face="arial, sans-serif">--Ying</font></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<br>
Thanks,<br>
Pavel<br>
<br>
<br>
&gt;<br>
&gt;<br>
&gt; On Wed, Aug 13, 2014 at 11:59 AM, &lt;<a href="mailto:gbellack@google.com">gbellack@google.com</a> &lt;mailto:<a href="mailto:gbellack@google.com">gbellack@google.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     From: Garrison Bellack &lt;<a href="mailto:gbellack@google.com">gbellack@google.com</a> &lt;mailto:<a href="mailto:gbellack@google.com">gbellack@google.com</a>&gt;&gt;<br>
<div class="">&gt;<br>
&gt;     When writing the system default for memory.limit_in_bytes (which is a LLONG_MAX)<br>
&gt;     the write fails. The number is equivalent to -1 (unlimited). So during dump,<br>
&gt;     store the number -1 instead.<br>
&gt;<br>
&gt;     Change-Id: Iafccc96bf5dbade763d7addaeda24194616e4d5f<br>
</div>&gt;     Signed-off-by: Garrison Bellack &lt;<a href="mailto:gbellack@google.com">gbellack@google.com</a> &lt;mailto:<a href="mailto:gbellack@google.com">gbellack@google.com</a>&gt;&gt;<br>
<div><div class="h5">&gt;     ---<br>
&gt;      cgroup.c | 9 +++++++++<br>
&gt;      1 file changed, 9 insertions(+)<br>
&gt;<br>
&gt;     diff --git a/cgroup.c b/cgroup.c<br>
&gt;     index 7ac2dd8..f8dbbde 100644<br>
&gt;     --- a/cgroup.c<br>
&gt;     +++ b/cgroup.c<br>
&gt;     @@ -288,6 +288,7 @@ static int read_cgroup_prop(struct cgroup_prop *property, const char *fpath)<br>
&gt;      {<br>
&gt;             char pbuf[PATH_MAX], buf[100];<br>
&gt;             FILE *f;<br>
&gt;     +       char *endptr;<br>
&gt;<br>
&gt;             if (snprintf(pbuf, PATH_MAX, &quot;%s/%s&quot;, fpath, property-&gt;name) &gt;= PATH_MAX) {<br>
&gt;                     pr_err(&quot;snprintf output was truncated&quot;);<br>
&gt;     @@ -315,6 +316,14 @@ static int read_cgroup_prop(struct cgroup_prop *property, const char *fpath)<br>
&gt;                     return -1;<br>
&gt;             }<br>
&gt;<br>
&gt;     +       if (strtoll(buf, &amp;endptr, 10) == LLONG_MAX)<br>
&gt;     +               strcpy(buf, &quot;-1&quot;);<br>
&gt;     +<br>
&gt;     +       if (strcmp(endptr, &quot;\n&quot;)) {<br>
&gt;     +               pr_perror(&quot;Failed parsing %s, with strtoll\n&quot;, buf);<br>
&gt;     +               return -1;<br>
&gt;     +       }<br>
&gt;     +<br>
&gt;             property-&gt;value = xstrdup(buf);<br>
&gt;             if (!property-&gt;value)<br>
&gt;                     return -1;<br>
&gt;     --<br>
&gt;     2.1.0.rc2.206.gedb03e5<br>
&gt;<br>
&gt;     _______________________________________________<br>
&gt;     CRIU mailing list<br>
</div></div>&gt;     <a href="mailto:CRIU@openvz.org">CRIU@openvz.org</a> &lt;mailto:<a href="mailto:CRIU@openvz.org">CRIU@openvz.org</a>&gt;<br>
&gt;     <a href="https://lists.openvz.org/mailman/listinfo/criu" target="_blank">https://lists.openvz.org/mailman/listinfo/criu</a><br>
&gt;<br>
&gt;<br>
<br>
</blockquote></div><br></div></div>