Cedar Nucleus (Files): management of physical and logical volumes
Volumes.mesa
Andrew Birrell May 2, 1983 11:43 am
DIRECTORY
Disk     USING[ Channel, PageCount, PageNumber ],
NewFile    USING[ FP, VolumeFile, VolumeID ],
Rope     USING[ ROPE ],
VolumeFormat  USING[ LogicalPage, LogicalPageCount, TimeParameters];
Volumes: CEDAR DEFINITIONS =
BEGIN
The world consists of online packs, each mounted on a drive. Each interesting pack contains precisely one physical volume. Each physical volume contains some number of sub-volumes. Each sub-volume is a part of some logical volume. A logical volume consists of its constituent sub-volumes. Sub-volumes may be added to a physical volume, but once added their layout may not be changed without erasing the entire physical volume.
Physical: TYPE = REF PhysicalObject;
PhysicalObject: TYPE;
NextPhysical: PROC[prev: Physical, wait: BOOL] RETURNS[Physical];
PhysicalRoots: TYPE = NewFile.VolumeFile[microcode..bootFile];
PhysicalInfo: PROC[Physical] RETURNS[
id: NewFile.VolumeID, -- unique id of this physical volume --
name: Rope.ROPE,
channel: Disk.Channel,
size: Disk.PageCount,
free: Disk.PageCount,
roots: ARRAY PhysicalRoots OF NewFile.FP,
subVolumes: LIST OF SubVolumeDetails -- current sub-volumes --,
time: VolumeFormat.TimeParameters];
SubVolumeDetails: TYPE = REF READONLY SubVolumeDetailsObject;
SubVolumeDetailsObject: TYPE = RECORD[ -- immutable information about the sub-volume --
id: NewFile.VolumeID, -- logical volume of which this is a fragment --
start: VolumeFormat.LogicalPage, -- logical page number of this fragment of logical volume --
size: VolumeFormat.LogicalPageCount,
physical: Physical,
channel: Disk.Channel,
address: Disk.PageNumber -- physical page number of this subvolume --
];
END.