<div dir="ltr">Hi Cyrill,<div><br></div><div>Thanks for the patch.  As you&#39;ve probably already seen on Github, the issue is that during dump new-&gt;root is saved as /null//deleted, causing failure during restore.</div><div><br></div><div>Although with your patch strip_deleted() removes both &quot; (deleted)&quot; and &quot;//deleted&quot;, new-&gt;root never makes it to strip_deleted().</div><div><br></div><div>As a quick test, I removed &quot;//deleted&quot; from new-&gt;root in parse_mountinfo_ent() and C/R works!</div><div><br></div><div>Hope this helps.</div><div><br></div><div>--Saied</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 28, 2015 at 1:03 AM, Cyrill Gorcunov <span dir="ltr">&lt;<a href="mailto:gorcunov@openvz.org" target="_blank">gorcunov@openvz.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">At moment here are two postfixes kernel supports,<br>
so rework the routine to handle both.<br>
<br>
Signed-off-by: Cyrill Gorcunov &lt;<a href="mailto:gorcunov@openvz.org">gorcunov@openvz.org</a>&gt;<br>
---<br>
 files-reg.c | 30 +++++++++++++++++++++++-------<br>
 1 file changed, 23 insertions(+), 7 deletions(-)<br>
<br>
diff --git a/files-reg.c b/files-reg.c<br>
index 2a6269b2a550..1a89e45a89bd 100644<br>
--- a/files-reg.c<br>
+++ b/files-reg.c<br>
@@ -647,16 +647,32 @@ static inline bool nfs_silly_rename(char *rpath, const struct fd_parms *parms)<br>
<br>
 static void strip_deleted(struct fd_link *link)<br>
 {<br>
-       const char postfix[] = &quot; (deleted)&quot;;<br>
-       const size_t plen = strlen(postfix);<br>
+       struct dcache_prepends {<br>
+               const char      *str;<br>
+               size_t          len;<br>
+       } static const prepends[] = {<br>
+               {<br>
+                       .str    = &quot; (deleted)&quot;,<br>
+                       .len    = 10,<br>
+               }, {<br>
+                       .str    = &quot;//deleted&quot;,<br>
+                       .len    = 10,<br>
+               }<br>
+       };<br>
+       size_t i;<br>
+<br>
+       for (i = 0; i &lt; ARRAY_SIZE(prepends); i++) {<br>
+               size_t at;<br>
+<br>
+               if (link-&gt;len &lt;= prepends[i].len)<br>
+                       continue;<br>
<br>
-       if (link-&gt;len &gt; plen) {<br>
-               size_t at = link-&gt;len - plen;<br>
-               if (!strcmp(&amp;link-&gt;name[at], postfix)) {<br>
+               at = link-&gt;len - prepends[i].len;<br>
+               if (!strcmp(&amp;link-&gt;name[at], prepends[i].str)) {<br>
                        pr_debug(&quot;Stip %s&#39; tag from &#39;%s&#39;\n&quot;,<br>
-                                postfix, link-&gt;name);<br>
+                                prepends[i].str, link-&gt;name);<br>
                        link-&gt;name[at] = &#39;\0&#39;;<br>
-                       link-&gt;len -= plen;<br>
+                       link-&gt;len -= prepends[i].len;<br>
                }<br>
        }<br>
 }<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.4.3<br>
<br>
</font></span></blockquote></div><br></div>