-- --**************************************************************************** --* * --* Copyright (c) 2001 * --* by DIGITAL Equipment Corporation, Maynard, Mass. * --* * --* This software is furnished under a license and may be used and copied * --* only in accordance with the terms of such license and with the * --* inclusion of the above copyright notice. This software or any other * --* copies thereof may not be provided or otherwise made available to any * --* other person. No title to and ownership of the software is hereby * --* transferred. * --* * --* The information in this software is subject to change without notice * --* and should not be construed as a commitment by DIGITAL Equipment * --* Corporation. * --* * --* DIGITAL assumes no responsibility for the use or reliability of its * --* software on equipment which is not supplied by DIGITAL. * --* * --**************************************************************************** --******************************************************************************************************************** -- Created: 15-MAR-2001 22:50:35 by OpenVMS SDL EV1-33 -- Source: 20-AUG-1998 12:37:37 $11$DUA933:[LIB_ADA.LIS]CLUDCBDEF.SDL;1 --******************************************************************************************************************** with SYSTEM; use SYSTEM; with STARLET; use STARLET; with CONDITION_HANDLING; use CONDITION_HANDLING; package CLUDCBDEF is -- module $CLUDCBDEF --+ -- CLUDCB - Cluster Quorum Disk Control Block --- CLUDCB_M_QS_REM_INA : constant := 16#00000001#; CLUDCB_M_QS_REM_ACT : constant := 16#00000002#; CLUDCB_M_QS_NOT_READY : constant := 16#00000004#; CLUDCB_M_QS_READY : constant := 16#00000008#; CLUDCB_M_QS_ACTIVE : constant := 16#00000010#; CLUDCB_M_QS_CLUSTER : constant := 16#00000020#; CLUDCB_M_QS_VOTE : constant := 16#00000040#; CLUDCB_M_QF_INQTMO : constant := 16#00000001#; CLUDCB_M_QF_INQIP : constant := 16#00000002#; CLUDCB_M_QF_TIM : constant := 16#00000004#; CLUDCB_M_QF_RIP : constant := 16#00000008#; CLUDCB_M_QF_WIP : constant := 16#00000010#; CLUDCB_M_QF_ERROR : constant := 16#00000020#; CLUDCB_M_QF_FIRST_ERR : constant := 16#00000040#; CLUDCB_M_QF_WRL_ERR : constant := 16#00000080#; CLUDCB_M_QF_NOACCESS : constant := 16#00000100#; CLUDCB_M_CSP_ACK : constant := 16#00000001#; CLUDCB_M_CSP_LBN_VALID : constant := 16#00000002#; CLUDCB_M_CSP_MVHELP : constant := 16#00000004#; CLUDCB_K_F_LENGTH : constant := 52; -- Length of fixed portion of CLUDCB CLUDCB_C_F_LENGTH : constant := 52; -- Length of fixed portion of CLUDCB CLUDCB_K_LENGTH : constant := 568; -- Length of CLUDCB CLUDCB_C_LENGTH : constant := 568; -- Length of CLUDCB -- The quorum disk is specified with 4 sysgen parameters. DISK_QUORUM1 CLUDCB_S_DISK_QUORUM : constant := 16; type CLUDCB_STATE_TYPE is -- Quorum disk state bits record QS_REM_INA : BOOLEAN; -- Remote inactive QS_REM_ACT : BOOLEAN; -- Remote active QS_NOT_READY : BOOLEAN; -- Not ready QS_READY : BOOLEAN; -- Ready QS_ACTIVE : BOOLEAN; -- Active QS_CLUSTER : BOOLEAN; -- Active and this node is a cluster member QS_VOTE : BOOLEAN; -- Potential vote FILLER_1 : UNSIGNED_9; end record; for CLUDCB_STATE_TYPE use record QS_REM_INA at 0 range 0 .. 0; QS_REM_ACT at 0 range 1 .. 1; QS_NOT_READY at 0 range 2 .. 2; QS_READY at 0 range 3 .. 3; QS_ACTIVE at 0 range 4 .. 4; QS_CLUSTER at 0 range 5 .. 5; QS_VOTE at 0 range 6 .. 6; FILLER_1 at 0 range 7 .. 15; end record; for CLUDCB_STATE_TYPE'SIZE use 16; CLUDCB_STATE_TYPE_INIT : constant CLUDCB_STATE_TYPE := (QS_REM_INA => FALSE, QS_REM_ACT => FALSE, QS_NOT_READY => FALSE, QS_READY => FALSE, QS_ACTIVE => FALSE, QS_CLUSTER => FALSE, QS_VOTE => FALSE, FILLER_1 => 0); type CLUDCB_FLAGS_TYPE is -- CLUDCB status bits record QF_INQTMO : BOOLEAN; -- Status inquiry timed out QF_INQIP : BOOLEAN; -- Remote inquiry in progress QF_TIM : BOOLEAN; -- Read or write timed out QF_RIP : BOOLEAN; -- Read in progress QF_WIP : BOOLEAN; -- Write in progress QF_ERROR : BOOLEAN; -- Quorum disk error has been reported QF_FIRST_ERR : BOOLEAN; -- First error has already been seen QF_WRL_ERR : BOOLEAN; -- Quorum disk is write-locked QF_NOACCESS : BOOLEAN; -- Never access the quorum disk directly FILLER_1 : UNSIGNED_7; end record; for CLUDCB_FLAGS_TYPE use record QF_INQTMO at 0 range 0 .. 0; QF_INQIP at 0 range 1 .. 1; QF_TIM at 0 range 2 .. 2; QF_RIP at 0 range 3 .. 3; QF_WIP at 0 range 4 .. 4; QF_ERROR at 0 range 5 .. 5; QF_FIRST_ERR at 0 range 6 .. 6; QF_WRL_ERR at 0 range 7 .. 7; QF_NOACCESS at 1 range 0 .. 0; FILLER_1 at 1 range 1 .. 7; end record; for CLUDCB_FLAGS_TYPE'SIZE use 16; CLUDCB_FLAGS_TYPE_INIT : constant CLUDCB_FLAGS_TYPE := (QF_INQTMO => FALSE, QF_INQIP => FALSE, QF_TIM => FALSE, QF_RIP => FALSE, QF_WIP => FALSE, QF_ERROR => FALSE, QF_FIRST_ERR => FALSE, QF_WRL_ERR => FALSE, QF_NOACCESS => FALSE, FILLER_1 => 0); type CLUDCB_CSP_FLAGS_TYPE is -- Flags for interlocked communication with CSP record CSP_ACK : BOOLEAN; -- CSP request has been acknowledged CSP_LBN_VALID : BOOLEAN; -- CSP has found a quorum file CSP_MVHELP : BOOLEAN; -- Restart mount verification FILLER_1 : UNSIGNED_13; end record; for CLUDCB_CSP_FLAGS_TYPE use record CSP_ACK at 0 range 0 .. 0; CSP_LBN_VALID at 0 range 1 .. 1; CSP_MVHELP at 0 range 2 .. 2; FILLER_1 at 0 range 3 .. 15; end record; for CLUDCB_CSP_FLAGS_TYPE'SIZE use 16; CLUDCB_CSP_FLAGS_TYPE_INIT : constant CLUDCB_CSP_FLAGS_TYPE := (CSP_ACK => FALSE, CSP_LBN_VALID => FALSE, CSP_MVHELP => FALSE, FILLER_1 => 0); type CLUDCB_TYPE is record CLUDCBFL : UNSIGNED_LONGWORD; -- Forward Link (not used) CLUDCBBL : UNSIGNED_LONGWORD; -- Backward Link (not used) SIZE : UNSIGNED_WORD; -- Size of CLUDCB (bytes) TYP : UNSIGNED_BYTE; -- Structure type SUBTYP : UNSIGNED_BYTE; -- Structure subtype UCB : UNSIGNED_LONGWORD; -- Address of quorum disk UCB IRP : UNSIGNED_LONGWORD; -- Address of IRP TQE : UNSIGNED_LONGWORD; -- Address of timer queue entry WATCHER_CSID : UNSIGNED_LONGWORD; -- CSID of quorum file watcher ACT_COUNT : UNSIGNED_LONGWORD; -- Saved activity counter QFLBN : UNSIGNED_LONGWORD; -- Quorum file logical block number STATE : CLUDCB_STATE_TYPE; -- Quorum disk state bits FLAGS : CLUDCB_FLAGS_TYPE; -- CLUDCB status bits CSP_FLAGS : CLUDCB_CSP_FLAGS_TYPE; -- Flags for interlocked communication with CSP COUNTER : UNSIGNED_BYTE; -- Iteration counter FILLER_1 : UNSIGNED_BYTE; -- unused FID : UNSIGNED_WORD_ARRAY (1 .. 3); -- File ID of the incarnation file FILLER_2 : UNSIGNED_WORD; -- unused FILLER_3 : STRING(1 .. 0); -- Longword align buffer BUFFER : STRING(1 .. 516); -- Quorum file buffer -- to DISK_QUORUM4. Each parameter can specify 4 bytes. end record; for CLUDCB_TYPE use record CLUDCBFL at 0 range 0 .. 31; CLUDCBBL at 4 range 0 .. 31; SIZE at 8 range 0 .. 15; TYP at 10 range 0 .. 7; SUBTYP at 11 range 0 .. 7; UCB at 12 range 0 .. 31; IRP at 16 range 0 .. 31; TQE at 20 range 0 .. 31; WATCHER_CSID at 24 range 0 .. 31; ACT_COUNT at 28 range 0 .. 31; QFLBN at 32 range 0 .. 31; STATE at 36 range 0 .. 15; FLAGS at 38 range 0 .. 15; CSP_FLAGS at 40 range 0 .. 15; COUNTER at 42 range 0 .. 7; FILLER_1 at 43 range 0 .. 7; FID at 44 range 0 .. 47; FILLER_2 at 50 range 0 .. 15; FILLER_3 at 52 range 0 .. -1; BUFFER at 52 range 0 .. 4127; end record; for CLUDCB_TYPE'SIZE use 4544; CLUDCB_TYPE_INIT : constant CLUDCB_TYPE := (CLUDCBFL => 0, CLUDCBBL => 0, SIZE => 0, TYP => 0, SUBTYP => 0, UCB => 0, IRP => 0, TQE => 0, WATCHER_CSID => 0, ACT_COUNT => 0, QFLBN => 0, STATE => CLUDCB_STATE_TYPE_INIT, FLAGS => CLUDCB_FLAGS_TYPE_INIT, CSP_FLAGS => CLUDCB_CSP_FLAGS_TYPE_INIT, COUNTER => 0, FILLER_1 => 0, FID => (others => 0), FILLER_2 => 0, FILLER_3 => (others => ASCII.NUL), BUFFER => (others => ASCII.NUL)); end CLUDCBDEF;