GenericCheckpointableFilesystems

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

These filesystems use the generic_file_checkpoint() function to implement checkpoint/restart of a particular open file. This function is useful when:

  1. The filesystem contents can be backed up by one or more example methods below:
    • rsync can be used to backup the filesystem contents
    • filesystem "checkpoints" and/or "snapshots" -- e.g. btrfs
    • fs freeze, block-level duplication, fs thaw
  2. The filesystem contents can be restored from a backup.
  3. The seek operation works.


Some filesystems utilize special "control" pseudo-files which give userspace an interface to filesystem-specific capabilities. These files currently lack .checkpoint operations and may be unable to use generic_file_checkpoint(). Hence filesystem tools that hold these files open for extended periods of time are likely to cause checkpoint to fail as with any uncheckpointable file. Depending on the interface, checkpoint of these control files could be incredibly easy to implement:

  • As simple as using generic_file_checkpoint() if the contents read from the file can be written.
  • TODO an "empty_file_checkpoint()" if there are no contents to the file and each "operation" that the control file allows is "atomic"
  • A custom, yet simple operation if the one-value-per-file rule is observed.
Personal tools