ghost dirs: Make ordered cleanup

Submitted by Cyrill Gorcunov on Feb. 27, 2019, 1:34 p.m.

Details

Reviewer None
Submitted Feb. 27, 2019, 1:34 p.m.
Last Updated Feb. 28, 2019, 2:12 a.m.
Revision 1

Cover Letter

In the series we make ghost dirs to be ordered so in case
if some of them were subdirs of another the cleanup would
pass.

As mentioned in third patch this series doesn't cover all
issues with ghost dentries but only a one case which triggered
on a customer machine. The rest potential problems require
more significant code rework which I plan to implement once
time permit.

Cyrill Gorcunov (4):
  util: Add mkdirpat_precise helper
  files: Add file_remap_init
  files: Rework clean_one_remap to order ghost dirs removal
  test: Add unlink_dir test

 criu/files-reg.c              | 118 +++++++++++++++++++++++++++++---
 criu/include/files-reg.h      |   9 +++
 criu/include/util.h           |   6 +-
 criu/util.c                   |  41 ++++++++----
 test/zdtm/static/Makefile     |   1 +
 test/zdtm/static/unlink_dir.c | 123 ++++++++++++++++++++++++++++++++++
 6 files changed, 275 insertions(+), 23 deletions(-)
 create mode 100644 test/zdtm/static/unlink_dir.c
  

Revisions