1 /* BEGIN INCLUDE FILE:        dm_bj_pste.incl.pl1 */
  2 
  3 /* DESCRIPTION
  4 
  5           Layout of the per-system before journal table
  6      entries.  This structure is used to contain information
  7      about a before journal active in a running DMS.  It is
  8      currently also used as the header of a before journal
  9      (see dm_bj_header.incl.pl1).  Version changes to this
 10      structure require either automatic conversion to be set
 11      up, or users to be told to re-create their journals.
 12 
 13           Currently, a bj_pste must be 64 words long;  any
 14      future changes must at least make sure a bj_pste is an
 15      even # of words for the alignment of some of its
 16      elements.
 17 */
 18 
 19 /*  HISTORY:
 20 
 21 Written by Andre Bensoussan, 06/15/82.
 22 Modified:
 23 08/16/82 by Andre Bensoussan: to add stamp_for_last_ci_put.
 24 09/29/82 by Lee A. Newcomb: to fix BJ_PSTE_VERSION_1 and fix some
 25             alignments.
 26 11/01/82 by Andre Bensoussan: to add "stamp_for_last_ci_on_disk",
 27             "n_bi_still_unsafe", and "n_bi_being_saved".
 28 02/08/83 by M. Pandolf: to add append_state structure.
 29 03/19/83 by L. A. Newcomb: to fix up some alignments and spelling problems.
 30 04/27/83 by M. Pandolf: to add meter structure at end.
 31 02/11/85 by Lee A. Newcomb:  Fixed version constant name to agree with its
 32             value of 2; fixed references to page files or PF's; fixed format
 33             of description and history sections.
 34 03/07/85 by Lee A. Newcomb:  Changed a pad word to be txn_storage_limit and
 35             expanded on the description for future generations (no
 36             version was made).
 37 03/27/85 by Lee A. Newcomb:  Changed one of the unused meters to
 38             n_txn_storage_limit_hits (again without a version change).
 39 */
 40 /* format: style2,ll79,ind3,^indprocbody,ifthendo,ifthen,^indnoniterdo,^inddcls,dclind5,idind35,linecom */
 41 
 42 dcl  BJ_PSTE_VERSION_2                  fixed bin internal static
 43                                         options (constant) init (2);
 44 
 45 dcl  bj_pste_ptr                        ptr;
 46 
 47 /* MUST HAVE EVEN NUMBER OR WORDS */
 48 dcl  1 bj_pste                          based (bj_pste_ptr) aligned,
 49        2 version                        fixed bin,
 50        2 bj_ix                          fixed bin,          /* Index of this entry in bj_pst table */
 51        2 lock                           aligned,
 52          3 pid                          bit (36),           /* process ID of lock owner */
 53          3 event                        bit (36),
 54        2 bj_uid                         bit (36),           /* UID of BJ file */
 55        2 ci_size                        fixed bin,          /* In number of bytes */
 56        2 max_size                       fixed bin,          /* In number of ci's */
 57        2 active                         bit (1) aligned,    /* 0 means journal not being used */
 58        2 time_header_updated            fixed bin (71),
 59        2 earliest_meaningful_time       fixed bin (71),     /* time stamp on first valid control interval */
 60        2 update_frequency               fixed bin,          /* Not used yet, probably will be how many CIs */
 61        2 last_rec_id                    bit (36),           /* rec id of the last logical record in journal */
 62        2 n_processes                    fixed bin,          /* Number of processes using this BJ */
 63        2 n_txn                          fixed bin,          /* Number of txn in progress using this BJ */
 64        2 last_ci_info                   aligned,
 65          3 last_ci_buffered             fixed bin (24) uns, /* Last ci encached in the buffer */
 66          3 last_ci_put                  fixed bin (24) uns, /* Last ci put in the BJ */
 67          3 last_ci_flushed              fixed bin (24) uns, /* Last ci for which flush initiated */
 68          3 last_ci_on_disk              fixed bin (24) uns, /* Last ci of that portion of the BJ known to be ... */
 69                                                             /* .. completely on disk */
 70          3 stamp_for_last_ci_put        fixed bin (71),     /* Time stamp associated with the last ci put in the BJ */
 71          3 stamp_for_last_ci_on_disk    fixed bin (71),     /* Time stamp associated with the last ci on disk in the BJ */
 72        2 n_bi_still_unsafe              fixed bin,          /* number of bi's still not on disk */
 73        2 n_bi_being_saved               fixed bin,          /* number of bi's for which flush initiated */
 74        2 buffer_offset                  fixed bin (18) uns, /* Now allocated in the bj_pst segment */
 75        2 txn_storage_limit              fixed bin (35),     /* # of bytes a single txn may write */
 76        2 cl                             aligned,            /* Circular List */
 77          3 origin_ci                    fixed bin (24) uns,
 78          3 lowest_ci                    fixed bin (24) uns,
 79          3 highest_ci                   fixed bin (24) uns,
 80          3 number_ci                    fixed bin (24) uns,
 81        2 append_state                   aligned,
 82          3 current_operation            char (4),           /* equal to "appe" when append in progress */
 83          3 pending_n_txn                fixed bin,          /* n_txn value when append done */
 84          3 pending_last_rec_id          bit (36),           /* last_rec_id value after append done */
 85          3 pending_last_element_id      bit (36),           /* last element id after append done */
 86          3 txte_rec_id_relp             bit (18),           /* rel ptr into seg containing TXT for txte.pending_bj_rec_id */
 87        2 pad_to_even_word1              bit (36) aligned,
 88        2 meters                         aligned,            /* dim (10) fixed bin (71), */
 89          3 n_bi_written                 fixed bin (71),     /* meter (1) */
 90          3 n_bi_bytes_written           fixed bin (71),     /* meter (2) */
 91          3 n_journal_full               fixed bin (71),     /* meter (3) */
 92          3 n_successful_recycles        fixed bin (71),     /* meter (4) */
 93          3 n_ci_recycled                fixed bin (71),     /* meter (5) */
 94          3 n_txn_started                fixed bin (71),     /* meter (6) */
 95          3 n_non_null_txn               fixed bin (71),     /* meter (7) */
 96          3 n_txn_storage_limit_hits     fixed bin (71),     /* meter (8) */
 97          3 meter                        (9:10) fixed bin (71),
 98                                                             /* meter (9) - meter (10) */
 99        2 pad_to_64_words                (6) bit (36);       /* 64 is even (see below) */
100 
101 
102 /*  END INCLUDE FILE:         dm_bj_pste.incl.pl1 */