criu/images
Kirill Tkhai 7a6fe6f0ca files: Move CTL_TTY_OFF fixup to generic file engine
There are two problems. The first is CTL_TTY_OFF occupies
one of the biggest available fds in the system. It's a number
near service_fd_rlim_cur. Next patches want to allocate
service fds lower, than service_fd_rlim_cur, and they want
to know max used fd from file fles after the image reading.

But since one of fds is already set very big (CTL_TTY_OFF)
on a stage of collection fles, the only availabe service
fds are near service_fd_rlim_cur. It's vicious circle,
and the only way is to change ctl tty fd allocation way.

The second problem is ctl tty is ugly out of generic file
engine fixup (see open_fd()). This is made because ctl tty
is the only slave fle, which needs additional actions
(see tty_restore_ctl_terminal()). Another file types just
receive their slave fle, and do not do anything else.

This patch moves ctl tty to generic engine and solves all
the above problems. To do that, we implement new CTL_TTY
file type, which open method waits till slave tty is received
and then calls tty_restore_ctl_terminal() for that. It fits
to generic engine well, and allocates fd via find_unused_fd(),
and do not polute file table by big fd numbers.

Next patch will kill currently unneed CTL_TTY leftovers
and will remove CTL_TTY_OFF service fd from criu.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-03-02 10:10:41 +03:00
..
google/protobuf build: Move @protobuf dir into @images 2016-02-15 15:32:27 +03:00
autofs.proto images: add syntax specifier to autofs.proto 2016-10-10 12:49:28 +03:00
binfmt-misc.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
cgroup.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
core-aarch64.proto core-aarch64: mark gregs and clear_tid_addr as (criu).hex 2016-10-24 16:00:15 +03:00
core-arm.proto core-arm: mark gregs and clear_tid_addr as (criu).hex 2016-10-24 16:00:15 +03:00
core-ppc64.proto core-ppc64: mark gregs and clear_tid_addr as (criu).hex 2016-10-24 16:00:15 +03:00
core-s390.proto s390: Add runtime-instrumentation support 2017-10-17 08:40:44 +03:00
core-x86.proto criu: arch, x86 -- Rename registers mode 2017-03-14 23:58:07 +03:00
core.proto s390:proto: Add s390 to protocol buffer files 2017-08-09 18:51:41 +03:00
cpuinfo.proto s390:proto: Add s390 to protocol buffer files 2017-08-09 18:51:41 +03:00
creds.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
eventfd.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
eventpoll.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
ext-file.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
fdinfo.proto files: Move CTL_TTY_OFF fixup to generic file engine 2018-03-02 10:10:41 +03:00
fh.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
fifo.proto fifo: Generate unique ID for satellite regfile entry 2017-10-17 11:41:50 +03:00
file-lock.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
fown.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
fs.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
fsnotify.proto fsnotify: don't save mnt_id if a mount namepsace isn't dumped 2017-05-19 09:33:02 +03:00
ghost-file.proto ghost: Add chunked ghost files 2017-07-18 09:34:44 +03:00
inventory.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
ipc-desc.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
ipc-msg.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
ipc-sem.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
ipc-shm.proto ipc: Keep shmem segments contents into pagemap/page images 2017-04-11 09:01:10 +03:00
ipc-var.proto ipc/sysctl: c/r kernel.{msg_next_id,sem_next_id,shm_next_id} 2016-09-06 18:58:26 +03:00
macvlan.proto images: add syntax declaration to macvlan.proto 2016-11-03 18:15:02 +03:00
Makefile net: Dump regular sit device 2017-10-17 10:48:46 +03:00
mm.proto mem: add dump state of THP_DISABLED prctl 2017-09-16 12:30:22 +03:00
mnt.proto mount: save ext_real_root for external mounts 2017-04-02 18:12:10 +03:00
netdev.proto net: dump and restore connected to a bridge links 2018-02-15 21:45:08 +03:00
ns.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
opts.proto crit: Beautify unix names recode 2017-04-11 09:01:11 +03:00
packet-sock.proto net: save network namespaces for sockets 2018-02-15 19:45:49 +03:00
pagemap.proto crit: translate pagemap flags into strings 2017-09-16 09:16:33 +03:00
pipe-data.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
pipe.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
pstree.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
regfile.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
remap-file-path.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
rlimit.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
rpc.proto service: allow to execute page-server as a child process 2017-11-23 20:23:23 +03:00
sa.proto restore/x86: call int80 for compat sigaction restore 2017-03-14 23:58:06 +03:00
seccomp.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
siginfo.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
signalfd.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
sit.proto net: Dump regular sit device 2017-10-17 10:48:46 +03:00
sk-inet.proto net: save network namespaces for sockets 2018-02-15 19:45:49 +03:00
sk-netlink.proto net: save network namespaces for sockets 2018-02-15 19:45:49 +03:00
sk-opts.proto sk-inet: restore a value of SO_REUSEPORT 2017-11-23 20:23:14 +03:00
sk-packet.proto SCM: Dump and restore SCM_RIGHTs 2017-10-17 11:41:51 +03:00
sk-unix.proto net: save network namespaces for sockets 2018-02-15 19:45:49 +03:00
stats.proto stats: add counters for pipes and page_pipe_bufs 2017-11-23 20:23:14 +03:00
sysctl.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
tcp-stream.proto tcp: dump and restore window parameters 2016-08-08 15:20:47 +03:00
time.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
timer.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
timerfd.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
tty.proto tty: Generate unique ID for satellite regfile entry 2017-10-17 11:41:50 +03:00
tun.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
userns.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
utsns.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
vma.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00