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. øCedar Nucleus (Files): management of physical volumes PhysicalVolume.mesa Andrew Birrell September 20, 1983 2:11 pm 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. Standard enumerator. No errors. Returns the physical volume containing the specified page of the logical volume. No errors. The following results are defined only if rootStatus = ok No errors. Opaque at this level. Concrete type is only interesting to Time software. ! File.Error[wentOffline, nonCedarVolume, inconsistent, software, hardware] Assumes "credentials" is VM-page-aligned and occupies File.wordsPerPage words; the memory belongs to the caller. No errors. Assumes "credentials" is VM-page-aligned and occupies File.wordsPerPage words; the memory belongs to the caller. No errors. Page number relative to a logical volume ! File.Error[wentOffline, nonCedarVolume, inconsistent, software, hardware] Êä˜Jšœ6™6Jšœ™Jšœ*™*J˜šÏk ˜ Jšœœ#˜-Jšœœœ!˜/Jšœœœ˜—J˜Jšœœ œ˜#J˜Jš˜J˜Jšœ¯™¯J˜Jšœ œœ˜$Jšœœ˜J˜š Ïn œœœœœ ˜IJšœ ™ —J˜šž œœ/œ ˜TJšœ\™\—J˜J˜Jšœ œœ˜)J˜šž œœ œ˜%J˜Jšœ˜Jšœ9™9Jšœ˜Jšœ œ˜J˜J˜Jšœ œ˜J˜J™ —J˜šœœ˜JšœJ™J—J˜šžœœ-˜BJšœK™K—J˜Jšžœœ œœ˜kJ˜Jš œ œÏcœœœœ˜JJ˜Jšœœ˜J˜šžœœœ/œ˜aJšœ}™}—J˜šžœœ/œ˜[Jšœ}™}—J˜šœ œœœ˜ Jšœ(™(—J˜Jšœœœ˜J˜šž œœ$œ˜MJšœK™K—J˜Jšœ œœ˜(J˜šœœœ˜ Jšœ œœœ˜@—J˜Jšœœœœ˜=J˜šœœœŸ0˜WJšœŸ0˜CJšœŸ<˜PJ˜J˜J˜JšœŸ,˜EJ˜—J˜Jšœ˜J˜J˜—…—R.