[systemd-devel] Question about nspawn.c
Stef Bon
stefbon at gmail.com
Wed Aug 24 05:38:23 PDT 2011
Please let me explain why I think this is strange to me:
in line 713 there is a call to clone, so here the cloned child process
has it's own namespace.
in line 759 all the submount like proc, dev and sys are done on the
directory to change to.
in line 775 the mount is done were talking about, using arg_directory
A bind mount I can understand, but a move?? Moving the root to
arg_directory will overwrite the just
created mounts done in line 759?
These mounts are created in this namespace...
Stef
2011/8/24 Lennart Poettering <lennart at poettering.net>:
> On Wed, 24.08.11 11:41, Stef Bon (stefbon at gmail.com) wrote:
>
>>
>> I see, but why the MS_MOVE?
>
> In the namespace we are not interested anymore in the original mount. We
> want to move it to our root dir.
>
>> As I already tried to explain, a move is a little bit strange, you do
>> not want to move the root.
>
> Actually I do. Remember this is in the private namespace!
>
>> Does the combination MS_BIND | MS_MOVE first do a bind, and moves that
>> bind to the desired location?? If this is the case, it makes more
>> sense.
>
> Thinking about it I figure MS_MOVE might actually suffice. Not sure.
>
> Lennart
>
> --
> Lennart Poettering - Red Hat, Inc.
>
More information about the systemd-devel
mailing list