DEFINITION MODULE IOEform;

FROM K32baseTypes IMPORT

	cardinal16;

FROM IOform IMPORT

	itemKind, labelName, mBlockNumber, security, vBlockNumber;

EXPORT QUALIFIED

	DISKEXTENTS, extentItem, EXTFILLSZ, EXTMAP, EXTMAPEXT,
	LEVELONEBOOT, LEVELONEBOOTEXT, LEVELZEROBOOT,
	LEVELZEROBOOTEXT, SECURITYEXT, SECURITYMAP, UNUSED, USERDISK;

(*	DISK STRUCTURE DEFINITIONS ARE INCLUDED HERE		*)

(*
	Data Structures For KSOS Disk Packs

	The data structures defined here give the layout of the control
	information of the areas on a disk.  These data structures
	are used by both the KSOS kernel  and the KSOS
	NKSR file recovery, initialization, dump, and restore utilities.

	These structures are for use by trusted software only.

HISTORY:
  AUTHOR:   J. Nagle
  VERSION:  1.1 of 6/18/86
*)
			(* @(#)IOEform.mod	1.1 WHAT(I) identification string *)
CONST
    DISKEXTENTS = 35;		(* max number of extents per disk *)

    (* extent number of system extents *)
    LEVELZEROBOOTEXT = 1;
    LEVELONEBOOTEXT =  2;
    EXTMAPEXT       =  3;
    SECURITYEXT     =  4;

    (* starting locations of system extents on pack *)
    LEVELZEROBOOT = 0;
    UNUSED =        1;
    EXTMAP =        5;
    SECURITYMAP =  12;
    LEVELONEBOOT = 20;
    USERDISK =     36;

    (*  Fillers for index slot items.  All must be exactly 102 bytes long. *)
    (* The above comment is for PACKED on-disk structures. In memory they
       are 204 bytes long. -tep TEMP 1/32/87 *)
    EXTFILLSZ =   120 (*43*);



TYPE


(* ========================================================================= *)
(*          This structure appears in the disk extent map                    *)
(*          and defines the max access level and location of each extent     *)
(*          on the pack. This item is the same size as the kernel items.     *)
(* ========================================================================= *)

extentItem= RECORD
		checkSum: cardinal16;     (* record checksum*)
		kind: itemKind;         (* always extentKind *)
		extno : cardinal16;       (* name space partition of this extent*)
		label: labelName;       (*name of extent *)
		extSecurity: security;  (* the maximum access level for this extent*)
		firstblock: vBlockNumber; (* absolute block number of first block of this extent*)
		lastblock: vBlockNumber;(* absolute block number of last block *)
		extSize: mBlockNumber;  (* size of extent in blocks *)
		filler: ARRAY [1..EXTFILLSZ] OF CHAR; (* fill to 64 bytes *)
	    END;

(*      END DISK STRUCTURE DEFINITIONS COMMON TO FILE SYSTEM AND NKSR *)

END IOEform.
