<> <> <> <> <> <<>> DIRECTORY Disk USING [ Channel, PageCount, PageNumber ], File USING [ RC, Volume, VolumeFile, VolumeID ], Rope USING [ ROPE ]; PhysicalVolume: CEDAR DEFINITIONS = BEGIN <> Physical: TYPE = REF PhysicalObject; PhysicalObject: TYPE; NextPhysical: PROC[prev: Physical, wait: BOOL _ FALSE] RETURNS[Physical]; <> GetPhysical: PROC[volume: File.Volume, page: LogicalPage _ [0]] RETURNS[ Physical ]; <> PhysicalRC: TYPE = File.RC[ok..hardware]; PhysicalInfo: PROC[Physical] RETURNS[ channel: Disk.Channel, rootStatus: PhysicalRC, <> id: File.VolumeID, name: Rope.ROPE, size: Disk.PageCount, free: Disk.PageCount, timeValid: BOOL, time: TimeParameters ]; <> TimeParameters: TYPE[2]; <> SetPhysicalRoot: PROC[volume: File.Volume, root: File.VolumeFile]; <> WriteTimeParameters: PROC[physical: Physical, timeValid: BOOL, time: TimeParameters] RETURNS[ PhysicalRC ]; Credentials: TYPE = --VM-page-aligned-- LONG POINTER TO CredentialsObject; CredentialsObject: TYPE; ReadCredentials: UNSAFE PROC[physical: Physical, credentials: Credentials] RETURNS[ PhysicalRC ]; <> WriteCredentials: PROC[physical: Physical, credentials: Credentials] RETURNS[ PhysicalRC ]; <> LogicalPage: TYPE = RECORD[INT]; <> LogicalPageCount: TYPE = INT; GetSubVolumes: PROC[physical: PhysicalVolume.Physical] RETURNS[ SubVolumes ]; <> SubVolumes: TYPE = REF SubVolumesObject; SubVolumesObject: TYPE = RECORD[ subVolumes: SEQUENCE count: CARDINAL OF SubVolumeDetailsObject]; SubVolumeDetails: TYPE = REF READONLY SubVolumeDetailsObject; SubVolumeDetailsObject: TYPE = RECORD[ -- immutable information about the sub-volume -- id: File.VolumeID, -- logical volume of which this is a fragment -- start: LogicalPage, -- logical page number of this fragment of logical volume -- size: LogicalPageCount, physical: Physical, channel: Disk.Channel, address: Disk.PageNumber -- physical page number of this subvolume -- ]; END.