


      FS(4)                      (Bull-SPS9)                      FS(4)



      NAME
           file system - layout of the Bull-SPS9 hard disc

      DESCRIPTION
           Understanding the layout of the Bull-SPS9 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

           Pascal data structure for the disc layout:

              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    }

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



      Page 1                                         (73 A2 02MTA REV1)






      FS(4)                      (Bull-SPS9)                      FS(4)



           VolName is an array of char containing the volume label, as
           reported by the xyz command.
           VolSize is the number of 4096-byte pages on the volume,
           including the header stuff.
           HeadSkew is
           TrackSkew is
           Filler1
           Filler2
           FreeSP 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.
           FLabel is a pointer to the FileLabelTable, described below.
           Page

           The FileLabelTable

           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                                         (73 A2 02MTA REV1)






      FS(4)                      (Bull-SPS9)                      FS(4)



                 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;

           The Extent Page

             {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                                         (73 A2 02MTA REV1)



