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

H. Peter Anvin hpa at zytor.com
Mon Aug 4 18:55:46 PDT 2008

sukadev at us.ibm.com wrote:
> 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).

First of all, thanks for taking this on :)  It's always delightful to 
spout some ideas and have patches appear as a result :)

Once you have the notion of the device nodes tied to a specific devpts 
filesystem, a lot of the operations can be trivialized; for example, the 
whole devpts_get_tty() mechanism can be reduced to:

	if (inode->i_sb->sb_magic != DEVPTS_SUPER_MAGIC) {
		/* do cleanup */
		return -ENXIO;
	tty = inode->i_private;

This is part of what makes this whole approach so desirable: it actually 
allows for some dramatic simplifications of the existing code.

One can even bind special operations to both the ptmx node and slave 
nodes, to bypass most of the character device and tty dispatch.  That 
might require too much hacking at the tty core to be worth it, though.


More information about the Containers mailing list