Next: Reconstruction Environment
Up: Reconstruction
Previous: Reconstruction
The Reconstruction Extension
The MBFS open() call in the kernel, category, and filename matching
interfaces optionally support a reconstruction parameter defined by
the following structure:
typedef struct {
char *reconstruction_rule;
envp *environment[];
int num_dependencies;
char *dependencies[];
int data_freshness;
Bool reconstruct_immediately;
} mbfs_reconstruction;
- reconstruction_rule:
- A string containing the
command-line that the system should execute to reconstruct the file.
- environment:
- An array of environment variables and values to
be set in the shell before invocation of this file's reconstruction
rule. If NULL, the current environment in assumed.
- data_freshness:
- Specifies how ``up-to-date'' the contents
should be with respect to it's dependencies:
- LATEST_DATA - This corresponds to a guarantee that the
file will always contain the newest possible data. The file should be
reconstructed if any of its dependencies have changed. This feature
can be used to implement intentional files.
- VERSION_DATA - The system guarantees that some version of the
file data exists, not necessarily the latest. Unlike LATEST_DATA,
the file's contents are not regenerated when a dependency changes.
Only if the data is lost will the data be regenerated. If a
dependency is deleted, the reconstruction rule cannot be executed, so
the system immediately archives the data to an DA level to ensure its
persistence.
- OLD_DATA - This guarantees that the file's contents
will be based on versions of the dependencies as they existed at the
time the file was created. Before the system will allow a dependency
to be changed or deleted, the system will ensure the data reaches an
DA level because reconstruction might produce different data.
- reconstruct_immediately:
- A boolean specifying when the system
should execute the file's reconstruction rule.
- TRUE - The system will invoke the reconstruction rule
as soon as lost file data is detected or, if LATEST_DATA is selected,
as soon as a dependency is changed.
- FALSE - The system may postpone the invocation of the
reconstruction rule for any amount of time up until the
file is referenced. This is the default.
- num_dependencies:
- The number of entries in the dependency array.
- dependencies:
- An array of entries corresponding to the MBFS files on
which the given file is dependent.
With the inclusion of dependencies and the LATEST_DATA freshness quality,
the reconstruction extension naturally provides an automatic form of the
Unix ``make'' utility and provides a form of intensional files.
While an automatic ``make'' is useful in some circumstances, users may
still invoke the standard make utility manually.
Next: Reconstruction Environment
Up: Reconstruction
Previous: Reconstruction
Todd Anderson
1999-04-26