!*** MODULE $SDDEF *** !DEC$ OPTIONS/ALIGN=(RECORDS=PACKED,COMMONS=PACKED)/NOWARN ! ! item codes for sd$xxx calls ! PARAMETER SD$_MAJOR_ID = '00000001'X ! longword (major ODS version number) PARAMETER SD$_MINOR_ID = '00000002'X ! longword (minor ODS version number) PARAMETER SD$_POOL_ID = '00000003'X ! UID (16 bytes) (Pool identifier) PARAMETER SD$_CREATION_DATE = '00000004'X ! Date/time (8 bytes) (Date pool was created) PARAMETER SD$_MODIFIED_DATE = '00000005'X ! Date/time (8 bytes) (Date pool membership was last ch PARAMETER SD$_SEGMENT_SIZE = '00000006'X ! longword (Size of segment in pool # blocks) PARAMETER SD$_MAX_UNITS = '00000007'X ! longword (Maximum # members allowed in pool) PARAMETER SD$_UNIT_COUNT = '00000008'X ! longword (Number of members currently in pool) PARAMETER SD$_POOL_OPTIONS = '00000009'X ! longword (Pool flags) PARAMETER SD$_UNIT_ID = '0000000A'X ! UID (16 bytes) (Identifier of storage unit) PARAMETER SD$_UNIT_NUMBER = '0000000B'X ! longword (Storage unit number) PARAMETER SD$_UNIT_OPTIONS = '0000000C'X ! longword (Storage unit flags) PARAMETER SD$_SEQUENCE_NUMBER = '0000000D'X ! longword (Homeblock sequence number) PARAMETER SD$_HIGHEST_UNIT = '0000000E'X ! longword (Number of highest member in pool) PARAMETER SD$_LOWEST_UNIT = '0000000F'X ! longword (Number of lowest member in pool) PARAMETER SD$_TOTAL_SEGMENTS = '00000010'X ! longword (Total # of segment in pool) PARAMETER SD$_FREE_SEGMENTS = '00000011'X ! longword (Total # of free segments in pool) PARAMETER SD$_MAX_FAMILY = '00000012'X ! longword (Maximum # of families allowed in pool) PARAMETER SD$_MAX_DISK = '00000013'X ! longword (Maximum # members in a family) PARAMETER SD$_META_LBN = '00000014'X ! longword (Start of SD metadata on member) PARAMETER SD$_META_SIZE = '00000015'X ! longword (Size of SD metadata on member) PARAMETER SD$_DATA_LBN = '00000016'X ! longword (Start of pool space on member) PARAMETER SD$_DATA_SIZE = '00000017'X ! longword (Size of pool space on member) PARAMETER SD$_POOL_DEVICE = '00000018'X ! character string (Name of pool device) PARAMETER SD$_FAMILY_NUMBER = '00000019'X ! longword (Familiy number of a SnapDisk) PARAMETER SD$_MEMBER_NUMBER = '0000001A'X ! longword (Number within family of a SnapDisk) PARAMETER SD$_DISK_NAME = '0000001B'X ! character string (Name of SnapDisk) PARAMETER SD$_DISK_CAPACITY = '0000001C'X ! longword (Size/capacity of a SnapDisk) PARAMETER SD$_DELSPACE = '0000001D'X ! longword (# segments that can be recovered by deleting Sn ! longword (# segments that can be recovered by deleting Sna PARAMETER SD$_DISK_DEVICE = '0000001E'X ! character string (Name of device as bound to OpenVMS) PARAMETER SD$_BACKUP_DATE = '0000001F'X ! Date/time (8 bytes) (Date that recorded snap was last c ! Date/time (8 bytes) (Date that recorded snap was last creat PARAMETER SD$_READS = '00000020'X ! longword (Number of read received from user) PARAMETER SD$_WRITES = '00000021'X ! longword (Number of writes received from user) PARAMETER SD$_SPLIT_READS = '00000022'X ! longword (Number of reads that were split by SD) PARAMETER SD$_SPLIT_WRITES = '00000023'X ! longword (Number of writes that were split by SD) PARAMETER SD$_DISK_READS = '00000024'X ! longword (Number of reads to underlying pool units) PARAMETER SD$_DISK_WRITES = '00000025'X ! longword (Number of writes to underlying pool units) PARAMETER SD$_COPY_OUTS = '00000026'X ! longword (Number of copy-on-write operations) PARAMETER SD$_CONVERT_CANCELS = '00000027'X ! longword (Number of cancelled lock requ PARAMETER SD$_POOL_FULL_STALLS = '00000028'X ! longword (NUmber of requests stalled b ! longword (NUmber of requests stalled by pool fu PARAMETER SD$_SPARE1 = '00000029'X ! longword PARAMETER SD$_SPARE2 = '0000002A'X ! longword PARAMETER SD$_SPARE3 = '0000002B'X ! longword PARAMETER SD$_SPARE4 = '0000002C'X ! longword PARAMETER SD$_SPARE5 = '0000002D'X ! longword PARAMETER SD$_SPARE6 = '0000002E'X ! longword PARAMETER SD$_SPARE7 = '0000002F'X ! longword PARAMETER SD$_SPARE8 = '00000030'X ! longword PARAMETER SD$_COPY_STATS = '00000031'X ! Array of SD$K_COPYCOUNTERS longwords PARAMETER SD$_DEV_LOCKID = '00000032'X ! longword (LockId of device name consistancy ! longword (LockId of device name consistancy loc PARAMETER SD$_UID_LOCKID = '00000033'X ! longword (LockId of UID name consistancy lock) PARAMETER SD$K_COPYCOUNTERS = '00000018'X ! ! options and flags for RTL routines ! PARAMETER SD$M_CONTAINER_DISK = '00000001'X PARAMETER SD$M_CONVERTED_DISK = '00000002'X ! ! Function codes for cluster-server requests ! PARAMETER SD$K_CLU_BIND_POOL = '00000001'X PARAMETER SD$K_CLU_BIND_DISK = '00000002'X PARAMETER SD$K_CLU_UNBIND = '00000003'X ! ! Define structures used by QIO interface to SD management functions ! ! ++ ! Device list ! ! This structure is used to pass information between ! the runtime library, the FDT routines and the start ! I/O routines ! -- STRUCTURE /SDDEVLIST/ INTEGER*4 sd$l_start_lbn ! Starting LBN of data space INTEGER*4 sd$l_lbn_count ! Size of data space INTEGER*4 sd$l_meta_lbn ! Location of SnapDisk metadata INTEGER*4 sd$l_meta_count ! Size of metadata area INTEGER*4 sd$ps_ucb ! UCB of pool unit INTEGER*4 sd$l_name_length ! Length of device name CHARACTER*1 sd$t_name(1:64) ! Device name END STRUCTURE ! SDDEVLIST ! ! SD Parameter list - This is used to pass Snapshot Services ! parameters/characteristics between the runtime library ! and the I/O functions ! PARAMETER sd$m_stall = '00000001'X PARAMETER sd$m_redundant = '00000002'X PARAMETER sd$m_record = '00000004'X PARAMETER sd$m_cluster = '00000008'X PARAMETER sd$m_partial = '00000010'X STRUCTURE /SDPARAMLIST/ UNION MAP INTEGER*4 sd$l_segment_size ! Segment size for copy-on-write END MAP MAP INTEGER*4 sd$l_disk_size ! Disk size for create/disk END MAP END UNION UNION MAP INTEGER*4 sd$l_flags ! Miscellaneous flags END MAP MAP PARAMETER sd$S_stall = 1 PARAMETER sd$V_stall = 0 ! Stall/Fail on pool full PARAMETER sd$S_redundant = 1 PARAMETER sd$V_redundant = 1 ! Use redundancy for SnapDisk metadata PARAMETER sd$S_record = 1 PARAMETER sd$V_record = 2 ! Record snapshot creation time PARAMETER sd$S_cluster = 1 PARAMETER sd$V_cluster = 3 ! Operation is cluster-wide PARAMETER sd$S_partial = 1 PARAMETER sd$V_partial = 4 ! Partial bind on pool BYTE %FILL (1) END MAP END UNION END STRUCTURE ! SDPARAMLIST ! ! IOCTL function codes - miscellaneous functions ! PARAMETER SD$K_GET_DISK = '00000001'X PARAMETER SD$K_GET_STATS = '00000002'X PARAMETER SD$K_GET_UNIT = '00000003'X PARAMETER SD$K_POOL_DISK = '00000004'X PARAMETER SD$K_POOL_INFO = '00000005'X PARAMETER SD$K_POOL_UNIT = '00000006'X PARAMETER SD$K_CLU_TEST = '00000007'X PARAMETER SD$K_STORE_LOCKIDS = '00000008'X PARAMETER SD$K_RETRIEVE_LOCKIDS = '00000009'X PARAMETER SD$K_RETRIEVE_MEMBERLIST = '0000000A'X PARAMETER SD$K_SET_TRACE_LEVEL = '0000000B'X PARAMETER SD$K_GET_TRACE_LEVEL = '0000000C'X ! ! Define Snapshot Services runtime library functions ! ! ! ++ ! ! ROUTINE: ! ! sd$add_units POOL_DEVICE, UNIT_LIST ! ! FUNCTIONAL DESCRIPTION: ! ! Runtime library routine ! Add additional storage units to an existing pool ! This function takes care of all the creation of container ! files etc. for the storage units being added. ! ! FORMAL PARAMETERS: ! ! POOL_DEVICE (IN) : Name of device to add members ! UNIT_LIST (IN) : Item List 3 containing Device list ! FLAGS (IN) : Indicates temporary or permanent pool member ! ! ! PRE-CONDITIONS: ! ! The set of devices must be mounted as Files-11 devices ! ! POST-CONDITIONS: ! ! The new storage units are added as new members to the pool. ! All current and new members are stamped with a new membership list ! ! RETURN VALUE: ! ! Various statuses ! ! -- ! INTEGER*4 sd$add_units EXTERNAL sd$add_units ! ! ++ ! ! ROUTINE: ! ! sd$bind_disk DISK_DEVICE, POOL_DEVICE, DISK_NAME, FLAGS ! ! FUNCTIONAL DESCRIPTION: ! ! Runtime library routine ! Export a SnappyDisk from the pool as an OpenVMS device ! ! FORMAL PARAMETERS: ! ! DISK_DEVICE (IN) : Name of disk device to create ! POOL_DEVICE (IN) : Name of pool device to use ! DISK_NAME (IN) : Name of disk to export from pool ! FLAGS (IN) : Optional flags SD$M_CLUSTER ! ! PRE-CONDITIONS: ! ! The pool must be bound. ! The SnappyDisk name must exist in the pool. ! The SnappyDisk must not be bound to a device on another computer in the ! cluster. ! Another SnappyDisk must not be bound to the specified device on any ! computer in the cluster. ! ! POST-CONDITIONS: ! ! The SnappyDisk is exposed as an OpenVMS device ! ! RETURN VALUE: ! ! Various statuses ! ! -- ! INTEGER*4 sd$bind_disk EXTERNAL sd$bind_disk ! ! ++ ! ! ROUTINE: ! ! sd$bind_pool POOL_DEVICE, UNIT_LIST, FLAGS ! ! FUNCTIONAL DESCRIPTION: ! ! Runtime library routine ! Rebind a pool from a set of devices that have been ! previously created as a pool. ! This function takes care of all the location of container ! files, driver loading. ! ! FORMAL PARAMETERS: ! ! POOL_DEVICE (IN) : Name of device to create ! UNIT_LIST (IN) : Itemlist3 containing list of storage units ! FLAGS (IN) : Optional flags SD$M_CLUSTER ! ! PRE-CONDITIONS: ! ! The storage units must be mounted as Files-11 devices. ! The storage units must have been previously used to create a pool. ! The list of storage units must not include storage units in another ! pool. ! The list of storage units must not include a SnappyDisk bound to a ! device. ! ! POST-CONDITIONS: ! ! A pool is rebound and exported as the specified pool_device. ! ! RETURN VALUE: ! ! Various statuses ! ! -- ! INTEGER*4 sd$bind_pool EXTERNAL sd$bind_pool ! ! ++ ! ! ROUTINE: ! ! sd$create_disk POOL_DEVICE, DISK_NAME, DISK_CAPACITY ! ! FUNCTIONAL DESCRIPTION: ! ! Runtime library routine ! Create a SnappyDisk in a pool ! ! FORMAL PARAMETERS: ! ! POOL_DEVICE (IN) : Name of pool device to use ! DISK_NAME (IN) : Name of SnappyDisk to create ! DISK_CAPACITY (IN) : Size in blocks of SnappyDisk to create ! ! PRE-CONDITIONS: ! ! The pool must be bound. ! The SnappyDisk name must not already exist in the pool. ! The pool must have enough free space to create a SnappyDisk of the size ! specified. ! ! POST-CONDITIONS: ! ! A new SnappyDisk, named disk_name, is created in the pool ! ! RETURN VALUE: ! ! Various statuses ! ! -- ! INTEGER*4 sd$create_disk EXTERNAL sd$create_disk ! ! ++ ! ! ROUTINE: ! ! sd$create_pool UNIT_LIST, SEGMENT_SIZE, FLAGS ! ! FUNCTIONAL DESCRIPTION: ! ! Create a pool from a set of storage units. ! This function takes care of all the creation of container ! files and driver loading that needs to be done before calling ! the IO$_BIND function. ! ! FORMAL PARAMETERS: ! ! UNIT_LIST (IN) : Item list 3 containing list of storage units ! SEGMENT_SIZE (IN) : Size of segments in pool (blocks) ! FLAGS (IN) : Optional flags SD$M_STALL, SD$M_FAIL ! ! PRE-CONDITIONS: ! ! The storage units must be initialised and mounted as Files-11 devices. ! The list of storage units must not include storage units in another ! pool. ! The list of storage units must not include a SnappyDisk bound to a ! device. ! ! POST-CONDITIONS: ! ! A new pool is created on the storage units. ! The storage units are stamped as belonging to the same pool. ! ! RETURN VALUE: ! ! Various statuses ! ! -- ! INTEGER*4 sd$create_pool EXTERNAL sd$create_pool ! ! ++ ! ! ROUTINE: ! ! sd$create_snap POOL_DEVICE, DISK_DEVICE, DISK_NAME, FLAGS ! ! FUNCTIONAL DESCRIPTION: ! ! Runtime library routine ! Create a snap of an existing SnappyDisk ! ! FORMAL PARAMETERS: ! ! POOL_DEVICE (IN) : Name of pool device to use ! DISK_DEVICE (IN) : Name of SnappyDisk device to use as basis ! for snap ! DISK_NAME (IN) : Name of SnappyDisk to create ! FLAGS (IN) : Should we record time snap was taken ! for incremental backup purposes, SD$M_RECORD ! ! PRE-CONDITIONS: ! ! The pool must be bound ! The original SnappyDisk must be exported as a device ! ! POST-CONDITIONS: ! ! A new SnappyDisk is created in the pool. That SnappyDisk will be a snap ! of the original SnappyDisk specified in the call. ! ! RETURN VALUE: ! ! Various statuses ! ! -- ! INTEGER*4 sd$create_snap EXTERNAL sd$create_snap ! ! ++ ! ! ROUTINE: ! ! sd$delete_disk POOL_DEVICE, DISK_NAME ! ! FUNCTIONAL DESCRIPTION: ! ! Runtime library routine ! Delete a SnapDisk from a pool ! ! FORMAL PARAMETERS: ! ! POOL_DEVICE (IN) : Name of pool device to use ! DISK_NAME (IN) : Name of SnappyDisk to delete ! ! PRE-CONDITIONS: ! ! The pool must be bound ! The SnappyDisk name must exist in the pool ! The SnappyDisk named must not be bound to a device on the local computer ! ! POST-CONDITIONS: ! ! The SnappyDisk is deleted from the pool ! ! RETURN VALUE: ! ! Various statuses ! ! -- ! INTEGER*4 sd$delete_disk EXTERNAL sd$delete_disk ! ! ++ ! ! ROUTINE: ! ! sd$remove_units POOL_DEVICE, UNIT_LIST ! ! FUNCTIONAL DESCRIPTION: ! ! Runtime library routine ! Removes members from a pool. ! If the members are successfully removed, the metadata files are ! removed from the devices. ! ! FORMAL PARAMETERS: ! ! POOL_DEVICE (IN) : Name of device to remove members ! UNIT_LIST (IN) : Item list 3 containing list of storage units ! ! PRE-CONDITIONS: ! ! The list of storage units must be part of the specified pool. ! The pool must contain enough free space to allow data on the outgoing ! storage units to be copied to other storage units in the pool. ! The list of storage units must not be the complete set of units in ! the pool. ! ! POST-CONDITIONS: ! ! The remaining members are updated with the new pool ! membership list. ! ! RETURN VALUE: ! ! Various statuses ! ! -- ! INTEGER*4 sd$remove_units EXTERNAL sd$remove_units ! ! ++ ! ! ROUTINE: ! ! sd$unbind VIRTUAL_DEVICE, FLAGS ! ! FUNCTIONAL DESCRIPTION: ! ! Runtime library routine ! Unbind a pool or SnapDisk. ! ! FORMAL PARAMETERS: ! ! VIRTUAL_DEVICE (IN) : Name of device to unbind ! FLAGS (IN) : Optional flags SD$M_CLUSTER ! ! PRE-CONDITIONS: ! ! The pool or SnappyDisk must be bound to the device on the local computer ! ! POST-CONDITIONS: ! ! The pool or SnappyDisk is unbound from the device ! ! RETURN VALUE: ! ! Various statuses ! ! -- ! INTEGER*4 sd$unbind EXTERNAL sd$unbind ! ! ++ ! ! ROUTINE: ! ! sd$get_disk DISK_DEVICE, ITMLST ! ! FUNCTIONAL DESCRIPTION: ! ! Runtime library routine ! Get information about an exported disk. ! The information is returned using a standard OpenVMS ! itemlist mechanism. ! NOTE: The itemlist must be zero terminated ! ! Valid item codes are: ! ! SD$_BACKUP_DATE ! SD$_CREATION_DATE ! SD$_DELSPACE ! SD$_DISK_CAPACITY ! SD$_DISK_DEVICE ! SD$_DISK_NAME ! SD$_FAMILY_NUMBER ! SD$_MEMBER_NUMBER ! SD$_POOL_DEVICE ! ! FORMAL PARAMETERS: ! ! DISK_DEVICE (IN) : Name of SnappyDisk device ! ITMLST (IN): Address of items to return ! ! PRE-CONDITIONS: ! ! The device must be a SnappyDisk device ! ! POST-CONDITIONS: ! ! The information requested is returned ! ! RETURN VALUE: ! ! SS$_NORMAL - Member info returned ! SS$_ACCVIO - Parameters not accessible ! SS$_BADPARAM - One or more item codes are invalid ! SS$_IVBUFLEN - one or more buffer lengths are invalid ! SS$_IVDEVNAM - ucb is not that of a pool member ! SS$_NOTBOUND - the member is not bound into a pool ! SS$_SDDISABLED - Snap-capable disk not loaded ! -- ! INTEGER*4 sd$get_disk EXTERNAL sd$get_disk ! ! ++ ! ! ROUTINE: ! ! sd$get_pool POOL_DEVICE, ITMLST ! ! FUNCTIONAL DESCRIPTION: ! ! Runtime library routine ! Get pool-wide information ! The information is returned using a standard OpenVMS ! itemlist mechanism. ! NOTE: The itemlist must be zero terminated ! ! Valid item codes are: ! ! SD$_CREATION_DATE ! SD$_FREE_SEGMENTS ! SD$_HIGHEST_UNIT ! SD$_LOWEST_UNIT ! SD$_MAJOR_ID ! SD$_MAX_DISK ! SD$_MAX_FAMILY ! SD$_MAX_UNITS ! SD$_MINOR_ID ! SD$_MODIFIED_DATE ! SD$_POOL_ID ! SD$_POOL_OPTIONS ! SD$_SEGMENT_SIZE ! SD$_SEQUENCE_NUMBER ! SD$_TOTAL_SEGMENTS ! SD$_UNIT_COUNT ! ! FORMAL PARAMETERS: ! ! POOL_DEVICE (IN) : Name of storage pool ! ITMLST (IN) : Address of items to return ! ! PRE-CONDITIONS: ! ! A context must have been started with sd$get_pool_begin ! ! POST-CONDITIONS: ! ! The information requested is returned ! ! RETURN VALUE: ! ! SS$_NORMAL - Next member returned ! SS$_BADPARAM - One or more item codes are invalid ! SS$_IVBUFLEN - One or more buffer lengths are invalid ! SS$_SDDISABLED - Snap-capable disk not loaded ! -- ! INTEGER*4 sd$get_pool EXTERNAL sd$get_pool ! ! ++ ! ! ROUTINE: ! ! sd$get_pool_begin POOL_DEVICE, POOL_CONTEXT ! ! FUNCTIONAL DESCRIPTION: ! ! Runtime library routine ! Routine to setup context to read SnapDisk pool ! parameters from a pool device. ! ! FORMAL PARAMETERS: ! ! POOL_DEVICE (IN) : Name of pool device to query ! POOL_CONTEXT (IN) : Address of context to return ! ! PRE-CONDITIONS: ! ! The pool device must exist ! ! POST-CONDITIONS: ! ! A context is setup to allow sd$get_pool and sd$get_pooldevice ! to be called to return the pool parameters. ! ! RETURN VALUE: ! ! Various statuses ! ! -- ! INTEGER*4 sd$get_pool_begin EXTERNAL sd$get_pool_begin ! ! ++ ! ! ROUTINE: ! ! sd$get_pool_disk POOL_CONTEXT, ITMLST ! ! FUNCTIONAL DESCRIPTION: ! ! Runtime library routine ! Routine to return the information for the next SnappyDisk in the pool. ! ! For example: ! ! status = sd$get_pool_begin(raw_device, context) ! while (success(status)) ! status = sd$get_pool_disk(context, itmlst) ! status = sd$get_pool_end(context) ! ! Valid item code are: ! ! SD$_BACKUP_DATE ! SD$_CREATION_DATE ! SD$_DELSPACE ! SD$_DISK_CAPACITY ! SD$_DISK_DEVICE ! SD$_DISK_NAME ! SD$_FAMILY_NUMBER ! SD$_MEMBER_NUMBER ! SD$_POOL_DEVICE ! ! FORMAL PARAMETERS: ! ! POOL_CONTEXT (IN) : Address of pool context ! ITMLST (IN): Address of items to return ! ! PRE-CONDITIONS: ! ! A context must have been started with sd$get_pool_begin ! ! POST-CONDITIONS: ! ! The next member is returned ! ! RETURN VALUE: ! ! SS$_NORMAL - Next member returned ! SS$_NOMOREDEV - No more diks in pool ! -- ! INTEGER*4 sd$get_pool_disk EXTERNAL sd$get_pool_disk ! ! ++ ! ! ROUTINE: ! ! sd$get_pool_end POOL_CONTEXT ! ! FUNCTIONAL DESCRIPTION: ! ! Runtime library routine ! Routine to tidy up the context associated with a ! sd$get_pool_begin. ! ! FORMAL PARAMETERS: ! ! POOL_CONTEXT (IN) : Address of context to delete ! ! PRE-CONDITIONS: ! ! A context must have been started with sd$get_pool_begin ! ! POST-CONDITIONS: ! ! The context is deleted ! ! RETURN VALUE: ! ! SS$_NORMAL ! ! -- ! INTEGER*4 sd$get_pool_end EXTERNAL sd$get_pool_end ! ! ++ ! ! ROUTINE: ! ! sd$get_pool_unit POOL_CONTEXT, NEXT_UNIT ! ! FUNCTIONAL DESCRIPTION: ! ! Runtime library routine ! Routine to return the next member device making up the pool. ! This routine is designed to be called in a loop to return ! all the members making up the pool. ! For example: ! ! status = sd$get_pool_begin(raw_device, context) ! while (success(status)) ! status = sd$get_pool_unit(context, unit_device) ! status = sd$get_pool_end ! ! FORMAL PARAMETERS: ! ! POOL_CONTEXT (IN) : Address of context ! NEXT_UNIT (OUT) : Address of descriptor to return ! ! PRE-CONDITIONS: ! ! A context must have been started with sd$get_pool_begin ! ! POST-CONDITIONS: ! ! The next member is returned ! ! RETURN VALUE: ! ! SS$_NORMAL - Next member returned ! SS$_NOMOREDEV - No more devices ! SS$_BADPARAM - Invalid context ! SS$_SDDISABLED - Snap-capable disk not loaded ! ! -- ! INTEGER*4 sd$get_pool_unit EXTERNAL sd$get_pool_unit ! ! ++ ! ! ROUTINE: ! ! sd$get_raw_begin UNIT_DEVICE, UNIT_CONTEXT ! ! FUNCTIONAL DESCRIPTION: ! ! Runtime library routine ! Routine to setup context to read SnappyDisk pool ! parameters from a raw (mounted but not bound) storage unit. ! ! FORMAL PARAMETERS: ! ! UNIT_DEVICE (IN) : Name of storage unit to query ! UNIT_CONTEXT (IN) : Address of context to return ! ! PRE-CONDITIONS: ! ! The member device must be mounted but not bound ! ! POST-CONDITIONS: ! ! A context is setup to allow sd$get_raw_info and sd$get_unitdevice ! to be called to return pool parameters stored on the member. ! ! RETURN VALUE: ! ! Various statuses ! ! -- ! INTEGER*4 sd$get_raw_begin EXTERNAL sd$get_raw_begin ! ! ++ ! ! ROUTINE: ! ! sd$get_raw_end UNIT_CONTEXT ! ! FUNCTIONAL DESCRIPTION: ! ! Runtime library routine ! Routine to tidy up the context associated with a ! sd$get_raw_begin. ! ! FORMAL PARAMETERS: ! ! UNIT_CONTEXT (IN) : Address of context ! ! PRE-CONDITIONS: ! ! A context must have been started with sd$get_raw_begin ! ! POST-CONDITIONS: ! ! The context is deleted ! ! RETURN VALUE: ! ! SS$_NORMAL ! ! -- ! INTEGER*4 sd$get_raw_end EXTERNAL sd$get_raw_end ! ! ++ ! ! ROUTINE: ! ! sd$get_raw_next UNIT_CONTEXT, NEXT_UNIT ! ! FUNCTIONAL DESCRIPTION: ! ! Runtime library routine ! Routine to return the next member device making up the pool. ! This routine is designed to be called in a loop to return ! all the members in the pool making up the device. ! For example: ! ! status = sd$get_raw_begin(raw_device, context) ! while (success(status)) ! status = sd$get_raw_next(context, unit_device) ! status = sd$get_raw_end ! ! FORMAL PARAMETERS: ! ! UNIT_CONTEXT (IN) : Address of context ! NEXT_UNIT(OUT) : Address of descriptor to return ! ! PRE-CONDITIONS: ! ! A context must have been started with sd$get_raw_begin ! ! POST-CONDITIONS: ! ! The next member is returned ! ! RETURN VALUE: ! ! SS$_NORMAL - Next member returned ! SS$_NOMOREDEV - No more devices ! ! -- ! INTEGER*4 sd$get_raw_next EXTERNAL sd$get_raw_next ! ! ++ ! ! ROUTINE: ! ! sd$get_raw_info UNIT_CONTEXT, ITMLST ! ! FUNCTIONAL DESCRIPTION: ! ! Runtime library routine ! Get information from the member ! The information is returned using a standard OpenVMS ! itemlist mechanism. ! NOTE: The itemlist must be zero terminated ! ! Valid item codes are: ! ! SD$_CREATION_DATE ! SD$_HIGHEST_UNIT ! SD$_LOWEST_UNIT ! SD$_MAJOR_ID ! SD$_MAX_DISK ! SD$_MAX_FAMILY ! SD$_MAX_UNITS ! SD$_MINOR_ID ! SD$_MODIFIED_DATE ! SD$_POOL_ID ! SD$_POOL_OPTIONS ! SD$_SEGMENT_SIZE ! SD$_SEQUENCE_NUMBER ! SD$_UNIT_COUNT ! SD$_UNIT_ID ! SD$_UNIT_NUMBER ! SD$_UNIT_OPTIONS ! ! FORMAL PARAMETERS: ! ! UNIT_CONTEXT (IN) : Address of context ! ITMLST (IN) : Address of items to return ! ! PRE-CONDITIONS: ! ! A context must have been started with sd$get_raw_begin ! ! POST-CONDITIONS: ! ! The information requested is returned ! ! RETURN VALUE: ! ! SS$_NORMAL - Next member returned ! SS$_BADPARAM - One or more item codes are invalid ! SS$_IVBUFLEN - One or more buffer lengths are invalid ! -- ! INTEGER*4 sd$get_raw_info EXTERNAL sd$get_raw_info ! ! ++ ! ! ROUTINE: ! ! sd$get_stats POOL_DEVICE, ITMLST ! ! FUNCTIONAL DESCRIPTION: ! ! Runtime library routine ! Get monitor-type runtime statistics on a system-wide ! or per-pool basis. ! ! If POOL_DEVICE is NULL, this call returns the system-wide ! statistics otherwise it returns the statistics for the ! specified pool. ! ! The information is returned using a standard OpenVMS ! itemlist mechanism. ! NOTE: The itemlist must be zero terminated ! ! Valid item codes are: ! ! SD$_COPY_OUTS ! SD$_DISK_READS ! SD$_DISK_WRITES ! SD$_READS ! SD$_SPLIT_READS ! SD$_SPLIT_WRITES ! SD$_WRITES ! ! FORMAL PARAMETERS: ! ! POOL_DEVICE(IN) : Pool device name ! ITMLST (IN) : Address of items to return ! ! PRE-CONDITIONS: ! ! The SnappyDisk driver must be loaded and enabled. ! For a non NULL pool_device, the pool must be bound to the device on ! the local computer. ! ! POST-CONDITIONS: ! ! The information requested is returned ! ! RETURN VALUE: ! ! SS$_NORMAL - Stats returned ! SS$_ACCVIO - Parameters not accessible ! SS$_BADPARAM - One or more item codes are invalid ! SS$_IVBUFLEN - one or more buffer lengths are invalid ! SS$_IVDEVNAM - Device is not a pool device ! SS$_NOSUCHDEV - No such pool device ! SS$_SDDISABLED - Snap-capable disk not loaded ! -- ! INTEGER*4 sd$get_stats EXTERNAL sd$get_stats ! ! ++ ! ! ROUTINE: ! ! sd$get_unit UNIT_DEVICE, ITMLST ! ! FUNCTIONAL DESCRIPTION: ! ! Runtime library routine ! Get information about a pool member ! The information is returned using a standard OpenVMS ! itemlist mechanism. ! NOTE: The itemlist must be zero terminated ! ! Valid item codes are: ! ! SD$_DATA_LBN ! SD$_DATA_SIZE ! SD$_FREE_SEGMENTS ! SD$_META_LBN ! SD$_META_SIZE ! SD$_POOL_DEVICE ! SD$_TOTAL_SEGMENTS ! SD$_UNIT_ID ! SD$_UNIT_NUMBER ! SD$_UNIT_OPTIONS ! ! FORMAL PARAMETERS: ! ! UNIT_DEVICE (IN) : Name of storage unit ! ITMLST (IN) : Address of items to return ! ! PRE-CONDITIONS: ! ! The storage unit must exist on the local computer ! ! POST-CONDITIONS: ! ! The information requested is returned ! ! RETURN VALUE: ! ! SS$_NORMAL - Member info returned ! SS$_ACCVIO - Parameters not accessible ! SS$_BADPARAM - One or more item codes are invalid ! SS$_IVBUFLEN - one or more buffer lengths are invalid ! SS$_IVDEVNAM - ucb is not that of a pool member ! SS$_NOTBOUND - the member is not bound into a pool ! SS$_SDDISABLED - Snap-capable disk not loaded ! -- ! INTEGER*4 sd$get_unit EXTERNAL sd$get_unit !DEC$ END OPTIONS