Re: [PATCH] root-hopping for pre-2.3.41-3

From: H. Peter Anvin (hpa@transmeta.com)
Date: Tue Jan 25 2000 - 19:17:54 EST


Guest section DW wrote:
>
> 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.
> ------------------------------------------------------------------
>
> Excellent!
>
> [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.]
>

Correct. In fact, for autofs v5 I want to be able to support just
exactly that in order to support direct mounts. I discussed a way to do
that with Linus that should avoid adding any additional accesses,
although it probably will require an extra pointer field in the dentry
structure.

        -hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jan 31 2000 - 21:00:15 EST