COMPILATION LISTING OF SEGMENT disk_left_ Compiled by: Multics PL/I Compiler, Release 30, of February 16, 1988 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 07/20/88 1027.0 mst Wed Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 disk_left_: proc (avail, left); 12 13 dcl (avail, left) fixed bin (35); /* Return arguments. */ 14 15 /* DISK_LEFT_ - This program is called by system_total to find out the current disk occupancy. 16* 17* Method stolen from the device_meters command written by NIM. 18* 19* THVV 20* Modified March, 1982, J. Bongiovanni, for new PVTE and considerable clean-up 21**/ 22 23 dcl j fixed bin; /* Counter. */ 24 dcl ec fixed bin (35); /* error code from ring0_get_ */ 25 dcl pvt_size fixed bin (19); 26 dcl pvt_lth fixed bin; 27 28 dcl MYNAME char (10) int static options (constant) init ("disk_left_"); 29 30 dcl com_err_ entry options (variable); 31 dcl get_temp_segment_ entry (char(*), ptr, fixed bin(35)); 32 dcl release_temp_segment_ entry (char(*), ptr, fixed bin(35)); 33 dcl ring_zero_peek_$get_max_length entry (char(*), fixed bin(19), fixed bin(35)); 34 dcl ring_zero_peek_$by_name entry (char(*), fixed bin(18), ptr, fixed bin(19), fixed bin(35)); 35 36 37 dcl (addr, addrel, baseno, bin, null, size) builtin; 38 39 dcl cleanup condition; 40 41 42 /* ======================================================= */ 43 44 avail, left = 0; /* Clear arguments. */ 45 46 pvtp = null (); 47 on cleanup call clean_out; 48 49 call get_temp_segment_ (MYNAME, pvtp, ec); 50 if ec ^= 0 then do; 51 call com_err_ (ec, MYNAME, "Getting temp segment."); 52 return; 53 end; 54 55 call ring_zero_peek_$get_max_length ("pvt", pvt_size, ec); 56 if ec ^= 0 then do; 57 CANNOT_GET_PVT: 58 call com_err_ (ec, MYNAME, "pvt"); 59 return; 60 end; 61 call ring_zero_peek_$by_name ("pvt", 0, pvtp, pvt_size, ec); 62 if ec ^= 0 then goto CANNOT_GET_PVT; 63 64 pvt_arrayp = addr (pvt.array); 65 do j = 1 to pvt.n_entries; 66 pvtep = addr (pvt_array (j)); 67 if pvte.used then do; 68 left = left + pvte.nleft; /* Obtain records left. */ 69 avail = avail + pvte.totrec; 70 /* Close enough for now.. shd use true value someday */ 71 end; 72 end; 73 74 call clean_out; 75 return; 76 77 clean_out: 78 proc; 79 80 if pvtp ^= null () 81 then call release_temp_segment_ (MYNAME, pvtp, ec); 82 pvtp = null (); 83 84 end clean_out; 85 86 87 /* BEGIN INCLUDE FILE ... pvt.incl.pl1 ... last modified January 1982 */ 1 2 1 3 1 4 /* The physical volume table (PVT) is a wired-down table. 1 5* It has one entry for each spindle present, be it for 1 6* Storage System or "I/O" use. 1 7**/ 1 8 1 9 dcl pvt$ ext, 1 10 pvtp ptr; 1 11 1 12 1 13 dcl 1 pvt based (pvtp) aligned, 1 14 1 15 2 n_entries fixed bin (17), /* number of PVT entries */ 1 16 2 max_n_entries fixed bin (17), /* max number of PVT entries */ 1 17 2 n_in_use fixed bin (17), /* number of PVT entries in use */ 1 18 2 rwun_pvtx fixed bin, /* rewind_unloading pvtx */ 1 19 2 shutdown_state fixed bin, /* state of previous shutdown */ 1 20 2 esd_state fixed bin, /* state of ESD, >0 iff in ESD */ 1 21 2 prev_shutdown_state fixed bin, /* shutdown state of previous bootload */ 1 22 2 prev_esd_state fixed bin, /* ESD state of previous bootload */ 1 23 1 24 2 time_of_bootload fixed bin (71), /* Time of bootload */ 1 25 2 root_lvid bit (36) aligned, /* Logical volume ID of Root Logical Volume (RLV) */ 1 26 2 root_pvid bit (36) aligned, /* Physical volume ID of Root Physical Volume (RPV) */ 1 27 2 root_pvtx fixed bin, /* Index to PVTE for Root Physical Volume (RPV) */ 1 28 2 root_vtocx fixed bin, /* VTOCE index for root (>) */ 1 29 2 disk_table_vtocx fixed bin, /* VTOCE index for disk table on RPV */ 1 30 2 disk_table_uid bit (36) aligned, /* File System UID for disk_table */ 1 31 1 32 2 rpvs_requested bit (1) aligned, /* RPVS keyword given on BOOT */ 1 33 2 rpv_needs_salv bit (1) aligned, /* RPV required (not requested) salvage */ 1 34 2 rlv_needs_salv bit (1) aligned, /* RLV required (not requested) salvage */ 1 35 2 volmap_lock_wait_constant bit (36) aligned,/* For constructing wait event: OR pvte_rel into lower */ 1 36 2 volmap_idle_wait_constant bit (36) aligned,/* For constructing wait event: OR pvte_rel into lower */ 1 37 2 vtoc_map_lock_wait_constant bit (36) aligned, /* For constructing wait event: OR pvte_rel into lower */ 1 38 2 n_volmap_locks_held fixed bin (17), /* Current number of volmap locks held */ 1 39 2 n_vtoc_map_locks_held fixed bin (17), /* Current number of VTOC Map locks held */ 1 40 1 41 2 last_volmap_time fixed bin (71), /* Time a volmap was last locked/unlocked */ 1 42 2 last_vtoc_map_time fixed bin (71), /* Time a VTOC Map was last locked/unlocked */ 1 43 2 total_volmap_lock_time fixed bin (71), /* Total time volmap's were locked (integral) */ 1 44 2 total_vtoc_map_lock_time fixed bin (71), /* Total time VTOC Maps were locked (integral) */ 1 45 1 46 2 n_volmap_locks fixed bin (35), /* Number times a volmap was locked */ 1 47 2 n_vtoc_map_locks fixed bin (35), /* Number times a vtoc_map was locked */ 1 48 2 volmap_lock_nowait_calls fixed bin (35), /* Number calls to lock volmap, no wait */ 1 49 2 volmap_lock_nowait_fails fixed bin (35), /* Number times lock failed */ 1 50 2 volmap_lock_wait_calls fixed bin (35), /* Number calls to lock volmap, wait */ 1 51 2 volmap_lock_wait_fails fixed bin (35), /* Number times lock failed */ 1 52 2 pad (2) bit (36) aligned, 1 53 1 54 2 array fixed bin (71); /* Array of PVTE's -- must be double-word aligned */ 1 55 1 56 1 57 1 58 /* END INCLUDE FILE ...pvt.incl.pl1 */ 87 88 /* START OF: pvte.incl.pl1 July 1982 * * * * * * * * * * * * * * * * */ 2 2 2 3 /* Added pc_vacating, Benson Margulies 84-10-17 */ 2 4 2 5 /****^ HISTORY COMMENTS: 2 6* 1) change(86-04-11,Fawcett), approve(86-04-11,MCR7383), 2 7* audit(86-05-29,GDixon), install(86-07-18,MR12.0-1098): 2 8* Add the support for subvolumes 2 9* 2) change(86-04-11,Lippard), approve(86-04-11,MCR7309), 2 10* audit(86-05-29,GDixon), install(86-07-18,MR12.0-1098): 2 11* Add root_lv flag to mount RLVs that do not have hardcore partitions. 2 12* 3) change(88-05-27,GWMay), approve(88-05-27,MCR7883), 2 13* audit(88-06-14,Beattie), install(88-07-19,MR12.2-1061): 2 14* Added inconsistent_dbm bit for determining the status of volume 2 15* dumper bit maps. 2 16* END HISTORY COMMENTS */ 2 17 2 18 dcl pvt$array aligned external; 2 19 dcl pvt$max_n_entries fixed bin external; 2 20 2 21 dcl pvt_arrayp ptr; 2 22 dcl pvtep ptr; 2 23 2 24 dcl 1 pvt_array (pvt$max_n_entries) aligned like pvte based (pvt_arrayp); 2 25 2 26 dcl 1 pvte based (pvtep) aligned, 2 27 2 28 2 pvid bit (36), /* physical volume ID */ 2 29 2 30 2 lvid bit (36), /* logical volume ID */ 2 31 2 32 2 dmpr_in_use (3) bit (1) unaligned, /* physical volume dumper interlock */ 2 33 2 is_sv bit (1) unaligned, /* true if this entry defines a subvolume */ 2 34 2 root_lv bit (1) unaligned, /* true if this is on the root LV */ 2 35 2 removable_pack bit (1) unaligned, /* true if packs are eremoveable */ 2 36 2 inconsistent_dbm bit (1) unaligned, /* true if trouble count is incremented */ 2 37 2 pad3 bit (2) unaligned, 2 38 2 brother_pvtx fixed bin (8) unaligned,/* next pvte in lv chain */ 2 39 2 skip_queue_count fixed bin (18) unsigned unaligned, /* number of times this pv skipped for per-proc allocation due to saturation */ 2 40 2 41 2 42 2 43 2 devname char (4), /* device name */ 2 44 2 45 (2 device_type fixed bin (8), /* device type */ 2 46 2 logical_area_number fixed bin (8), /* disk drive number */ 2 47 2 used bit (1), /* TRUE if this entry is used */ 2 48 2 storage_system bit (1), /* TRUE for storage system (vs io disk) */ 2 49 2 permanent bit (1), /* TRUE if cannot be demounted */ 2 50 2 testing bit (1), /* Protocol bit for read_disk$test */ 2 51 2 being_mounted bit (1), /* TRUE if the physical volume is being mounted */ 2 52 2 being_demounted bit (1), /* TRUE if the pysical volume is being demounted */ 2 53 2 check_read_incomplete bit (1), /* page control should check read incomplete */ 2 54 2 device_inoperative bit (1), /* TRUE if disk_control decides dev busted */ 2 55 2 rpv bit (1), /* TRUE if this is the root physical volume */ 2 56 2 scav_check_address 2 57 bit (1), /* TRUE is page control should check deposits/withdrawals against scavenger table */ 2 58 2 deposit_to_volmap bit (1), /* TRUE if deposits should got to volume map, not stock */ 2 59 2 being_demounted2 bit (1), /* No more vtoc I/O during demount */ 2 60 2 pc_vacating bit (1), /* No more withdraws from this volume -- for debugging */ 2 61 2 vacating bit (1), /* don't put new segs on this vol */ 2 62 2 hc_part_used bit (1), /* HC part set up by init_pvt */ 2 63 2 volmap_lock_notify bit (1) unal, /* TRUE if notify required when volmap lock is unlocked */ 2 64 2 volmap_idle_notify bit (1) unal, /* TRUE if notify required when volmap state is idle */ 2 65 2 vtoc_map_lock_notify bit (1) unal, /* TRUE if notify required when vtoc map lock is unlocked */ 2 66 2 67 2 68 2 n_free_vtoce fixed bin (17), /* number of free VTOC entries */ 2 69 2 vtoc_size fixed bin (17), /* size of the VTOC part of the disk - in records */ 2 70 2 71 2 dbmrp (2) bit (18), /* rel ptr to dumber bit maps for this volume */ 2 72 2 73 2 nleft fixed bin (17), /* number of records left */ 2 74 2 totrec fixed bin (17)) unaligned, /* Total records in this map */ 2 75 2 76 2 dim_info bit (36), /* Information peculiar to DIM */ 2 77 2 sv_num fixed bin, /* the number of this subvolume starting at 0 */ 2 78 2 num_of_svs fixed bin, /* number of subvolumes for this device */ 2 79 2 records_per_cyl fixed bin, 2 80 2 record_factor fixed bin, /* the record factor for logical to real seek calculation */ 2 81 2 sv_name char (2) aligned, 2 82 2 curn_dmpr_vtocx (3) fixed bin unaligned,/* current vtocx being dumped */ 2 83 2 n_vtoce fixed bin unaligned, /* number of vtoce on this volume */ 2 84 2 85 2 baseadd fixed bin (18) uns unaligned, /* Base of paging region */ 2 86 2 pad2 bit (18) unaligned, 2 87 2 88 2 pad_for_mod_2 fixed bin (35), /* Make volmap_seg_sdw double word aligned */ 2 89 2 90 2 volmap_seg_sdw fixed bin (71), /* SDW describing volmap_seg */ 2 91 2 92 2 volmap_astep ptr unal, /* Packed pointer to ASTE for volmap_seg */ 2 93 2 94 2 volmap_offset bit (18) unal, /* Offset in volmap_seg of volume map */ 2 95 2 vtoc_map_offset bit (18) unal, /* Offset in volmap_seg of VTOC map */ 2 96 2 97 2 98 2 volmap_lock bit (36) aligned, /* Lock on volume map operations */ 2 99 2 100 2 vtoc_map_lock bit (36) aligned, /* Lock on VTOC map operations */ 2 101 2 102 2 volmap_stock_ptr ptr unal, /* Packed pointer to record stock */ 2 103 2 104 2 vtoc_map_stock_ptr ptr unal, /* Packed pointer to VTOCE stock */ 2 105 2 106 2 volmap_async_state fixed bin (17) unaligned, /* Asynchronous update state of Volume Map */ 2 107 2 volmap_async_page fixed bin (17) unaligned, /* Page number for asynchronous update */ 2 108 2 109 2 vol_trouble_count fixed bin (17) unaligned, /* Count of inconsistencies since last salvage */ 2 110 2 scavenger_block_rel bit (18) unaligned; /* Offset to scavenger block, ^0 => scavenging */ 2 111 2 112 2 113 dcl (VOLMAP_ASYNC_IDLE init (0), /* for volmap_async_state */ 2 114 VOLMAP_ASYNC_READ init (1), 2 115 VOLMAP_ASYNC_WRITE init (2)) fixed bin int static options (constant); 2 116 2 117 2 118 /* END OF: pvte.incl.pl1 * * * * * * * * * * * * * * * * */ 88 89 90 91 end disk_left_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 07/19/88 1533.3 disk_left_.pl1 >special_ldd>install>MR12.2-1061>disk_left_.pl1 87 1 05/27/82 1525.8 pvt.incl.pl1 >ldd>include>pvt.incl.pl1 88 2 07/19/88 1523.2 pvte.incl.pl1 >special_ldd>install>MR12.2-1061>pvte.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. MYNAME 000000 constant char(10) initial packed unaligned dcl 28 set ref 49* 51* 57* 80* addr builtin function dcl 37 ref 64 66 array 50 based fixed bin(71,0) level 2 dcl 1-13 set ref 64 avail parameter fixed bin(35,0) dcl 13 set ref 11 44* 69* 69 cleanup 000104 stack reference condition dcl 39 ref 47 com_err_ 000010 constant entry external dcl 30 ref 51 57 ec 000101 automatic fixed bin(35,0) dcl 24 set ref 49* 50 51* 55* 56 57* 61* 62 80* get_temp_segment_ 000012 constant entry external dcl 31 ref 49 j 000100 automatic fixed bin(17,0) dcl 23 set ref 65* 66* left parameter fixed bin(35,0) dcl 13 set ref 11 44* 68* 68 n_entries based fixed bin(17,0) level 2 dcl 1-13 ref 65 nleft 7 based fixed bin(17,0) level 2 packed packed unaligned dcl 2-26 ref 68 null builtin function dcl 37 ref 46 80 82 pvt based structure level 1 dcl 1-13 pvt_array based structure array level 1 dcl 2-24 set ref 66 pvt_arrayp 000114 automatic pointer dcl 2-21 set ref 64* 66 pvt_size 000102 automatic fixed bin(19,0) dcl 25 set ref 55* 61* pvte based structure level 1 dcl 2-26 pvtep 000116 automatic pointer dcl 2-22 set ref 66* 67 68 69 pvtp 000112 automatic pointer dcl 1-9 set ref 46* 49* 61* 64 65 80 80* 82* release_temp_segment_ 000014 constant entry external dcl 32 ref 80 ring_zero_peek_$by_name 000020 constant entry external dcl 34 ref 61 ring_zero_peek_$get_max_length 000016 constant entry external dcl 33 ref 55 totrec 7(18) based fixed bin(17,0) level 2 packed packed unaligned dcl 2-26 ref 69 used 4(18) based bit(1) level 2 packed packed unaligned dcl 2-26 ref 67 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. VOLMAP_ASYNC_IDLE internal static fixed bin(17,0) initial dcl 2-113 VOLMAP_ASYNC_READ internal static fixed bin(17,0) initial dcl 2-113 VOLMAP_ASYNC_WRITE internal static fixed bin(17,0) initial dcl 2-113 addrel builtin function dcl 37 baseno builtin function dcl 37 bin builtin function dcl 37 pvt$ external static fixed bin(17,0) dcl 1-9 pvt$array external static fixed bin(17,0) dcl 2-18 pvt$max_n_entries external static fixed bin(17,0) dcl 2-19 pvt_lth automatic fixed bin(17,0) dcl 26 size builtin function dcl 37 NAMES DECLARED BY EXPLICIT CONTEXT. CANNOT_GET_PVT 000166 constant label dcl 57 ref 62 clean_out 000320 constant entry internal dcl 77 ref 47 74 disk_left_ 000032 constant entry external dcl 11 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 466 510 356 476 Length 722 356 22 175 107 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME disk_left_ 134 external procedure is an external procedure. on unit on line 47 64 on unit clean_out 78 internal procedure is called by several nonquick procedures. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME disk_left_ 000100 j disk_left_ 000101 ec disk_left_ 000102 pvt_size disk_left_ 000112 pvtp disk_left_ 000114 pvt_arrayp disk_left_ 000116 pvtep disk_left_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_int_this call_int_other return_mac enable_op ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ get_temp_segment_ release_temp_segment_ ring_zero_peek_$by_name ring_zero_peek_$get_max_length NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000026 44 000037 46 000042 47 000044 49 000066 50 000107 51 000111 52 000140 55 000141 56 000164 57 000166 59 000211 61 000212 62 000246 64 000250 65 000253 66 000263 67 000267 68 000272 69 000301 72 000310 74 000312 75 000316 77 000317 80 000325 82 000352 84 000355 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved