Use fdstore to keep mnt_ns descriptors

Submitted by Kirill Tkhai on June 7, 2017, 3:14 p.m.

Details

Reviewer None
Submitted June 7, 2017, 3:14 p.m.
Last Updated June 8, 2017, 3:20 a.m.
Revision 1

Cover Letter

[1/5] is fix for the case, when criu may reuse service fd.
[2-5/5] put mnt_ns descriptors in fdstore. This decrises
number of files, that need to be closed in close_old_fds().
Also, it's a preparation for mnt_ns->user_ns support.

---

Kirill Tkhai (5):
      files: Fix crossing unused and service fds of shared fd tables
      mnt_ns: Move open_proc() up in prepare_mnt_ns()
      utils: Introduce SWAP() helper to exchange two variables
      mnt: Move ns_fd assignment down in prepare_mnt_ns()
      mnt_ns: Use fdstore to keep mount namespaces


 criu/files.c              |    4 ++--
 criu/include/namespaces.h |    2 +-
 criu/include/pid.h        |    8 ++------
 criu/include/servicefd.h  |    4 +++-
 criu/mount.c              |   28 ++++++++++++++--------------
 criu/servicefd.c          |   12 ++++++++++--
 include/common/compiler.h |    7 +++++++
 7 files changed, 39 insertions(+), 26 deletions(-)

--
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
  

Revisions