These filesystems use the generic_file_checkpoint() function to implement checkpoint/restart of a particular open file. This function is useful when:
- 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
- The filesystem contents can be restored from a backup.
- 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.