OldAlpineVolume.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Last edited by
Kolling on March 9, 1983 11:08 am
MBrown on March 1, 1983 4:13 pm
Taft on April 2, 1983 1:53 pm
Hauser, March 7, 1985 2:24:55 pm PST
This is an interim interface. We expect it to evolve in the direction of: control of volume group locking, controlling the online/offline status of volume groups, etc.
DIRECTORY
OldAlpineEnvironment;
OldAlpineVolume:
DEFINITIONS =
BEGIN
Conversation: TYPE = OldAlpineEnvironment.Conversation;
LockOption: TYPE = OldAlpineEnvironment.LockOption;
TransID: TYPE = OldAlpineEnvironment.TransID;
nullTransID: TransID = OldAlpineEnvironment.nullTransID;
VolumeID: TYPE = OldAlpineEnvironment.VolumeID;
VolumeGroupID: TYPE = OldAlpineEnvironment.VolumeGroupID;
nullVolumeGroupID: VolumeGroupID = OldAlpineEnvironment.nullVolumeGroupID;
Procedures
GetNextGroup:
PROC [conversation: Conversation, transID: TransID ← nullTransID, previousGroup: VolumeGroupID ← nullVolumeGroupID, lock: LockOption ← [none, wait]]
RETURNS [volumeGroupID: VolumeGroupID];
! Unknown {volumeGroupID};
Stateless enumerator for the on-line volume groups of this Alpine instance. previousGroup = nullVolumeGroupID starts an enumeration, and volumeGroupID = nullVolumeGroupID is returned at the end of an enumeration.
For now, the transID and lock parms are ignored. The proposed usage is as follows: If transID # nullTransID and lock.mode # none then sets the specified lock on the returned volume group. Setting a read lock guarantees that the volume group will remain on-line for the remainder of the transaction. Setting a write lock excludes all other access to the volume group for the remainder of the transaction (including opening files on the volume group); this requires the caller to be an asserted AlpineWheel.
GetGroup:
PROC [conversation: Conversation, transID: TransID ← nullTransID, volumeGroupID: VolumeGroupID, lock: LockOption ← [none, wait]]
RETURNS [volumes:
LIST
OF VolumeID];
! Unknown {volumeGroupID};
Returns the list of volumes belonging to the specified volumeGroup. Locking is as for GetNextGroup.
GetEnclosingGroup:
PROC [conversation: Conversation, transID: TransID ← nullTransID, volumeID: VolumeID, lock: LockOption ← [none, wait]]
RETURNS [volumeGroupID: VolumeGroupID];
! Unknown {volumeID};
Returns the VolumeGroupID of the volume group containing the specified volume. Locking is as for GetNextGroup.
Errors
AccessFailed: ERROR [missingAccess: OldAlpineEnvironment.NeededAccess];
Unknown: ERROR [what: OldAlpineEnvironment.UnknownType];
StaticallyInvalid: ERROR;
END.
Hauser, March 7, 1985 2:24:28 pm PST
Added copyright.