About VVFS
Overview The goal of this project is to provide versioning support for regular files in the vfs layer of the linux kernel. A new file version is created when a file is opened with the write flag. Aside from kernel mode changes two user tools have been developed.
Features
- dirmaxv - A new directory attribute was implemented. It specifies the maximum number of versions allowed for each file within this directory. This attribute can be set and read from the userspace with the help of ioctl commands. If dirmaxv is set to 0 versioning is disabled for this directory.
- version number - The version number is stored within the filename. Name and number are separated by the character '#'. The maximum version number is set to 65000.
- copy on write - Everytime a regular file is opened with write flags a copy of the original addressed file will be created. If the version limit (dirmaxv) is exceeded the oldest version will be deleted.
- copy on rename - If a file is moved into a directory with dirmaxv greater than 0 a new file version is created. On the other hand if a file is moved out of such a directory the source file will be kept.
-
user mode tools - The following user mode tools
have been developed:
- dirmaxv - This program uses the previously described ioctl commands to set and read the directory attribute 'dirmaxv'.
- purge - With the help of this program certain file versions can be deleted. Each call will reset the version number of all files such that the number of the oldest version is zero.
Project roots This project was started as a student thesis at the professorship "Operating Systems and Middleware" lead by Prof. Dr. Andreas Polze at the Hasso-Plattner-Institute (University of Potsdam). The concepts used have their origins in the Files-11 filesystem family of the operating system VMS.
Future development
- thread safety - The current implementation can not be considered as thread safe.
- performance - Right now the whole directory has to be iterated in order to determine the smallest and largest version number. Future implementations should make use of metadata structures.
- incremental versions - Instead of creating a plain copy when a new version is constructed, only the differences between two versions should be stored.