[RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts
sukadev at us.ibm.com
sukadev at us.ibm.com
Wed Aug 20 19:21:26 PDT 2008
I have been trying to address comments from the last patchset and
here is another snapshot of the patches.
Appreciate any feedback on the single/multi-mount semantics (patch 8/8).
See below for changelog and pending stuff
Enable multiple mounts of devpts filesystem so each container can allocate
Supporting multiple mounts of devpts can break user-space, this
feature is enabled only under a new mount option (-o newmnt).
If this option is never specified, this patchset should not change
any behavior. i.e existing single-namespace semantics are preserved
across any remounts of /dev/pts (as long as none of them use the new
option). So old startup scripts should continue to work.
If the '-o newmnt' option is specified, then a new 'private' mount
of devpts is created. ptys in this private instance are independent
of ptys created in other devpts instances. For this to be fully
functionaly, /dev/ptmx must be a symbolic link to '/dev/pts/ptmx'
1. To enable multiple mounts of /dev/pts, (most) devpts interfaces
need to know which instance of devpts is being accessed. This
patchset uses the 'struct inode' of the device being accessed
to identify the appropriate devpts instance. Hence the need for
the /dev/pts/ptmx symlink.
2. See comments in get_sb_ref() in fs/super.c (could not find
existing interfaces that accomplish it) Or is there a better
[PATCH 1/8]: /dev/tty tweak in init_dev()
[PATCH 2/8]: Add inode parameter to devpts interfaces
[PATCH 3/8]: Remove devpts_root global
[PATCH 4/8]: Per-mount allocated_ptys
[PATCH 5/8]: Per-mount config object
[PATCH 6/8]: Extract option parsing to new function
[PATCH 7/8]: Auto-create ptmx node when mounting devpts
[PATCH 8/8]: Enable multiple mounts of devpts
- New mount option '-o newmnt' added (patch 8/8)
- Support both single-mount and multi-mount semantics (patch 8/8)
- Automatically create ptmx node when devpts is mounted (patch 7/8)
- Extract option parsing code to new function (patch 6/8)
- Make 'config' params per-mount variables (patch 5/8)
- Slightly re-ordered existing patches in set (patches 1/8, 2/8)
- Add a config option to enable multiple-mounts of devpts.
- Remove even initial kernel mount of devpts ? (If we do, how
do we preserve single-mount semantics) ?
- Testing :-), check for bisect-safe etc
More information about the Containers