Checklist/UnlinkedFiles

From Linux Checkpoint / Restart Wiki
(Difference between revisions)
Jump to: navigation, search
m
m
Line 26: Line 26:
 
* During Checkpoint
 
* During Checkpoint
 
*# Save file content to the checkpoint image
 
*# Save file content to the checkpoint image
*# [[Solutions/Relink Re-link the file into the filesystem]]
+
*# [[/Solutions/Relink|Re-link the file into the filesystem]]
 
* During Restart
 
* During Restart
 
*# Restore the file contents from userspace
 
*# Restore the file contents from userspace

Revision as of 03:23, 22 February 2010

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