+ These functions all relate to per-object I/O tasks: opening, + closing, reading, writing, and unlinking objects on disk. + +
+ Note that the underlying storage system functions are
+ accessed through function pointers, kept in the
+
+ struct _SwapDir {
+ ....
+ struct {
+ STOBJOPEN *open;
+ STOBJCLOSE *close;
+ STOBJREAD *read;
+ STOBJWRITE *write;
+ STOBJUNLINK *unlink;
+ } obj;
+ ....
+ };
+
+
+
+ Thus, a storage system must do something like this
+ when initializing its
+ SwapDir->obj.open = storeFooOpen;
+ SwapDir->obj.close = storeFooClose;
+ SwapDir->obj.read = storeFooRead;
+ SwapDir->obj.write = storeFooWrite;
+ SwapDir->obj.unlink = storeFooUnlink;
+
+
+
The caller is responsible for allocating and freeing
+ There are three functions relating to the Squid configuration
+ file: parsing, dumping, and freeing.
+
+
+ The parse function is called at startup, and during a reconfigure,
+ for a
+ The ``dump'' function is used to output a configuration
+ file from the in-memory configuration structure. It is
+ called with a
+ The free function is called during a reconfigure (and at
+ exit) to free up (or un-initialize) any memory or structures
+ associated with the configuration line. The Filesystem Startup, Initialization, and State Logging
+
+
+ These functions deal with initializing, state
+ logging, and related tasks for a squid storage system.
+ These functions can be found in
+ Each storage system must provide the functions
+ described in this section. Each function is
+ accessed through a function pointer stored in
+ the
+ struct _SwapDir {
+ ...
+ STINIT *init;
+ STNEWFS *newfs;
+ struct {
+ STLOGOPEN *open;
+ STLOGCLOSE *close;
+ STLOGWRITE *write;
+ struct {
+ STLOGCLEANOPEN *open;
+ STLOGCLEANWRITE *write;
+ void *state;
+ } clean;
+ } log;
+ ....
+ };
+
+ The
+
+ The
+
+ The
+ The
+
+ The
+
+ The
+
+ The
+ The
+
+ The
- Note there is much work yet to be done in defining
- this programming interface. All of the code for
- rebuilding the disk store at startup is still very
- UFS-specific. The configuration file and
--
2.47.2