/********************************************************************************************************************************/ /* Created: 9-Mar-2021 22:28:06 by OpenVMS SDL EV3-3 */ /* Source: 09-MAR-2021 22:28:01 $1$DGA8085:[STARLET_H.SRC]STARDEFQZ.SDI;1 */ /********************************************************************************************************************************/ /*** MODULE $SDDEF ***/ #ifndef __SDDEF_LOADED #define __SDDEF_LOADED 1 #pragma __nostandard /* This file uses non-ANSI-Standard features */ #pragma __member_alignment __save #pragma __nomember_alignment #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __save /* Save the previously-defined required ptr size */ #pragma __required_pointer_size __short /* And set ptr size default to 32-bit pointers */ #endif #ifdef __cplusplus extern "C" { #define __unknown_params ... #define __optional_params ... #else #define __unknown_params #define __optional_params ... #endif #ifndef __struct #if !defined(__VAXC) #define __struct struct #else #define __struct variant_struct #endif #endif #ifndef __union #if !defined(__VAXC) #define __union union #else #define __union variant_union #endif #endif /* */ /* item codes for sd$xxx calls */ /* */ #define SD$_MAJOR_ID 1 /* longword (major ODS version number) */ #define SD$_MINOR_ID 2 /* longword (minor ODS version number) */ #define SD$_POOL_ID 3 /* UID (16 bytes) (Pool identifier) */ #define SD$_CREATION_DATE 4 /* Date/time (8 bytes) (Date pool was created) */ #define SD$_MODIFIED_DATE 5 /* Date/time (8 bytes) (Date pool membership was last changed) */ #define SD$_SEGMENT_SIZE 6 /* longword (Size of segment in pool # blocks) */ #define SD$_MAX_UNITS 7 /* longword (Maximum # members allowed in pool) */ #define SD$_UNIT_COUNT 8 /* longword (Number of members currently in pool) */ #define SD$_POOL_OPTIONS 9 /* longword (Pool flags) */ #define SD$_UNIT_ID 10 /* UID (16 bytes) (Identifier of storage unit) */ #define SD$_UNIT_NUMBER 11 /* longword (Storage unit number) */ #define SD$_UNIT_OPTIONS 12 /* longword (Storage unit flags) */ #define SD$_SEQUENCE_NUMBER 13 /* longword (Homeblock sequence number) */ #define SD$_HIGHEST_UNIT 14 /* longword (Number of highest member in pool) */ #define SD$_LOWEST_UNIT 15 /* longword (Number of lowest member in pool) */ #define SD$_TOTAL_SEGMENTS 16 /* longword (Total # of segment in pool) */ #define SD$_FREE_SEGMENTS 17 /* longword (Total # of free segments in pool) */ #define SD$_MAX_FAMILY 18 /* longword (Maximum # of families allowed in pool) */ #define SD$_MAX_DISK 19 /* longword (Maximum # members in a family) */ #define SD$_META_LBN 20 /* longword (Start of SD metadata on member) */ #define SD$_META_SIZE 21 /* longword (Size of SD metadata on member) */ #define SD$_DATA_LBN 22 /* longword (Start of pool space on member) */ #define SD$_DATA_SIZE 23 /* longword (Size of pool space on member) */ #define SD$_POOL_DEVICE 24 /* character string (Name of pool device) */ #define SD$_FAMILY_NUMBER 25 /* longword (Familiy number of a SnapDisk) */ #define SD$_MEMBER_NUMBER 26 /* longword (Number within family of a SnapDisk) */ #define SD$_DISK_NAME 27 /* character string (Name of SnapDisk) */ #define SD$_DISK_CAPACITY 28 /* longword (Size/capacity of a SnapDisk) */ #define SD$_DELSPACE 29 /* longword (# segments that can be recovered by deleting SnapDisk) */ #define SD$_DISK_DEVICE 30 /* character string (Name of device as bound to OpenVMS) */ #define SD$_BACKUP_DATE 31 /* Date/time (8 bytes) (Date that recorded snap was last created) */ #define SD$_READS 32 /* longword (Number of read received from user) */ #define SD$_WRITES 33 /* longword (Number of writes received from user) */ #define SD$_SPLIT_READS 34 /* longword (Number of reads that were split by SD) */ #define SD$_SPLIT_WRITES 35 /* longword (Number of writes that were split by SD) */ #define SD$_DISK_READS 36 /* longword (Number of reads to underlying pool units) */ #define SD$_DISK_WRITES 37 /* longword (Number of writes to underlying pool units) */ #define SD$_COPY_OUTS 38 /* longword (Number of copy-on-write operations) */ #define SD$_CONVERT_CANCELS 39 /* longword (Number of cancelled lock requests) */ #define SD$_POOL_FULL_STALLS 40 /* longword (NUmber of requests stalled by pool full) */ #define SD$_SPARE1 41 /* longword */ #define SD$_SPARE2 42 /* longword */ #define SD$_SPARE3 43 /* longword */ #define SD$_SPARE4 44 /* longword */ #define SD$_SPARE5 45 /* longword */ #define SD$_SPARE6 46 /* longword */ #define SD$_SPARE7 47 /* longword */ #define SD$_SPARE8 48 /* longword */ #define SD$_COPY_STATS 49 /* Array of SD$K_COPYCOUNTERS longwords */ #define SD$_DEV_LOCKID 50 /* longword (LockId of device name consistancy lock) */ #define SD$_UID_LOCKID 51 /* longword (LockId of UID name consistancy lock) */ #define SD$K_COPYCOUNTERS 24 /* */ /* options and flags for RTL routines */ /* */ #define SD$M_CONTAINER_DISK 1 #define SD$M_CONVERTED_DISK 2 /* */ /* Function codes for cluster-server requests */ /* */ #define SD$K_CLU_BIND_POOL 1 #define SD$K_CLU_BIND_DISK 2 #define SD$K_CLU_UNBIND 3 /* */ /* 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 */ /* -- */ #ifdef __NEW_STARLET typedef struct _sddevlist { unsigned int sd$l_start_lbn; /* Starting LBN of data space */ unsigned int sd$l_lbn_count; /* Size of data space */ unsigned int sd$l_meta_lbn; /* Location of SnapDisk metadata */ unsigned int sd$l_meta_count; /* Size of metadata area */ #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __short /* And set ptr size default to 32-bit pointers */ #endif void *sd$ps_ucb; /* UCB of pool unit */ unsigned int sd$l_name_length; /* Length of device name */ char sd$t_name [64]; /* Device name */ } SDDEVLIST; #else /* __OLD_STARLET */ typedef struct _sddevlist { unsigned int sd$l_start_lbn; /* Starting LBN of data space */ unsigned int sd$l_lbn_count; /* Size of data space */ unsigned int sd$l_meta_lbn; /* Location of SnapDisk metadata */ unsigned int sd$l_meta_count; /* Size of metadata area */ void *sd$ps_ucb; /* UCB of pool unit */ unsigned int sd$l_name_length; /* Length of device name */ char sd$t_name [64]; /* Device name */ } sddevlist; #endif /* #ifdef __NEW_STARLET */ /* */ /* SD Parameter list - This is used to pass Snapshot Services */ /* parameters/characteristics between the runtime library */ /* and the I/O functions */ /* */ #define SD$M_STALL 0x1 #define SD$M_REDUNDANT 0x2 #define SD$M_RECORD 0x4 #define SD$M_CLUSTER 0x8 #define SD$M_PARTIAL 0x10 #ifdef __NEW_STARLET typedef struct _sdparamlist { __union { unsigned int sd$l_segment_size; /* Segment size for copy-on-write */ unsigned int sd$l_disk_size; /* Disk size for create/disk */ } sd$r_size_overlay; __union { unsigned int sd$l_flags; /* Miscellaneous flags */ __struct { unsigned sd$v_stall : 1; /* Stall/Fail on pool full */ unsigned sd$v_redundant : 1; /* Use redundancy for SnapDisk metadata */ unsigned sd$v_record : 1; /* Record snapshot creation time */ unsigned sd$v_cluster : 1; /* Operation is cluster-wide */ unsigned sd$v_partial : 1; /* Partial bind on pool */ unsigned sd$v_fill_17_ : 3; } sd$r_flags_bits; } sd$r_flags_overlay; } SDPARAMLIST; #if !defined(__VAXC) #define sd$l_segment_size sd$r_size_overlay.sd$l_segment_size #define sd$l_disk_size sd$r_size_overlay.sd$l_disk_size #define sd$l_flags sd$r_flags_overlay.sd$l_flags #define sd$v_stall sd$r_flags_overlay.sd$r_flags_bits.sd$v_stall #define sd$v_redundant sd$r_flags_overlay.sd$r_flags_bits.sd$v_redundant #define sd$v_record sd$r_flags_overlay.sd$r_flags_bits.sd$v_record #define sd$v_cluster sd$r_flags_overlay.sd$r_flags_bits.sd$v_cluster #define sd$v_partial sd$r_flags_overlay.sd$r_flags_bits.sd$v_partial #endif /* #if !defined(__VAXC) */ #else /* __OLD_STARLET */ typedef struct _sdparamlist { __union { unsigned int sd$l_segment_size; /* Segment size for copy-on-write */ unsigned int sd$l_disk_size; /* Disk size for create/disk */ } sd$r_size_overlay; __union { unsigned int sd$l_flags; /* Miscellaneous flags */ __struct { unsigned sd$v_stall : 1; /* Stall/Fail on pool full */ unsigned sd$v_redundant : 1; /* Use redundancy for SnapDisk metadata */ unsigned sd$v_record : 1; /* Record snapshot creation time */ unsigned sd$v_cluster : 1; /* Operation is cluster-wide */ unsigned sd$v_partial : 1; /* Partial bind on pool */ unsigned sd$v_fill_17_ : 3; } sd$r_flags_bits; } sd$r_flags_overlay; } sdparamlist; #if !defined(__VAXC) #define sd$l_segment_size sd$r_size_overlay.sd$l_segment_size #define sd$l_disk_size sd$r_size_overlay.sd$l_disk_size #define sd$l_flags sd$r_flags_overlay.sd$l_flags #define sd$v_stall sd$r_flags_overlay.sd$r_flags_bits.sd$v_stall #define sd$v_redundant sd$r_flags_overlay.sd$r_flags_bits.sd$v_redundant #define sd$v_record sd$r_flags_overlay.sd$r_flags_bits.sd$v_record #define sd$v_cluster sd$r_flags_overlay.sd$r_flags_bits.sd$v_cluster #define sd$v_partial sd$r_flags_overlay.sd$r_flags_bits.sd$v_partial #endif /* #if !defined(__VAXC) */ #endif /* #ifdef __NEW_STARLET */ /* */ /* IOCTL function codes - miscellaneous functions */ /* */ #define SD$K_GET_DISK 1 #define SD$K_GET_STATS 2 #define SD$K_GET_UNIT 3 #define SD$K_POOL_DISK 4 #define SD$K_POOL_INFO 5 #define SD$K_POOL_UNIT 6 #define SD$K_CLU_TEST 7 #define SD$K_STORE_LOCKIDS 8 #define SD$K_RETRIEVE_LOCKIDS 9 #define SD$K_RETRIEVE_MEMBERLIST 10 #define SD$K_SET_TRACE_LEVEL 11 #define SD$K_GET_TRACE_LEVEL 12 #if defined(__VAX) && !defined(__VAXC) #define sd$l_segment_size sd$r_size_overlay.sd$l_segment_size #define sd$l_disk_size sd$r_size_overlay.sd$l_disk_size #define sd$l_flags sd$r_flags_overlay.sd$l_flags #define sd$v_stall sd$r_flags_overlay.sd$r_flags_bits.sd$v_stall #define sd$v_redundant sd$r_flags_overlay.sd$r_flags_bits.sd$v_redundant #define sd$v_record sd$r_flags_overlay.sd$r_flags_bits.sd$v_record #define sd$v_cluster sd$r_flags_overlay.sd$r_flags_bits.sd$v_cluster #define SD$M_STALL sd$m_stall #define SD$M_REDUNDANT sd$m_redundant #define SD$M_RECORD sd$m_record #define SD$M_CLUSTER sd$m_cluster #endif /* */ /* 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 */ /* */ /*-- */ /* */ #define sd$add_units SD$ADD_UNITS #ifdef __NEW_STARLET unsigned int sd$add_units( void *pool_device, void *unit_list, unsigned int flags); #else /* __OLD_STARLET */ unsigned int sd$add_units(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* */ /*++ */ /* */ /* 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 */ /* */ /*-- */ /* */ #define sd$bind_disk SD$BIND_DISK #ifdef __NEW_STARLET unsigned int sd$bind_disk( void *disk_device, void *pool_device, void *disk_name, unsigned int flags); #else /* __OLD_STARLET */ unsigned int sd$bind_disk(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* */ /*++ */ /* */ /* 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 */ /* */ /*-- */ /* */ #define sd$bind_pool SD$BIND_POOL #ifdef __NEW_STARLET unsigned int sd$bind_pool( void *pool_device, void *unit_list, unsigned int flags); #else /* __OLD_STARLET */ unsigned int sd$bind_pool(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* */ /*++ */ /* */ /* 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 */ /* */ /*-- */ /* */ #define sd$create_disk SD$CREATE_DISK #ifdef __NEW_STARLET unsigned int sd$create_disk( void *pool_device, void *disk_name, unsigned int disk_capacity); #else /* __OLD_STARLET */ unsigned int sd$create_disk(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* */ /*++ */ /* */ /* 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 */ /* */ /*-- */ /* */ #define sd$create_pool SD$CREATE_POOL #ifdef __NEW_STARLET unsigned int sd$create_pool( void *unit_list, unsigned int segment_size, unsigned int flags); #else /* __OLD_STARLET */ unsigned int sd$create_pool(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* */ /*++ */ /* */ /* 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 */ /* */ /*-- */ /* */ #define sd$create_snap SD$CREATE_SNAP #ifdef __NEW_STARLET unsigned int sd$create_snap( void *pool_device, void *disk_device, void *disk_name, unsigned int flags); #else /* __OLD_STARLET */ unsigned int sd$create_snap(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* */ /*++ */ /* */ /* 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 */ /* */ /*-- */ /* */ #define sd$delete_disk SD$DELETE_DISK #ifdef __NEW_STARLET unsigned int sd$delete_disk( void *pool_device, void *disk_name); #else /* __OLD_STARLET */ unsigned int sd$delete_disk(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* */ /*++ */ /* */ /* 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 */ /* */ /*-- */ /* */ #define sd$remove_units SD$REMOVE_UNITS #ifdef __NEW_STARLET unsigned int sd$remove_units( void *pool_device, void *unit_list); #else /* __OLD_STARLET */ unsigned int sd$remove_units(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* */ /*++ */ /* */ /* 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 */ /* */ /*-- */ /* */ #define sd$unbind SD$UNBIND #ifdef __NEW_STARLET unsigned int sd$unbind( void *virtual_device, unsigned int flags); #else /* __OLD_STARLET */ unsigned int sd$unbind(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* */ /*++ */ /* */ /* 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 */ /*-- */ /* */ #define sd$get_disk SD$GET_DISK #ifdef __NEW_STARLET unsigned int sd$get_disk( void *disk_device, void *itmlst); #else /* __OLD_STARLET */ unsigned int sd$get_disk(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* */ /*++ */ /* */ /* 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 */ /*-- */ /* */ #define sd$get_pool SD$GET_POOL #ifdef __NEW_STARLET unsigned int sd$get_pool( void *pool_device, void *itmlst); #else /* __OLD_STARLET */ unsigned int sd$get_pool(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* */ /*++ */ /* */ /* 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 */ /* */ /*-- */ /* */ #define sd$get_pool_begin SD$GET_POOL_BEGIN #ifdef __NEW_STARLET unsigned int sd$get_pool_begin( void *pool_device, void *pool_context); #else /* __OLD_STARLET */ unsigned int sd$get_pool_begin(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* */ /*++ */ /* */ /* 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 */ /*-- */ /* */ #define sd$get_pool_disk SD$GET_POOL_DISK #ifdef __NEW_STARLET unsigned int sd$get_pool_disk( void *pool_context, void *itmlst); #else /* __OLD_STARLET */ unsigned int sd$get_pool_disk(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* */ /*++ */ /* */ /* 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 */ /* */ /*-- */ /* */ #define sd$get_pool_end SD$GET_POOL_END #ifdef __NEW_STARLET unsigned int sd$get_pool_end( void *pool_context); #else /* __OLD_STARLET */ unsigned int sd$get_pool_end(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* */ /*++ */ /* */ /* 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 */ /* */ /*-- */ /* */ #define sd$get_pool_unit SD$GET_POOL_UNIT #ifdef __NEW_STARLET unsigned int sd$get_pool_unit( void *pool_context, void *next_unit); #else /* __OLD_STARLET */ unsigned int sd$get_pool_unit(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* */ /*++ */ /* */ /* 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 */ /* */ /*-- */ /* */ #define sd$get_raw_begin SD$GET_RAW_BEGIN #ifdef __NEW_STARLET unsigned int sd$get_raw_begin( void *unit_device, void *unit_context); #else /* __OLD_STARLET */ unsigned int sd$get_raw_begin(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* */ /*++ */ /* */ /* 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 */ /* */ /*-- */ /* */ #define sd$get_raw_end SD$GET_RAW_END #ifdef __NEW_STARLET unsigned int sd$get_raw_end( void *unit_context); #else /* __OLD_STARLET */ unsigned int sd$get_raw_end(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* */ /*++ */ /* */ /* 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 */ /* */ /*-- */ /* */ #define sd$get_raw_next SD$GET_RAW_NEXT #ifdef __NEW_STARLET unsigned int sd$get_raw_next( void *unit_context, void *next_unit); #else /* __OLD_STARLET */ unsigned int sd$get_raw_next(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* */ /*++ */ /* */ /* 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 */ /*-- */ /* */ #define sd$get_raw_info SD$GET_RAW_INFO #ifdef __NEW_STARLET unsigned int sd$get_raw_info( void *unit_context, void *itmlst); #else /* __OLD_STARLET */ unsigned int sd$get_raw_info(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* */ /*++ */ /* */ /* 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 */ /*-- */ /* */ #define sd$get_stats SD$GET_STATS #ifdef __NEW_STARLET unsigned int sd$get_stats( void *pool_device, void *itmlst); #else /* __OLD_STARLET */ unsigned int sd$get_stats(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* */ /*++ */ /* */ /* 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 */ /*-- */ /* */ #define sd$get_unit SD$GET_UNIT #ifdef __NEW_STARLET unsigned int sd$get_unit( void *unit_device, void *itmlst); #else /* __OLD_STARLET */ unsigned int sd$get_unit(__unknown_params); #endif /* #ifdef __NEW_STARLET */ #pragma __member_alignment __restore #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __restore /* Restore the previously-defined required ptr size */ #endif #ifdef __cplusplus } #endif #pragma __standard #endif /* __SDDEF_LOADED */