


      FFFFSSSS((((4444))))                        ((((RRRRiiiiddddggggeeee))))                        FFFFSSSS((((4444))))



      NNNNAAAAMMMMEEEE
           file system - layout of the Ridge hard disc

      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
           Understanding the layout of the Ridge hard disc begins with
           the Volume Manager system program. The volume manager is a
           program whose data space is the entire disc; it writes data
           on the disc on behalf of client process requests for disc
           i/o.

                                      LowHeapAddr                  HighHeapAddr
              0    3     8             v                                     v
           --------------------------------------------------------------------
           |     |    |outer|         |     |       |send/ |           |      |
           |     |vol-|block|         | bit | file  |re-   |           |      |
           |boot |ume |var  |         | map |labels | ceive|           |      |
           |     |info|and  |         |     |       |page  |           |      |
           |     |    |stack|         |     |       |      |           |      |
           --------------------------------------------------------------------
                                       ^     ^       ^
                                    FreeSP  FLabel  Page

           volume data space = fid 1.2
           three extents: 1) boot and volume info
                          2) heap
                          3) free space

           PPPPaaaassssccccaaaallll ddddaaaattttaaaa ssssttttrrrruuuuccccttttuuuurrrreeee ffffoooorrrr tttthhhheeee ddddiiiisssscccc llllaaaayyyyoooouuuutttt::::

              BootCodeSize = 4032;                  {FC0 bytes of code        }
              NumBootFIds  = 8;                     {then 8 bootable file Ids }

           VAR     {variables are laid out according to disc position}
              Boot : record
                Main    : BootPage;                 {2 pages for bootstrapping}
                Aux     : BootPage;
              end;
              VolVersion: Integer;           {initial=0; w/ disc-skews added=1}
              VolName   : array[0..NamSZ1] of Char; {begin volume label       }
              VolSize   : PageNumber;               {number of pages in volume}
              HeadSkew  : Byte;
              TrackSkew : Byte;
              Filler1   : array [0..1] of Byte;
              Filler2   : Integer;
              FreeSP    : FreeSpacePtr;          {points to free space bit map}
              FLabel    : ^FileLabelTable;         {points to file label array}
              Page      : ^PageT;                   {points to page buffer    }

           _B_o_o_t the boot area contains two 4096-byte pages, one with
           this and the other with that.
           _V_o_l_V_e_r_s_i_o_n is a one-word integer containing the volume
           version number, as reported by the xyz command.



      Page 1                                                   (9010-E)






      FFFFSSSS((((4444))))                        ((((RRRRiiiiddddggggeeee))))                        FFFFSSSS((((4444))))



           _V_o_l_N_a_m_e is an array of char containing the volume label, as
           reported by the xyz command.
           _V_o_l_S_i_z_e is the number of 4096-byte pages on the volume,
           including the header stuff.
           _H_e_a_d_S_k_e_w is
           _T_r_a_c_k_S_k_e_w is
           _F_i_l_l_e_r_1
           _F_i_l_l_e_r_2
           _F_r_e_e_S_P is a pointer to a table of free pages.  The table is
           a bitmap, with one bit corresponding to each disc page.  A
           bit is 1 if the page is allocated, and 0 if available.  The
           volmgr.test(1) ``s'' command displays the bitmap, with each
           group of four bits represented as one hexadecimal character.
           _F_L_a_b_e_l is a pointer to the FileLabelTable, described below.
           _P_a_g_e

           TTTThhhheeee FFFFiiiilllleeeeLLLLaaaabbbbeeeellllTTTTaaaabbbblllleeee

           The 0th file entry is a record indicating the number and
           locations of other file labels.  Subsequent file labels
           contain specific data on one file each.

           FileIndex = Integer;          {index into file label table       }
           TimeStamp = Double;           {a time stamp                      }
           Security = record
             Owner     : HalfWord;       {Group ID of owner                 }
             Group     : HalfWord;       {Group ID of access allowed group  }
             Protect   : HalfWord;       {protection bits                   }
           end;
           UserInfo = record
             Sec       : Security;
             LinkCount : HalfWord;       {No. of directories this file is in}
             EndOfFile : Integer;        {High water mark                   }
             UType     : Integer;        {User-defined type                 }
           end;
           WriteableInfo = record
             CreateTime: TimeStamp;      {Logical time of creation          }
             RefTime   : TimeStamp;      {Last reference                    }
             ModTime   : TimeStamp;      {Last modify                       }
             UInfo     : UserInfo;
           end;
           ReadableInfo = record
             InternalCreate : TimeStamp; {Actual time of creation           }
             Info           : WriteableInfo;
           end;

           FileLabelTable = record case Integer of
             0: (HeadF : FileIndex;      {0'th entry only}
                 TailF : FileIndex;
               NumLabs : FileIndex);
             1: (Entry : array[0..0{FLabSz}] of record   {1..FLabSz1 entries}
                   Filler : Byte;                        {1    bytes*,Loc 0 }



      Page 2                                                   (9010-E)






      FFFFSSSS((((4444))))                        ((((RRRRiiiiddddggggeeee))))                        FFFFSSSS((((4444))))



                 UniqueId : FileUnique;                  {3    bytes*,Loc 1 }
               case InUse : Boolean of                   {1    bytes*,Loc 4 }
                   false  : (
                           Filler2 : Array[1..3] of Byte;{3    bytes, Loc 5 }
                            FreeP  : FileIndex);         {4    bytes, Loc 8 }
                   true   : (
                           Filler3 : Byte;               {1    byte*, Loc 5 }
                         OpenCount : Halfword;           {2    bytes*,Loc 6 }
                           Control : ReadableInfo;       {48   bytes*,Loc 8 }
                  case MultiExtent : Boolean of          {4(1) bytes*,Loc 56}
                         false : (ExtInfo : ExtentBody); {12   bytes*,Loc 60}
                          true : (ExtAddr : ^ExtentPage) {4    bytes, Loc 60}
                                                         {  SEE  BELOW      }
                            );
                end);
           {*** this size is built-in above as FLabelEntrySize   72   bytes*}
              end;

           TTTThhhheeee EEEExxxxtttteeeennnntttt PPPPaaaaggggeeee

             {Extent descriptor in File label table and extent page}
             ExtentBody = record
               STPageNo : PageNumber;     { Low page number              }
               PgCnt : PageNumber;        { Number of pages in this chunk}
               DiscAddr : DiscAddress;    { Place to find it on disc     }
               end;

             ExtentPage = record case Integer of
                0: (ExtCnt : Integer);    { 0th entry format             }
                1: (Entry : array[0..MaxExt1] of ExtentBody); { 1..ExtCnt entries}
                end;
             PExtentPage = ^ExtentPage;























      Page 3                                                   (9010-E)



