[Devel] Re: [RFC][PATCH 0/6] Enable multiple mounts of devpts

sukadev at us.ibm.com sukadev at us.ibm.com
Mon Aug 4 18:53:34 PDT 2008


H. Peter Anvin [hpa at zytor.com] wrote:
> sukadev at us.ibm.com wrote:
>> If devpts is mounted more than once, then '/dev/ptmx' must be a symlink
>> to '/dev/pts/ptmx' and in each new devpts mount we must create the
>> device node '/dev/pts/ptmx' [c, 5;2] by hand.
>
> This should be auto-created.  That also eliminates any need to support the 
> mknod system call.

Ok. But was wondering if we can pass the ptmx symlink burden to the
'container-startup sripts' since they are the ones that need the second
or subsequent mount of devpts.

So, initially and for systems that don't need multiple mounts of devpts,
existing behavior can continue (/dev/ptmx is a node).

Container startup scripts have to anyway remount /dev/pts and mknod
/dev/pts/ptmx. These scripts could additionally check if /dev/ptmx is
a node and make it a symlink. The container script would have to do
this check while it still has access to the first mount of devpts
and mknod in the first devpts mnt.

But then again, the first mount is still special in the kernel.

>
>> Appreciate comments on overall approach of my mapping from the inode
>> to sb->s_fs_info to allocated_ptys and the hacky use of get_sb_nodev(),
>> and also on the tweak to init_dev() (patch 6).
>> Todo:
>> 	User-space impact of /dev/ptmx symlink - Options are being
>> 	discussed on mailing list (new mount option and config token,
>> 	new fs name, etc)
>> 	Remove even initial kernel mount of devpts ?
>
> The initial kernel mount of devpts should be removed, since that instance 
> will never be accessible.
>
> 	-hpa
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list