Checklist/UnlinkedFiles

From Linux Checkpoint / Restart Wiki
Jump to: navigation, search

Contents

Current Status

Unlinked files and directories are available as file descriptors but are not visible in the filesystem otherwise. Hence, unlike other filesystem content which can often be checkpointed much like a filesystem backup, these files and directories require explicit kernel support.

A task with unlinked files or directories open will cause sys_checkpoint() to return failure. There is an explicit check in the file table checkpoint code which looks for unlinked files and directories.

Issues, Solutions, Impacts

Summary

Issue Solution Current Impact Solution Impact
Files Yes, multiple possible solutions 2 simple lines of code More code, simple and clean.
Directories Same or very similar to files

Details

Alternative solution ideas:

  • Note: unlinked dirs are "easy" -- can't have any content by definition. So we tend to focus on the files in this discussion.
  • During Checkpoint
    1. Save file content to the checkpoint image
    2. Re-link the file into the filesystem
  • During Restart
    1. Restore the file contents from userspace
      • Requires multiple passes through the checkpoint image
      • But is uniform in the sense that it keeps the filesystem restart details firmly in the hands of userspace.
    2. Restore the file contents from kernel
Personal tools