FSVS
uses various files to store its configuration and informations about the system it is running on.
More...
Per working copy | |
These are stored in a subdirectory of the WAA, named by the MD5-sum of the WC-path. | |
#define | WAA__DIR_EXT "dir" |
#define | WAA__IGNORE_EXT "Ign" |
#define | WAA__URLLIST_EXT "Urls" |
#define | WAA__URL_REVS "revs" |
#define | WAA__COPYFROM_EXT "Copy" |
Per file/directory | |
The cached informations (per-file) are located in the | |
#define | WAA__FILE_MD5s_EXT "md5s" |
#define | WAA__PROP_EXT "prop" |
#define | WAA__CONFLICT_EXT "cflct" |
Temporary copy/move detection database | |
Entries are addressed by name. | |
#define | WAA__FILE_INODE_EXT "fino" |
For files. | |
#define | WAA__DIR_INODE_EXT "dino" |
For directories. | |
#define | WAA__FILE_NAME_EXT "fname" |
For files. | |
#define | WAA__DIR_NAME_EXT "dname" |
For directories. | |
Short names for the open modes. | |
| |
#define | WAA__WRITE (O_WRONLY | O_CREAT | O_TRUNC) |
#define | WAA__READ (O_RDONLY) |
#define | WAA__APPEND (O_APPEND | O_CREAT) |
FSVS
uses various files to store its configuration and informations about the system it is running on.
Two file trees are used:
/var/spool/fsvs
(if not overridden by $FSVS_WAA). The WAA stores volatile data that should not be backed up; the files have only lower-case letters. /etc/fsvs
(or $FSVS_CONF) This is used to store configuration data, eg. for the working copies. The names of files stored here have the first letter in upper-case. Having this data backed-up (eg. along with the rest of the filesystem) allows easy recovery of the configuration. The single exception are the dir files; these are, strictly seen, per working copy, but are stored in the spool directory, as they are reconstructed on restore and would only give conflicts with old versions. FSVS
, to have the ignore patterns and URL list stored; and in fact that would happen automatically if you have /etc
as working copy. Generally a path can be of (nearly) arbitrary length, and have every character (except NUL
[\0
]) in it.
So wherever pathnames or similar things are stored (eg. patterns), they are NUL
-terminated; for addressing specific files the MD5 hash over the filename is used.
The written data sets normally have linefeeds (\n
) in them, to ease inspection in an editor.
Please see waa.c for more details.
#define WAA__APPEND (O_APPEND | O_CREAT) |
Definition at line 184 of file waa.h.
Referenced by res__mark_conflict().
#define WAA__CONFLICT_EXT "cflct" |
List of other conflict files. Defined as filename\0\nfilename\0\n...
Definition at line 157 of file waa.h.
Referenced by res__mark_conflict(), and res__remove_aux_files().
#define WAA__COPYFROM_EXT "Copy" |
Hash of copyfrom relations. The key is the destination-, the value is the source-path; they are stored relative to the wc root, without the leading "./"
, ie. as "dir/test"
. The \0
is included in the data.
Definition at line 131 of file waa.h.
Referenced by cm___dump_list(), cm___get_base_source(), cm___make_copy(), and sync__work().
#define WAA__DIR_EXT "dir" |
List of files/subdirs/devices/symlinks in and below this working copy directory.
The filelists remember the last committed state of entries. That includes the ctime, mtime, unix-mode (with flags for directory/device/symlink/file), MD5 sum, size in bytes, inode, tree relation, number of child nodes, user and group, and filename. The path can be recreated from the tree-structure and the filenames.
The header includes fields such as header version, header length, number of entries, needed space for the filenames, and the length of the longest path - most of that for memory allocation.
See also waa__output_tree().
Definition at line 111 of file waa.h.
Referenced by delay__work(), and waa__open_dir().
#define WAA__FILE_MD5s_EXT "md5s" |
List of MD5s of the manber blocks of a file.
To speed up comparing and committing large files, these files hold a list of MD5 hashes for the manber blocks.
This way big files don't have to be hashed in full to check whether they've changed; and the manber blocks can be used for the delta algorithm.
Maybe the parameters for manber hashing should be stored there, too - currently they're hardcoded.
Furthermore in the WAA directory of the working copy we store a (temporary) file as an index for all entries' MD5 checksums.
Definition at line 151 of file waa.h.
Referenced by cs___update_manber(), cs__read_manber_hashes(), rev__install_file(), sync__progress(), and up__unlink().
#define WAA__IGNORE_EXT "Ign" |
List of groupings ("Identification Groups for New entries", formally "Ignore patterns"). They consist of a header with the number of patterns, followed by the group, a whitespace, and the pattern (as, string with options); NUL
-terminated, LF
-separated.
Definition at line 117 of file waa.h.
Referenced by ign__load_list(), and ign__save_ignorelist().
#define WAA__PROP_EXT "prop" |
List of other properties. These are properties not converted to meta-data.
Definition at line 154 of file waa.h.
Referenced by prp__open_byname(), prp__unlink_db_for_estat(), sync__progress(), and up__unlink().
#define WAA__READ (O_RDONLY) |
Definition at line 183 of file waa.h.
Referenced by cs__read_manber_hashes(), ign__load_list(), res__remove_aux_files(), url__load_list(), and waa__input_tree().
#define WAA__URL_REVS "revs" |
Current revisions of the URLs. Very similar to WAA__URLLIST_EXT
(see url__load_list()). These are split into a separate file, so that no data in /etc
is changed after a commit.
Definition at line 126 of file waa.h.
Referenced by url__load_list(), and url__output_list().
#define WAA__URLLIST_EXT "Urls" |
List of URLs. They consist of a header with the number of URLs, followed by the URLs themselves; NUL
-terminated, LF
-separated.
Definition at line 121 of file waa.h.
Referenced by delay__work(), url__load_list(), and url__output_list().
#define WAA__WRITE (O_WRONLY | O_CREAT | O_TRUNC) |
Definition at line 182 of file waa.h.
Referenced by cs___update_manber(), ign__save_ignorelist(), res__mark_conflict(), url__output_list(), and waa__output_tree().