INSTALL Call

A special call is provided to enable an MFS to perform any special processing that might be required to initialize itself. This is the INSTALL call.

The first time an MFS is called for the current session, the OpenInsight system calls the MFS with an INSTALL code. The MFS can perform any action that it requires in order to run properly, including initializing files, establishing buffers or caches, checking security, etc.

Once this logic has been executed, the MFS should execute a RETURN with STATUS set to true. The MFS should not attempt to call subsequent MFSs or the BFS directly, since the BFS argument will not contain the names of any of these. Unlike most MFS calls, INSTALL is not called by OpenInsight in anticipation of eventually passing the call to the BFS. The INSTALL call is a direct call to that MFS only. If a call is attempted to the next MFS, a load error will occur.

All MFSs should thus execute the following logic upon encountering an MFS call:

INSTALL:
(MFS-specific initialization logic here)
STATUS = 1
RETURN

Once the MFS has successfully returned from an INSTALL call, INSTALL will not be called again. The name of the MFS will be stored in a special system variable, and will remain there for the duration of the session.

There is no effective way to de-install the MFS from the system. Once the MFS has been installed, the system will assume that the MFS will be available until the user logs out of OpenInsight. This is true even if all files for which the MFS is installed are detached.

Because of this, an MFS must remain available at all times. The system occasionally generates direct calls to each MFS it believes is available. The most common of these is the FLUSH call. If the system makes such a call, and the MFS object code is not available, a load error will occur.

In many cases the only recovery is to reset the system, to reattach the file containing the MFS object code.

FLUSH Call

A call that MFS programmers will find executed often is FLUSH. This call is used by OpenInsight to alert all filing systems that they should flush any cached information to disk. FLUSH is called when the system resets, when a file or volume is detached, or when logging off.  OpenInsight's indexing system also calls FLUSH.

The FLUSH call is a direct call to each filing system currently installed (see INSTALL, above), rather than a call to a specific file. An MFS should therefore not attempt to pass a FLUSH call through to the next filing system.  The BFS argument that normally contains a full list of filing systems will contain only the name of the MFS being called. Attempts to pass the call through to the next BFS will result in load errors.

A MFS does not typically need to include logic that causes flushing. Of course, an MFS can use the FLUSH call for its own purposes, including any type of system cleanup required for an MFS.

Even if the MFS does not use the FLUSH call, it should include this logic:

FLUSH:
STATUS = 1
RETURN

Status is always set to true, and that there is no call to the next filing system.

  • No labels