[lkml]   [2000]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] root-hopping for pre-2.3.41-3
    On Tue, Jan 25, 2000 H. Peter Anvin wrote:

    pivot_root("new_root", "old_root");

    This will detach the path "new_root" and turn it into the new root,
    and *then* attach the *old* root, now detached, to the path
    "old_root", which must be a valid mount point (i.e. directory) in the
    new root.


    [But let us be careful. Mounting a filesystem is taking a path /path
    and letting it be an alias for the root directory of the filesystem.
    Some Unix flavours allow overmounting, where more than one filesystem
    is mounted on the same path - maybe Linux doesnt allow that today,
    it didnt last time I checked, but still I suppose it would be good
    to define the semantics of pivot_root() in such a case.]

    Werner added:

    > > > ... with an implicit "chroot everybody on / to /new_root". That would
    > > > solve a few problems, yes. I'll give it a try.

    and Peter answered

    > > Right... everyone on the old / move to the new /, although I guess
    > > that's technically not 100% necessary.

    but I wonder.
    Usually in such a situation not many processes will be around, but still..
    It would be strange if the interpretation of paths suddenly changed for
    processes other than the one doing this pivot_root.
    So, I would prefer these old processes all to remain where they are,
    with the same root inode (that just got a new name, namely /old_root).

    Thus, the only process that would get the new / as root would be the
    process doing this pivot_root() (and perhaps init?).


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:56    [W:0.019 / U:103.148 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site