Hardware manual

RealDiskDA: Converts a virtual disk address into a real disk address.
InitializeDiskCBZ: Initializes a Command Buffer Zone (CBZ) for managing disk transfers.
DoDiskCommand: Queues a Command Buffer (CB) to initiate a one-page transfer.
GetDiskCb: Obtains another CB, possibly waiting for an earlier transfer to complete.
CloseDisk: Destroys the disk object.
In addition, there are several standard data entries in the DSK object:
fpSysDir: Pointer to the FP for the directory on the disk. (This always has a constant format -- see
discussion above.)
fpDiskDescriptor: Pointer to the FP for the file "DiskDescriptor" on the disk.
fpWorkingDir: Pointer to the FP to use as the "working directory" on this disk. This is usually the
same as fpSysDir.
nameWorkingDir: Pointer to a Bcpl string that contains the name of the working directory.
lnPageSize: This is the log (base 2) of the number of words in a data page on this disk.
driveNumber: This entry identifies the drive number that this DSK structure describes.
retryCount: This value gives the number of times the disk routines should retry an operation before
declaring it an error.
totalErrors: This value gives a cumulative count of the number of disk errors encountered.
diskKd: This entry points to a copy of the DiskDescriptor in memory. Because the bit table can get
quite large, only the header needs to be in memory. This header can be used, for example, to compute
the capacity of the disk.
lengthCBZ, lengthCB: The fixed overhead for a CBZ and the number of additional words required per
CB.
In addition to this standard information, a particular implementation of a disk class may include other
information in the structure.
4. Data Structures
The following data structures are part of the interface between the user and the disk class routines:
pageNumber: as defined in the previous section. The page number is represented by an integer.
DAs: a vector indexed by page number in which the ith entry contains the virtual disk address of page i of
the file, or one of two special values (which are declared as manifest constants in Disks.D):
eofDA: this page is beyond the current end of the file;
fillInDA: the address of this page is not known.
Note that a particular call on the file system will only reference certain elements of this vector, and the
others do not have to exist. Thus, reading page i will cause references only to DAs!i and DAs!(i+1), so the
user can have a two-word vector v to hold these quantities, and pass v-i to the file system as DAs.
Disks & Bfs August 10, 1980 55
For Xerox Internal Use Only -- December 15, 1980