[CRIU] Dealing with other mount types

Tycho Andersen tycho.andersen at canonical.com
Wed Mar 25 08:15:02 PDT 2015


On Wed, Mar 25, 2015 at 05:43:49PM +0300, Pavel Emelyanov wrote:
> On 03/25/2015 05:09 PM, Tycho Andersen wrote:
> > I don't think so, because it's not external. In:
> > 
> > 79 44 0:38 / /proc rw,nosuid,nodev,noexec,relatime - proc proc rw
> > 80 81 0:38 /sys/net /proc/sys/net rw,nosuid,nodev,noexec,relatime - proc proc rw
> > 81 79 0:38 /sys /proc/sys ro,nosuid,nodev,noexec,relatime - proc proc rw
> > 
> > Here /proc/sys/net is mounted in the /sys dir of it's root fs, which is /proc,
> > which itself is mounted at /proc in /. None of those are external bind mounts,
> 
> Ah, indeed.
> 
> > the paths given as the mount point are just relative to their parent mount
> > instead of the rootfs. So I think (?) all we need to do is walk these paths
> > correctly, and not ask anything else of the user.
> 
> Yes, I agree, it's not external bind mount. But now I don't understand what
> the problem is with the find_fsroot_mount_for() :) Can you explain in more
> details, please?

Right now it just tells me that e.g. /proc/sys doesn't have a proper
root mount and dies. find_fsroot_mount_for() just looks to see if the
root mount is / or if the parent is null. In the /proc/sys case, the
root mount is /sys and the parent mount is /proc, so this check fails.

I think we can just be smarter about how we do this, and strcat all
the mount paths up the tree to see if /proc + /sys == /proc/sys and
then return the / mountinfo from find_fsroot_mount_for() (and I've
tried this, but I haven't got it quite working yet, so maybe I'm wrong
here about which mountinfo to return).

Tycho

> -- Pavel


More information about the CRIU mailing list