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

Pavel Emelyanov xemul at parallels.com
Wed Oct 15 03:41:19 PDT 2014


On 10/15/2014 02:35 PM, Cyrill Gorcunov wrote:
> On Wed, Oct 15, 2014 at 02:24:12PM +0400, Pavel Emelyanov wrote:
>>>
>>> Yes, have to use fake peers here as well, previously we opened them explicitly by
>>> paths but now we're switching to reg-files engine, so need fake reg-file enties too.
>>
>> But you allocate more than just a reg-file entry. You allocate
>> the whole tty-info. What for?
> 
> Because I need to carry index somewhere, tty engine operates with tty-info
> structures (112 bytes), so for me it's convenient to work with it. Look,
> fake tty-info is not that common case, once more images are using reg-d
> records we simply need them for ctl terminal restore and unpaired slaves,
> moreover after a couple of releases I think we can require reg-d records
> to present and not generate fake peers at all simply opening fake master
> and ctl termianl from reg-directly (this will require more code so I
> left it untouched for a while).

I'm not worried with fake reg-d entries (yet). I'm worried by fake tty-info-s.
As far as I see from the code you only need reg-d entry from it and in one
case the index.

Can you make the pty_open_ptmx_index use index and reg-d as and argument and 
make the others just give it to one? This would eliminate the whole fake
tty-info allocation.



More information about the CRIU mailing list