/**/ /***************************************************************************/ /** **/ /** © Copyright 2010, Hewlett-Packard Development Company, L.P. **/ /** **/ /** Confidential computer software. Valid license from HP and/or **/ /** its subsidiaries required for possession, use, or copying. **/ /** **/ /** Consistent with FAR 12.211 and 12.212, Commercial Computer Software, **/ /** Computer Software Documentation, and Technical Data for Commercial **/ /** Items are licensed to the U.S. Government under vendor's standard **/ /** commercial license. **/ /** **/ /** Neither HP nor any of its subsidiaries shall be liable for technical **/ /** or editorial errors or omissions contained herein. The information **/ /** in this document is provided "as is" without warranty of any kind and **/ /** is subject to change without notice. The warranties for HP products **/ /** are set forth in the express limited warranty statements accompanying **/ /** such products. Nothing herein should be construed as constituting an **/ /** additional warranty. **/ /** **/ /***************************************************************************/ /********************************************************************************************************************************/ /* Created: 30-Mar-2010 17:24:19 by OpenVMS SDL EV3-3 */ /* Source: 04-NOV-1999 15:48:23 $1$DGA7274:[LIB_H.SRC]F11BCDEF.SDL;1 */ /********************************************************************************************************************************/ /*** MODULE $F11BCDEF ***/ #ifndef __F11BCDEF_LOADED #define __F11BCDEF_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 /*+ */ /* F11BC - Files 11 Block Cache */ /* */ /* Header area which describes block cache used by F11BXQP. */ /* */ /*- */ /* */ /* The next four constants are to do with minimum cache allowances for XQP activity */ /* per process. These minima control not ionly minimum cache size but also */ /* stalling for XQP activity. */ /* */ #define F11BC$K_MAPCACHE_MIN 1 /* Bitmap.sys buffers per process */ #define F11BC$K_HDRCACHE_MIN 4 /* Indexf.sys buffers per process */ #define F11BC$K_DIRCACHE_MIN 2 /* Dir/quota buffers per process */ #define F11BC$K_DINDXCACHE_MIN 1 /* Directory index `buffers' per process */ /* The next four constants are to control the minimum number of fluid buffers a */ /* process can hold in the XQP cache. (Fluid buffers == buffers that are not pinned in cache) */ /* */ #define F11BC$K_MAPCACHE_FLUIDMIN 1 /* Bitmap.sys buffers per process */ #define F11BC$K_HDRCACHE_FLUIDMIN 3 /* Indexf.sys buffers per process */ #define F11BC$K_DIRCACHE_FLUIDMIN 2 /* Dir/quota buffers per process */ #define F11BC$K_DINDXCACHE_FLUIDMIN 1 /* Directory index `buffers' per process */ #define F11BC$K_NUM_POOLS 4 /* Number of buffer pools. */ #define F11BC$S_F11BCDEF 240 /* Old size name - synonym */ #ifdef __cplusplus /* Define structure prototypes */ struct _bfrd; struct _bfrl; #endif /* #ifdef __cplusplus */ typedef struct _f11bc { void *f11bc$l_bufbase; /* Base address of buffer area. */ unsigned int f11bc$l_bufsize; /* Size of buffer area in bytes. */ unsigned short int f11bc$w_size; /* Standard size field. */ unsigned char f11bc$b_type; /* Standard type field. */ unsigned char f11bc$b_subtype; /* Standard subtype field. */ int f11bc$l_fill1; /* Position of old size field (Now Reserved) */ __union { unsigned __int64 f11bc$q_qrealsize; /* Structure size as a quadword. */ unsigned int f11bc$l_realsize; /* Structure size as a longword. */ } f11bc$r_realsize_overlay; void *f11bc$l_lbnhshbas; /* Base of LBN hash table. */ unsigned int f11bc$l_lbnhshcnt; /* Count of entries in LBN hash tbl. */ unsigned int f11bc$l_bfrcnt; /* Total buffer count. */ struct _bfrd *f11bc$l_bfrdbas; /* Buffer descriptor base address. */ struct _bfrl *f11bc$l_bfrldbas; /* Buffer lock descriptor base addr. */ void *f11bc$l_blhshbas; /* Base addr of buffer lock hash tbl. */ unsigned int f11bc$l_blhshcnt; /* Num entries in buff lock hash tbl. */ void *f11bc$a_freebfrl; /* Address of first free buffer lock block. */ __int64 f11bc$q_pool_lru [4]; /* Per pool LRU listhead. */ __int64 f11bc$q_pool_waitq [4]; /* Per pool cache wait listhead. */ int f11bc$l_waitcnt [4]; /* Count of waiters per pool. */ int f11bc$l_poolavail [4]; /* Available buffers per pool. */ int f11bc$l_poolcnt [4]; /* Count of buffers per pool. */ void *f11bc$l_ambigqfl; /* Ambiguity queue forward link. */ void *f11bc$l_ambigqbl; /* Ambiguity queue back link. */ /* */ /* Cache performance counters. */ /* */ unsigned int f11bc$l_process_hits; /* In-process buffer hits. */ unsigned int f11bc$l_valid_hits; /* Valid buffer cache hits. */ unsigned int f11bc$l_invalid_hits; /* Buffer found but invalid contents. */ unsigned int f11bc$l_misses; /* Buffer not in cache at all. */ unsigned int f11bc$l_disk_reads; /* Buffer reads from disk. */ unsigned int f11bc$l_disk_writes; /* Buffer writes to disk. */ unsigned int f11bc$l_cache_serial; /* Cache serialization calls. */ unsigned int f11bc$l_cache_stalls; /* Cache serialization stalls. */ unsigned int f11bc$l_buffer_stalls; /* Stalls for lack of buffers. */ char f11bc$t_cachename [24]; /* Name of this cache (display only). */ void *f11bc$l_log_buffer; /* Pointer to activity log buffer */ } F11BC; #if !defined(__VAXC) #define f11bc$q_qrealsize f11bc$r_realsize_overlay.f11bc$q_qrealsize #define f11bc$l_realsize f11bc$r_realsize_overlay.f11bc$l_realsize #endif /* #if !defined(__VAXC) */ /* */ /* Buffer descriptors. */ /* */ #define BFRD$M_DIRTY 0x4 #define BFRD$M_VALID 0x8 #define BFRD$M_NOPURGE 0x10 #define BFRD$M_ASYNCH_IN_PROG 0x20 #define BFRD$M_PINNED 0x40 #define BFRD$S_BFRDDEF 48 /* Old size name - synonym */ #ifdef __cplusplus /* Define structure prototypes */ struct _vfrd; struct _ucb; #endif /* #ifdef __cplusplus */ typedef struct _bfrd { struct _bfrd *bfrd$l_qfl; /* Queue forward link. */ struct _vfrd *bfrd$l_qbl; /* Queue back link. */ unsigned int bfrd$l_lbn; /* LBN of buffer. */ struct _ucb *bfrd$l_ucb; /* UCB of buffer. */ unsigned int bfrd$l_lockbasis; /* Unique file identifier. */ unsigned int bfrd$l_seqnum; /* Buffer validation sequence number. */ __union { unsigned char bfrd$b_flags; /* Status flags. */ __struct { unsigned bfrd$v_pool : 2; /* Pool number of this buffer. */ unsigned bfrd$v_dirty : 1; /* Buffer has been modified. */ unsigned bfrd$v_valid : 1; /* Buffer has been read from disk. */ unsigned bfrd$v_nopurge : 1; /* Do not purge from process cache */ unsigned bfrd$v_asynch_in_prog : 1; /* This buffer has an outstanding deferred write */ unsigned bfrd$v_pinned : 1; /* Buffer is pinned in cache */ unsigned bfrd$v_fill_0_ : 1; } bfrd$r_flags_bits; } bfrd$r_flags_overlay; unsigned char bfrd$b_btype; /* Buffer type. */ short int bfrd$w_fill_1; unsigned int bfrd$l_curpid; /* Index of current process. */ unsigned int bfrd$l_nxtbfrd; /* Index of next BFRD (hash chain). */ void *bfrd$a_bfrl; /* Address of buffer lock descriptor. */ unsigned int bfrd$l_same_bfrl; /* Index to next BFRD under same BFRL */ unsigned int bfrd$l_thread; /* Thread number */ } BFRD; #if !defined(__VAXC) #define bfrd$b_flags bfrd$r_flags_overlay.bfrd$b_flags #define bfrd$v_pool bfrd$r_flags_overlay.bfrd$r_flags_bits.bfrd$v_pool #define bfrd$v_dirty bfrd$r_flags_overlay.bfrd$r_flags_bits.bfrd$v_dirty #define bfrd$v_valid bfrd$r_flags_overlay.bfrd$r_flags_bits.bfrd$v_valid #define bfrd$v_nopurge bfrd$r_flags_overlay.bfrd$r_flags_bits.bfrd$v_nopurge #define bfrd$v_asynch_in_prog bfrd$r_flags_overlay.bfrd$r_flags_bits.bfrd$v_asynch_in_prog #define bfrd$v_pinned bfrd$r_flags_overlay.bfrd$r_flags_bits.bfrd$v_pinned #endif /* #if !defined(__VAXC) */ /* */ /* Buffer lock descriptor blocks. */ /* */ #define BFRL$S_BFRLDEF 24 /* Old size name - synonym */ typedef struct _bfrl { void *bfrl$a_nxtbfrl; /* Address of next BFRL in hash chain. */ unsigned int bfrl$l_bfrd; /* Index to first BFRD under this lock */ unsigned int bfrl$l_refcnt; /* Number of buffers backed by this lock. */ unsigned int bfrl$l_lkid; /* Lock ID of buffer lock. */ unsigned int bfrl$l_lckbasis; /* Unique file identifier. */ unsigned int bfrl$l_parlkid; /* Unique volume set identifier. */ } BFRL; #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 /* __F11BCDEF_LOADED */