Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ libfd(3H) — Pixar HSI 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fd_close(3H)

fd_create(3H)

fd_lookup(3H)

fd_lseek(3H)

fd_open(3H)

fd_read(3H)

fd_unlink(3H)

fd_write(3H)

mx(4)

fd(5)

LIBFD(3H)  —  Pixar Programmer’s Manual — libfd

NAME

libfd− fast disk filesystem services

DESCRIPTION

libfd is a library of C-callable functions that behave like the equivalent system calls for manipulating file descriptors for fast disk files. 

Most of these calls have one or more error returns.  An error condition is indicated by an otherwise impossible return value.  This is almost always -1; the individual descriptions specify the details. 

An error number is also made available in the external variable errno, which is not cleared on successful calls.  Thus errno should be tested only after an error has occurred.  A short explanation for the possible error values is given with the description for each routine.  If a more complete list and description of possible errno values is needed, please see the intro(2) man page in the standard UNIX documentation. 

PATHNAMES AND FILESYSTEM HIERARCHY

libfd implements a single filesystem directory tree, similar in appearance to that of the UNIX filesystem.  The tree is built from one or more self-contained Fast-Disk filesystems, each residing in its own disk partition.  Typically, one filesystem (disk partition) is designated to be the very top level of the hierarchy (where the / directory lies), and other filesystems are positioned at lower levels in the hierarchy.  The file /etc/fdmount contains information the describes filesystem positioning.  For example, this file might contain the lines:

/dev/rmx0b:/

/dev/rmx1b:/xyz

/dev/rmx2b:/abc/def

Here, all files whose pathnames begin with /xyz/ reside on Fast-Disk Volume 1 (/dev/rmx1b).  Files whose pathnames begin with /abc/def/ reside on Volume 2.  All other files reside on Volume 0.  The contents of /etc/fdmount can be overridden by the FDMOUNT environment variable. 

Pathnames beginning with / specify an absolute position within the filesystem tree described above.  Pathnames that do not begin with / are relative to the current "working directory," which is normally also / but may be specified via the FDCWD environment variable. 

SHARING FAST-DISK FILESYSTEMS

In a multi-user environment, access to the files on the Fast-Disk is shared among user programs executing on the host computers that are connected to the Fast-Disk hardware.  Every read or write access to the Fast-Disk  requires that, for a brief interval, the calling UNIX process will "own" the disk, temporarily excluding all other processes from accessing it.  If, upon attempting to access the disk, a process discovers that the disk is temporarily "owned" by another process, it will wait a predetermined amount of time to obtain ownership.  If ownership is not granted within that time, the libfd function will fail and return an EBUSY error; this is possible during periods of heavy contention for the disk.  By default, the timeout interval is 5 seconds, but it can be changed via the FDREQWAIT environment variable.  fd_perf(3H) offers a selection of several modes of contention management strategies.

LIBRARY

/usr/pixar/hsi/host/lib/libfd.a

SEE ALSO

intro (2)− introduction to UNIX system calls

fd_close(3H), fd_create(3H), fd_lookup(3H), fd_lseek(3H), fd_open(3H), fd_read(3H), fd_unlink(3H), fd_write(3H), mx(4), fd(5). 

LIST OF FUNCTIONS

NameAppears on PageDescription
fd_chdirfd_chdir(3H)− change current fast-disk working directory
fd_getwdfd_chdir(3H)− obtain current fast-disk working directory
fd_closefd_close(3H)− delete a descriptor for the fast-disk
fd_createfd_create(3H)− create a new file on the fast-disk system
fd_opendirfd_directory(3H)− open fast-disk directory for reading
fd_readdirfd_directory(3H)− read next entry in fast-disk directory
fd_closedirfd_directory(3H)− close fast-disk directory
fd_getfsentfd_getfsent(3H)− get fast-disk filesystem description table entry
fd_setfsentfd_getfsent(3H)− rewind fast-disk filesystem table file
fd_endfsentfd_getfsent(3H)− close fast-disk filesystem table file
fd_lseekfd_lseek(3H)− move read/write pointer on fast-disk
fd_mkdirfd_mkdir(3H)− make directory on fast-disk filesystem
fd_perf fd_perf(3H)− specify fast-disk filesystem library performance tradeoffs
fd_renamefd_rename(3H)− change the name of a file on the Fast-Disk
fd_stat fd_stat(3H)− obtain status of fast-disk file or directory
fd_statfsfd_statfs(3H)− obtain information about fast-disk filesystem
fd_term fd_term(3H)− close fast-disk filesystems
fd_truncatefd_truncate(3H)− reduce the size of a fast-disk file
fd_unlinkfd_unlink(3H)− remove directory entry from fast-disk filesystem
fd_writefd_write(3H)− write to the fast-disk filesystem

Release β  —  Last change: 10/12/88

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026