XEROX1108 Users Guide18SECTION 3THE FILE SYSTEMINTRODUCTION The 1108 hard disk file system is designed to provide Interlisp-D users with a flexible mechanismfor storing and accessing files. Like the file systems for the 1100 and 1132, the 1108 file systemsupports features like random access and version numbers on files. In addition the 1108 localfile system supports a hierarchical naming structures for files. PARTITIONING THE DISK The hard disk used with an 1108 may be partitioned into up to six regions called logicalvolumes. Each of these volumes acts like a separate device. Some may be used to hold filesused with the Interlisp-D software. You can partition the disk using the Installation Utility floppySince partitioning the hard disk erases all its contents, you are advised to partition the diskappropriately before storing anything on it; otherwise, you will have to offload all files from thedisk, partition, and then copy the files back to the disk.In order to run the Interlisp-D software, a logical volume (usually named LISP) is needed tocontain the system virtual memory and microcode. It should be 15,600 pages long; if shorter, itmust be the last logical volume on the disk. This logical volume should not be used for user filespace.If you wish to store user files on the hard disk, a logical volume (preferably named DSK) shouldbe allocated for this purpose. This volume can be used from within Interlisp-D just like the{DSK} device on the 1100 and 1132 except that it supports a hierarchical naming structure forfiles. This logical volume may be of any desired size (but probably should not be less than 500pages). You can in fact use several logical volumes to store Lisp user files. If you do not havea logical volume called DSK, the {DSK} device will be emulated by a coredevice, which is fineexcept that (a) it provides limited scratch space for some system programs and (b) when runningGREET, Interlisp will fail to find {DSK}INIT.LISP and will have to prompt the user for an init file.An Interlisp-D file directory must be installed on an 1108 volume before any files can be writtento it. This is done using the function MKDIR:(MKDIR )[function]MKDIR installs a file directory on the named logical volume. For example, (MKDIR 'DSK) willinstall a file directory on the logical volume named DSK. When MKDIR finishes, a message isprinted stating that the logical volume now has a directory. gdpXq@p gd*?dF*j)p(;]s%[ gV( p gRLT gPE gM H gK> gGs gCpU gA> g?L g=\G g;( *, g85 g5Z g2*/ g06( g.| g*L g(lW g&8(0 g$V g!H g%7 ghL g4^ gXP g$+ gHE g l8 g 83" g 5 TVk( XEROX1108 Users Guide19One must take some care in installing an Interlisp directory on a volume not to inadvertentlydestroy information already stored there. If the logical volume already has a file directory on it,that directory and hence access to the files it contains will be lost if a new directory is installed.The space used by the directory and files will also be lost. Installing a directory is somethingthat should only be done the first time the logical volume is used. After that, the system willautomatically recognize and open access to the logical volumes that have Interlisp directories onthem. If a logical volume already has a directory on it, the MKDIR function will requestconfirmation before proceeding.ACCESSING LOGICAL VOLUMES FROM INTERLISP-DOnce an Interlisp directory has been installed on a logical volume, any program runnning in thesystem has access to the volume. The logical volume as a whole is treated as a device. Thusthe logical volume DSK is referred to as the device {DSK} from within Interlisp-D. (The bracessurrounding the name DSK indicate the reference is to a device.) As an example, consider theloading of an init file done during GREET. The system looks for the file {DSK}INIT.LISP, and ifone exists loads it. A new file can be created on the DSK logical volume by executing thefunction call (OPENFILE '{DSK}MYFILE 'OUTPUT).Unlike the local disk systems on the 1100 and 1132, the 1108 hard disk system supports ahierarchical naming convention for files. There isn't really a subdirectory structure, but thenaming convention makes it appear as if one exists, and lets users group files. The characters"<" and ">" are used to delimit levels of the hierarchary. The "<" character is used only at thetop level. The remaining levels are denoted by the ">" character. For example consider a twolevel structure on the device {DSK}. Let the top level be a user's name and the next level be agroup of utility programs. The user's name will be WIZARD and the the utility level will benamed UTILS. The file MOVEFILES.DCOM stored at the utility level will thus be referenced as{DSK}UTILS>MOVEFILE.DCOM.As a convenience, the 1108 local disk system supports connecting to any level in the namehierarchy. Thus if one wanted to work with WIZARD's utilities for awhile, the command CONN{DSK}UTILS> would set up a default path that makes typing anything but the actualfile name unnecessary. So (LOAD 'MOVEFILES.DCOM) would in fact load the file{DSK}WIZARD>UTILS>MOVEFILES.DCOM.The Interlisp-D file system provides for device dependent file attributes, which can accessed andset by the functions OPENFILE, SETFILEINFO, and GETFILEINFO. The attributes accepted bythe 1108 local disk system are as follows: gdpXq@p gd*?dF*j)p g]Z g[ R gYw X gWC9% gUM gR ; gP#1 gNs  gJs* gFp[ gD H gBS0, g@ *( g=V g; J g9& g5-% g3s S g1?%4 g/ 8& g,)2 g*2) g(o9 g&;F g$! g +K g !0 g7 gU@V g[! g%9 gK,) g' TVk( XEROX1108 Users Guide20In the function OPENFILE, setting the LENGTH attribute sets the initial allocation of space forthe file (in bytes). Setting the CREATIONDATE to a string overides the default of using thecurrent time.In the function GETFILEINFO, the LENGTH attribute returns the current length of the file inbytes. AUTHOR returns the author of the file as an atom. CREATIONDATE returns the creationtime for the file as a string, READDATE returns the time at which the file was last opened forreading, and WRITEDATE returns the time the file was last opened for write. ICREATIONDATE,IREADDATE, and IWRITEDATE return the corresponding times as integers that GDATE willconvert to string form.In the function SETFILEINFO, setting the LENGTH attribute will change the size of the file.Setting AUTHOR as an atom or string will change the author of the file. (Only the first 40characters are retained). Setting CREATIONDATE to a string changes the creation date for thefile. Setting ICREATIONDATE to an integer (returned by IDATE) changes the creation date forthe file.OTHER USEFUL FUNCTIONS(VOLUMEDISPLAY ) can be used to create a status window for the local disk showing thenames of the volumes, the amount of space allocated to each volume and the remaining spaceon each volume. (VOLUMEDISPLAY 'ON) opens the window in the place it was last left on thescreen. (VOLUMEDISPLAY 'OFF) closes the window. Manually closing the status window usingthe right-button menu automatically does (VOLUMEDISPLAY 'OFF).If the Volume Status window is on, it is updated as space for files is allocated and releasedduring the course of an Interlisp-D session. In addition, an "*" character is displayed in the filesystem status window to the left of each volume name that has an open Interlisp file directoryinstalled on it. This notation indicates which of the logical volumes on the local disk areaccessible from Interlisp-D. (DFSVOLUMES) returns a list of the names of the logical volumes on the 1108.(DFSLISPVOLUMEP ) returns non-NIL iff the named volume has anInterlisp file directory open for Interlisp access.(CURRENTVOLUME) returns the volume name of the volume containing the currently-runningvirtual memory.LIMITATIONS gdpXq@p gd*?dF*j)p g]4) g[L gYw gUJ gSgI gQ37# gN8 gL ; gJ gFU gD G gBS K g@/( g= g:s g63p I g3O g1S g/*) g-c; g)D g'S4* g%"6 g"J g  gL g@ g* g4 g g s TVk( XEROX1108 Users Guide21At the current time there is no provision for directly installing a SYSOUT made by the Interlisp-Dfile system on an 1108 local disk. SYSOUTS can be made directly to floppy disks, however. Itis also possible to make a SYSOUT directly to a file server (installation of Interlisp-D from a fileserver is supported) or to make the SYSOUT on a local disk volume and copy it to the serverfrom Interlisp-D via the function COPYFILE. ERASING AN INTERLISP FILE SYSTEM VOLUMEAt some point in time it may become necessary to erase an entire Interlisp local file systemvolume. For example, you may wish to use that volume for storing and executing an Interlispvirtual memory image. Alternatively, you may have accidently used MKDIR on an already-existing file volume, and you wish to reclaim the space that was lost. Unfortunately, there iscurrently no easy way to do this from within Interlisp. To erase an entire Interlisp local filesystem volume, do the following:1)Before leaving Interlisp, call the function (MAKEPILOT )[function] This will remove the file device associated with the volume and will make non-Lisp tools (suchas the Installation Utility floppy and the Lisp Installation Tool) able to recognize the volume.2)Boot the Installation Utility floppy. This will present a menu of operations. Choose theoperation "Erase DSK Volume". This will ask for a confirmation. 3)Restart your Interlisp memory image.SCAVENGINGThis implementation of the 1108 hard disk file system includes a partial scavenger should yourfile system crash. If your local file system directory becomes smashed, call the function(SCAVENGEVOLUME )[function]Provided the file maps are still intact, this will rebuild your directory with new file names. Youcan then rename the files appropriately by using SEE to look at contents, and sort out versionnumbers by using GETFILEINFO to compare creation dates.Future implementations of the file system will include a scavenger that will rebuild file maps aswell. gdpXq@p gd*?dF*j)p g]T g[5' gYw U gWCA gU( gQ3s' gMWpG gK#C gHA gF? gD@ gBS>w, g:!E g6N g4^0V.{9*$ g&s g"p1) g V g&E g*1 g$7 g1 gK g TVk( Helvetica Logo Helvetica Helvetica j/0M69S3.BXknowlesJuly 2, 1984 8:18 AM