[CRIU] [PATCH 11/11] tty: Use regular files engine to save paths to the peers

Cyrill Gorcunov gorcunov at gmail.com
Mon Oct 6 09:30:35 PDT 2014


On Mon, Oct 06, 2014 at 05:15:50PM +0400, Cyrill Gorcunov wrote:
> Currently we're using predefined format for master/slave pty peers:
> masters are always /dev/ptmx, while slaves are /dev/pts/$index,
> where $index is the peer number.
> 
> While fitting most of distros this is not always correct and slave peers
> might be mounted to an arbitrary place, so that we need to somehow
> carry paths with ourself in image.
> 
> Instead of bloating current tty image lets use regular file engine instead
> and on checkpoint stage save a path to the link in regfiles set, then on
> restore simply fetch it from the image.

... So using regfile engine won't work with ttys, in particular our
regfile engine is trying to create ghost file for slave pty peer which
is forbidden by the system because one have to open master peer first
before trying to access slave one. Sigh, it was a bad idea from the
very beginning to try to use regfiles engine.

Pavel, could you please apply 1-10 patches which do not change
tty layer behaviour but simply prepare the code for further
modifications. I'll rework the rest without regfiles engine.


More information about the CRIU mailing list