[CRIU] link_remap_ok
Pavel Emelyanov
xemul at parallels.com
Thu Feb 26 14:08:13 PST 2015
On 02/27/2015 12:58 AM, beproject criu wrote:
> __properties_ is present at this path
> /sdcard # lxc-attach -n L -- ls /usr/local/lib/lxc/rootfs/root/dev/__properties__ -l
> -r--r--r-- 1 0 0 131072 Feb 26 18:07 /usr/local/lib/lxc/rootfs/root/dev/__properties__
> /sdcard #
If the file exists then link remap shouldn't be created. This is the code that
is involved in this decision:
In check_path_remap():
ret = fstatat(mntns_root, rpath, &pst, 0);
This is where your path is being fstat-ed and:
if (ret < 0) {
/*
* Linked file, but path is not accessible (unless any
* other error occurred). We can create a temporary link to it
* uning linkat with AT_EMPTY_PATH flag and remap it to this
* name.
*/
if (errno == ENOENT)
return dump_linked_remap(rpath + 1, plen - 1,
ost, lfd, id, nsid);
link remap decision is taken. If you file exists then fstatat() should have
failed. Can you put more debug in this place checking what path is stat-ed
and finding out where the mntns_root() fd points?
Thanks,
Pavel
>
>
> On Fri, Feb 27, 2015 at 3:14 AM, Pavel Emelyanov <xemul at parallels.com <mailto:xemul at parallels.com>> wrote:
>
> On 02/27/2015 12:33 AM, beproject criu wrote:
> > This is the error when is used --link-remap option:
> > Error (files-reg.c:508): Can't link remap to /usr/local/lib/lxc/rootfs/root/dev/__properties__: No such file or directory
>
> Hm... The error ENOENT appears either because either a) criu is run not from user or
> inside user namespace or b) the dirname of the path in question doesn't exits.
>
> Can you find out which of the above is your case?
>
> > Also i have another error
> > Error (mount.c:624): 53:./dev/console doesn't have a proper root mount
>
> This is because /dev/console is bind-mounted from outside. Should be fixed by the
> --ext-mount-map option.
>
> > Thanks.
> >
> > On Fri, Feb 27, 2015 at 1:10 AM, Pavel Emelyanov <xemul at parallels.com <mailto:xemul at parallels.com> <mailto:xemul at parallels.com <mailto:xemul at parallels.com>>> wrote:
> >
> > On 02/26/2015 10:31 PM, beproject criu wrote:
> > > Hi,
> > > What is the significance of "link_remap_ok" in cr_options
> >
> > This allows CRIU to modify your filesystem with temporary links
> > needed to restore files.
> >
> > http://criu.org/Invisible_files
> >
> > > I am getting following error wihile dumping fd.What could be the reason
> > >
> > > (02.230588) Error (files-reg.c:472): Can't create link remap for /usr/local/lib/lxc/rootfs/root/dev/__properties__. Use link-remap option.
> >
> > Use the link-remap option ;)
> >
> > # ./criu --help | fgrep link-remap
> > --link-remap allow to link unlinked files back when possible
> >
> > Thanks,
> > Pavel
> >
> >
> >
>
>
More information about the CRIU
mailing list