Add support of deleted unix sockets

Submitted by Cyrill Gorcunov on May 10, 2018, 2:57 p.m.


Reviewer None
Submitted May 10, 2018, 2:57 p.m.
Last Updated June 10, 2018, 12:39 a.m.
Revision 4

Cover Letter

Cyrill Gorcunov (8):
  sockets: Add sock_type_name and tcp_state_name helpers
  unix: Unify id and ino prints
  unix: Move unix_resolve_name declaration on top
  unix: Rename unlink_stale to unlink_sk
  unix: Use decimal format for inode printing
  unix: Add support of ghost sockets
  unix: Improve debug message when collecting socket
  unix: test -- Add sk-unix01 test

 - reworked name trasition on uuid based scheme
 - print inodes in decimal form

 - Use fdstore to keep deleted sockets
 - Fix for pid_rst_prio

 - rework bind_on_deleted to do all work inside,
   thus no need for additional status bits: for
   this sake we setup file permissions immediately
   after the binding procedure together with unlinking
   socket from the filesystem
 - keep in mind that we still unlink stale sockets before
   creating new ones even for ghosts since restore procedure
   may be interrupted by os at any moment (leaving stale
   sockets on disk) and we should not fail on second restore

 criu/cr-restore.c               |   4 +
 criu/include/sockets.h          |   4 +
 criu/sk-unix.c                  | 490 +++++++++++++++++++++++++++++++---------
 criu/sockets.c                  |  44 ++++
 test/zdtm/static/Makefile       |   1 +
 test/zdtm/static/sk-unix01.c    | 367 ++++++++++++++++++++++++++++++
 test/zdtm/static/sk-unix01.desc |   1 +
 7 files changed, 804 insertions(+), 107 deletions(-)
 create mode 100644 test/zdtm/static/sk-unix01.c
 create mode 100644 test/zdtm/static/sk-unix01.desc


SERIES REVISION LOOKS STRANGE. Please double-check patch list and the ordering before proceeding.

Patches download mbox