Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Field 2 is the volume identifier, set by the NAME_VOLUME subroutine.

Media Updates and the Media Handle

The media map must be updated anytime a file is created, recreated, renamed, deleted, or moved. In addition, a media map may need to be updated for such functions as MFS installation.

In order to access the media map, OpenInsight generates special media access calls. There are calls to initialize, open, read, and write to the media map.

Because the media map is much like a file, access to the media map is much like file access. As with file access, much activity in the media map requires an internal media handle.

The media handle is created by the OPEN.MEDIA call. If successful, this call returns a handle that is used in subsequent media access calls such as READ.MEDIA and WRITE.MEDIA.  As with the file handle created by OPEN.FILE, the media handle is stored by the system. The handle returned by OPEN.MEDIA is kept in the SYSVOLUMES file as field five.

MFS Access to Media Calls

If installed only on a file, an MFS will not be able to trap most calls that update the media map. However, if the MFS is installed on a volume as a whole, the MFS will be called for almost all filing system functions, including those that initialize and update the media map.

If able to trap media calls, the MFS can be used for such functions as volume security. For example, a volume-based MFS can prevent users from creating or deleting files without proper access rights. The calls can be disabled by setting the status argument to false and returning without calling the next filing system.

Calls that are available only if the MFS is installed on a volume are:

For these calls, information passed in the HANDLE argument is the handle of the media map. This handle is used in virtually the same manner as a file handle.