[PATCH] root-hopping for pre-2.3.41-3
H. Peter Anvin
hpa en transmeta.com
Mar Ene 25 22:25:28 CST 2000
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 en transmeta.com> at work, <hpa en 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 en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Más información sobre la lista de distribución Ayuda