file:  /dsgn/filesys.text
date:  23-Feb-1983


New file system for Concept


Initial needs, ideas and questions

1) fast performance
       - how much speed willing to risk over :
            a) reliability
            b) functionality
            c) expandability

2) random access by record
       worse case max. 3 blocks to get to any record

3) heirarchical directory structure within a volume

4) lock at a) volume, b) directory, or c) file level?

5) variable length records

6) byte block access - read/write 1..n bytes

7) Very large files, 40 meg??

8) some level of protection for non-malicious error

9) reliable so if shotgun volume can have automated recovery
   of file system with very minimal data lose.

       - redundant write of file control structures
           need to minimize control info so don't use up
           disk with alot of control overhead
       - block ownership ids
       - bitmap and list of free blocks

10) embedded in UCSD file system
        - similar structure to how CP/M is embedded in volume
          structure
.PG


1st pass at directory structure


<Volume> ::= <3 block UCSD dir> and <New Directory>
              A Const II defined space

<3 block UCSD dir> ::= <2 unused UCSD boot blocks> and
                       <1 block UCSD dir>

<New Directory> ::= linked list of directory blocks

<1st dir block> ::= <parent Dir pointer> and
                   NIL <prev dir block ptr> and
                   <next dir block ptr> and <dir name> and
                   <array[0..23] of <file entries>

<other dir block> ::=  < parent Dir pointer> and
                   <prev dir block ptr> and
                   <next dir block ptr> and <dir name> and
                   <array[0..23] of <file entries>

<parent Dir pointer> ::= block pointer to <1st dir block>
                         of parent directory - nil if
                         root dir

<prev dir block ptr> ::= block pointer to previous directory
                         block. nil if 1st dir block

<next dir block ptr> ::= block pointer to previous directory
                         block. nil if last dir block

<dir name> ::= 15 character string (16 bytes)

<file entries> ::= <File Name> and <header address>
                       and <flags>

<File Name> ::= 15 character string  (16 bytes)
                  (upper case only, ".", "_" ???)

<header address> ::= <block address> of <file header block>

<block address> ::= 32 bit number, 0 means NIL pointer
                    maybe absolute disk maybe volume relative
                    probably volume relative because of Const II

.PG
 +-------------------------------------+  <<--+
 |0                                    |      |
 |1    <3 block UCSD dir>              |      |
 |2                                    |      |
 |-------------------------------------|      |
 |3   The first Dir - ROOT of volume   |      |
 |-------------------------------------|      |
 |                                     |      |
 |         r                           |      +-- a Const II
 |         e   v                       |      +-- <Volume>
 |         s   o                       |      |
 |         t   l                       |      |
 |             u                       |      |
 |         o   m                       |      |
 |         f   e                       |      |
 |                                     |      |
 |                                     |      |
 |                                     |      |
 +-------------------------------------+  <<--+

 +-------------------------------------+  <<--+
 |    ptr to parent Dir     4 bytes    |      |
 |-------------------------------------|      |
 |    ptr to prev Dir Block 4 bytes    |      |
 |-------------------------------------|      |
 |    ptr to next Dir Block 4 bytes    |      |
 |-------------------------------------|      |
 |     Directory name   16 bytes       |      |
 |-------------------------------------|<<-+  |
 |  File Name         16 bytes         |   |---entry = 20 bytes
 |-------------------------------------|   |  |
 |flags |  ptr to file header 3 bytes  |   |  |
 |-------------------------------------|<<-+  |
 |                .                    |      |
 |                .                    |      |-- a Dir
 |                .                    |      |-- block
 |    23 more file entries             |      |
 |                .                    |      |
 |                .                    |      |
 |                .                    |      |
 |-------------------------------------|<<-+  |
 | 4 bytes wasted    ??????            |      |
 +-------------------------------------+  <<--+

    wasted space - maybe dir number ???

