Jump to content

IFS - FS Service Routines

From EDM2
Installable File Systems for OS/2
  1. Installable File System Mechanism
    1. Installable File System Overview
    2. Extended Attributes
    3. FSD File Image
    4. FSD Initialization
    5. IFS Commands
    6. File System Function Calls
    7. FSD System Interfaces
    8. FSD Calling Conventions and Requirements
  2. FS Service Routines
  3. FS Helper Functions
  4. Remote IPL / Bootable IFS
  5. mini-FDS Entry Points
  6. mini-FDS Helper Routines

Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation

The following table summarizes the entry points that make up the interface between the kernel and the FSD.

Note
Names must be in all upper case, as required by OS/2 naming conventions.
FS Entry Point Description FSDs Required to export
FS_ALLOCATEPAGESPACE Adjust the size of paging file PAGE I/O
FS_ATTACH Attach to an FSD ALL
FS_CANCELLOCKREQUEST Cancel file record lock request FILE I/O
FS_CHDIR Change/Verify directory path ALL
FS_CHGFILEPTR Move a file's position pointer ALL
FS_CLOSE Release a file handle ALL
FS_COMMIT Flush a file's buffer to disk ALL
FS_COPY Copy a file ALL
FS_DELETE Delete a file ALL
FS_DOPAGEIO Perform paging I/O operations PAGE I/O
FS_EXIT End of a process cleanup ALL
FS_FILEATTRIBUTE Query/Set file's attributes ALL
FS_FILEINFO Query/Set file's information ALL
FS_FILEIO Multi-function file I/O ALL
FS_FILELOCKS Request a file record lock/unlock FILE I/O
FS_FINDCLOSE Directory search close ALL
FS_FINDFIRST Find first matching filename ALL
FS_FINDFROMNAME Find matching filename from name ALL
FS_FINDNEXT Find next matching filename ALL
FS_FINDNOTIFYCLOSE Close FindNotify handle ALL
FS_FINDNOTIFYFIRST Monitor a directory for changes ALL
FS_FINDNOTIFYNEXT Resume reporting directory changes ALL
FS_FLUSHBUF Commit file buffers to disk ALL
FS_FSCTL File system control ALL
FS_FSINFO Query/Set file system information ALL
FS_INIT FSD initialization ALL
FS_IOCTL I/O device control ALL
FS_MKDIR Make a directory ALL
FS_MOUNT Mount/unmount volumes ALL
FS_MOVE Move a file or subdirectory ALL
FS_NEWSIZE Change a file's logical size ALL
FS_NMPIPE Do a named pipe operation ALL
FS_OPENCREATE Open/create/replace files ALL
FS_OPENPAGEFILE Create paging file and handle PAGE I/O
FS_PATHINFO Query/Set a file's information ALL
FS_PROCESSNAME FSD unique name canonicalization ALL
FS_READ Read data from a file ALL
FS_RMDIR Remove a subdirectory ALL
FS_SETSWAP Notification of swapfile ownership ALL
FS_SHUTDOWN Shutdown file system ALL
FS_VERIFYUNCNAME Verify UNC server ownership UNC
FS_WRITE Write data to a file ALL

Each FS entry point has a distinct parameter list composed of those parameters needed by that particular entry. Parameters include:

  • File pathname
  • Current disk/directory information
  • Open file information
  • Application data buffers
  • Descriptions of file extended attributes
  • Other parameters specific to an individual call

Most of the FS entry points have a level parameter for specifying the level of information they are provided or have to supply. FSDs must provide for additional levels which may be added in future versions of OS/2 by returning ERROR_NOT_SUPPORTED for any level they do not recognize.

File system drivers which support hierarchical directory structures must use '\' and '/' as path name component separators. File system drivers which do not support hierarchical directory structures must reject as illegal any use of '\' or '/' in path names. The file names '.' and '..' are reserved for use in hierarchical directory structures for the current directory and the parent of the current directory, respectively.

Unless otherwise specified in the descriptions below, data buffers may be accessed without concern for the accessibility of the data. OS/2 will either check buffers for accessibility and lock them, or transfer them into locally accessible data areas.

Simple parameters will be verified by the IFS router before the FS service routine is called.

Note
New with 2.0, some entry points need only be exported and supported by those FSDs which desire to service the pager (PAGE I/0), UNC servers (UNC) and/or file locking (FILE I/O). With these new entry point groups, a FSD must export all or none of the entry points within a particular group.

These optional entry points are:

FS_ALLOCATEPAGESPACE    (PAGE I/O)
FS_CANCELLOCKREQUEST    (FILE I/O)
FS_DOPAGEIO             (PAGE I/O)
FS_FILELOCKS            (FILE I/O)
FS_OPENPAGEFILE         (PAGE I/O)
FS_VERIFYUNCNAME        (UNC)