[CRIU] [PATCH 5/5] tty: Use regular files engine to save paths to the peers, v3
Cyrill Gorcunov
gorcunov at gmail.com
Wed Oct 15 03:35:02 PDT 2014
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).
> >
> > This kind of crap should be handled on restore, not on dump. Maybe we better
> > strip this parts on read from image?
>
> No. We should have in the image "real" file name, not the one kernel
> generated for us. If you need it, add an optional bool was_deleted
> flag in the reg-file image, but we already have the needed into in
> the remap image.
Hmm, ok.
More information about the CRIU
mailing list