Jump to content

IFS - FS Helper Functions: Difference between revisions

From EDM2
Created page with "{{IFSRef}} {{IBM-Reprint}} The following table summarizes the routines that make up the File System Helper interface between FSDs and the kernel. FS Helper Routine De..."
 
No edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 2: Line 2:
{{IBM-Reprint}}
{{IBM-Reprint}}


The following table summarizes the routines that make up the File System Helper interface between FSDs and the kernel.  
The following table summarizes the routines that make up the File System Helper interface between FSDs and the kernel.
{|class="wikitable"
!FS Helper Routine||Description
|-
|[[FSH_ADDSHARE]]||Add a name to the sharing set
|-
|[[FSH_BUFSTATE]]||REMOVED in OS/2 Version 2.0
|-
|[[FSH_CALLDRIVER]]||Call Device Driver's Extended Strategy entry point
|-
|[[FSH_CANONICALIZE]]||Convert pathname to canonical form
|-
|[[FSH_CHECKEANAME]]||Check EA name validity
|-
|[[FSH_CRITERROR]]||Signal a hard error to the daemon
|-
|[[FSH_DEVIOCTL]]||Send IOCTL request to device driver
|-
|[[FSH_DOVOLIO]]||Volume-based sector-oriented transfer
|-
|[[FSH_DOVOLIO2]]||Send volume-based IOCTL request to device driver.
|-
|[[FSH_FINDCHAR]]||Find first occurrence of char in string
|-
|[[FSH_FINDDUPHVPB]]||Locates equivalent hVPBs
|-
|[[FSH_FLUSHBUF]]||REMOVED in OS/2 Version 2.0
|-
|[[FSH_FORCENOSWAP]]||Force segments permanently into memory
|-
|[[FSH_GETBUF]]||REMOVED in OS/2 Version 2.0
|-
|[[FSH_GETFIRSTOVERLAPB]]||REMOVED in OS/2 Version 2.0
|-
|[[FSH_GETPRIORITY]]||Get current thread's I/O priority
|-
|[[FSH_GETVOLPARM]]||Get VPB data from VPB handle
|-
|[[FSH_INTERR]]||Signal an internal error
|-
|[[FSH_IOBOOST]]||Gives the current thread an I/O priority boost
|-
|[[FSH_IOSEMCLEAR]]||Clear an I/O-event semaphore
|-
|[[FSH_ISCURDIRPREFIX]]||Test for a prefix of a current directory
|-
|[[FSH_LOADCHAR]]||Load character from a string
|-
|[[FSH_NAMEFROMSFN]]||Get the full path name from an SFN
|-
|[[FSH_PREVCHAR]]||Move backward in string
|-
|[[FSH_PROBEBUF]]||User address validity check
|-
|[[FSH_QSYSINFO]]||Query system information
|-
|[[FSH_REGISTERPERFCTRS]]||Register a FSD with PERFVIEW
|-
|[[FSH_RELEASEBUF]]||REMOVED in OS/2 Version 2.0
|-
|[[FSH_REMOVESHARE]]||Remove a name from the sharing set
|-
|[[FSH_SEGALLOC]]||Allocate a GDT or LDT segment
|-
|[[FSH_SEGFREE]]||Release a GDT or LDT segment
|-
|[[FSH_SEGREALLOC]]||Change segment size
|-
|[[FSH_SEMCLEAR]]||Clear a semaphore
|-
|[[FSH_SEMREQUEST]]||Request a semaphore
|-
|[[FSH_SEMSET]]||Set a semaphore
|-
|[[FSH_SEMSETWAIT]]||Set a semaphore and wait for clear
|-
|[[FSH_SEMWAIT]]||Wait for clear
|-
|[[FSH_SETVOLUME]]||force a volume to be mounted on the drive
|-
|[[FSH_STORECHAR]]||Store character into string
|-
|[[FSH_UPPERCASE]]||Uppercase ASCIIZ string
|-
|[[FSH_WILDMATCH]]||Match using OS/2 wildcards
|-
|[[FSH_YIELD]]||Yield CPU to higher priority threads
|}
FSDs are loaded as dynamic link libraries and may import services provided by the kernel. These services can be called directly by the file system, passing the relevant parameters.


FS Helper Routine    Description
No validation of input parameters is done unless otherwise specified. The FSD calls FSH_PROBEBUF, where appropriate, before calling the FS help routine.
────────────────────────────────────────────────────────
FSH_ADDSHARE        Add a name to the sharing set
────────────────────────────────────────────────────────
FSH_BUFSTATE        REMOVED in OS/2 Version 2.0
────────────────────────────────────────────────────────
FSH_CALLDRIVER      Call Device Driver's Extended
                      Strategy entry point
────────────────────────────────────────────────────────
FSH_CANONICALIZE    Convert pathname to canonical form
────────────────────────────────────────────────────────
FSH_CHECKEANAME      Check EA name validity
────────────────────────────────────────────────────────
FSH_CRITERROR        Signal a hard error to the daemon
────────────────────────────────────────────────────────
FSH_DEVIOCTL        Send IOCTL request to device driver
────────────────────────────────────────────────────────
FSH_DOVOLIO          Volume-based sector-oriented
                      transfer
────────────────────────────────────────────────────────
FSH_DOVOLIO2        Send volume-based IOCTL request to
                      device driver.
────────────────────────────────────────────────────────
FSH_FINDCHAR        Find first occurrence of char in
                      string
────────────────────────────────────────────────────────
FSH_FINDDUPHVPB      Locates equivalent hVPBs
────────────────────────────────────────────────────────
FSH_FLUSHBUF        REMOVED in OS/2 Version 2.0
────────────────────────────────────────────────────────
FSH_FORCENOSWAP      Force segments permanently into
                      memory
────────────────────────────────────────────────────────
FSH_GETBUF          REMOVED in OS/2 Version 2.0
────────────────────────────────────────────────────────
FSH_GETFIRSTOVERLAPB REMOVED in OS/2 Version 2.0
────────────────────────────────────────────────────────
FSH_GETPRIORITY      Get current thread's I/O priority
────────────────────────────────────────────────────────
FSH_GETVOLPARM      Get VPB data from VPB handle
────────────────────────────────────────────────────────
FSH_INTERR          Signal an internal error
────────────────────────────────────────────────────────
FSH_IOBOOST          Gives the current thread an I/O
                      priority boost
────────────────────────────────────────────────────────
FSH_IOSEMCLEAR      Clear an I/O-event semaphore
────────────────────────────────────────────────────────
FSH_ISCURDIRPREFIX  Test for a prefix of a current
                      directory
────────────────────────────────────────────────────────
FSH_LOADCHAR        Load character from a string
────────────────────────────────────────────────────────
FSH_NAMEFROMSFN      Get the full path name from an SFN
────────────────────────────────────────────────────────
FSH_PREVCHAR        Move backward in string
────────────────────────────────────────────────────────
FSH_PROBEBUF        User address validity check
────────────────────────────────────────────────────────
FSH_QSYSINFO        Query system information
────────────────────────────────────────────────────────
FSH_REGISTERPERFCTRS Register a FSD with PERFVIEW
────────────────────────────────────────────────────────
FSH_RELEASEBUF      REMOVED in OS/2 Version 2.0
────────────────────────────────────────────────────────
FSH_REMOVESHARE      Remove a name from the sharing set
────────────────────────────────────────────────────────
FSH_SEGALLOC        Allocate a GDT or LDT segment
────────────────────────────────────────────────────────
FSH_SEGFREE          Release a GDT or LDT segment
────────────────────────────────────────────────────────
FSH_SEGREALLOC      Change segment size
────────────────────────────────────────────────────────
FSH_SEMCLEAR        Clear a semaphore
────────────────────────────────────────────────────────
FSH_SEMREQUEST      Request a semaphore
────────────────────────────────────────────────────────
FSH_SEMSET          Set a semaphore
────────────────────────────────────────────────────────
FSH_SEMSETWAIT      Set a semaphore and wait for clear
────────────────────────────────────────────────────────
FSH_SEMWAIT          Wait for clear
────────────────────────────────────────────────────────
FSH_SETVOLUME        force a volume to be mounted on the
                      drive
────────────────────────────────────────────────────────
FSH_STORECHAR        Store character into string
────────────────────────────────────────────────────────
FSH_UPPERCASE        Uppercase ASCIIZ string
────────────────────────────────────────────────────────
FSH_WILDMATCH        Match using OS/2 wildcards
────────────────────────────────────────────────────────
FSH_YIELD            Yield CPU to higher priority
                      threads


FSDs are loaded as dynamic link libraries and may import services provided by the kernel. These services can be called directly by the file system, passing the relevant parameters.  
When any service returns an error code, the FSD must return to the caller as soon as possible and return the specific error code from the helper to the FS router.


No validation of input parameters is done unless otherwise specified. The FSD calls FSH_PROBEBUF, where appropriate, before calling the FS help routine. 
There are many deadlocks that may occur as a result of operations issued by FSDs. OS/2 provides no means whereby deadlocks between file systems and applications can be detected.
 
When any service returns an error code, the FSD must return to the caller as soon as possible and return the specific error code from the helper to the FS router . 
 
There are many deadlocks that may occur as a result of operations issued by FSDs. OS/2 provides no means whereby deadlocks between file systems and applications can be detected.


[[Category:IFS]]
[[Category:IFS]]

Latest revision as of 16:08, 20 February 2020

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 routines that make up the File System Helper interface between FSDs and the kernel.

FS Helper Routine Description
FSH_ADDSHARE Add a name to the sharing set
FSH_BUFSTATE REMOVED in OS/2 Version 2.0
FSH_CALLDRIVER Call Device Driver's Extended Strategy entry point
FSH_CANONICALIZE Convert pathname to canonical form
FSH_CHECKEANAME Check EA name validity
FSH_CRITERROR Signal a hard error to the daemon
FSH_DEVIOCTL Send IOCTL request to device driver
FSH_DOVOLIO Volume-based sector-oriented transfer
FSH_DOVOLIO2 Send volume-based IOCTL request to device driver.
FSH_FINDCHAR Find first occurrence of char in string
FSH_FINDDUPHVPB Locates equivalent hVPBs
FSH_FLUSHBUF REMOVED in OS/2 Version 2.0
FSH_FORCENOSWAP Force segments permanently into memory
FSH_GETBUF REMOVED in OS/2 Version 2.0
FSH_GETFIRSTOVERLAPB REMOVED in OS/2 Version 2.0
FSH_GETPRIORITY Get current thread's I/O priority
FSH_GETVOLPARM Get VPB data from VPB handle
FSH_INTERR Signal an internal error
FSH_IOBOOST Gives the current thread an I/O priority boost
FSH_IOSEMCLEAR Clear an I/O-event semaphore
FSH_ISCURDIRPREFIX Test for a prefix of a current directory
FSH_LOADCHAR Load character from a string
FSH_NAMEFROMSFN Get the full path name from an SFN
FSH_PREVCHAR Move backward in string
FSH_PROBEBUF User address validity check
FSH_QSYSINFO Query system information
FSH_REGISTERPERFCTRS Register a FSD with PERFVIEW
FSH_RELEASEBUF REMOVED in OS/2 Version 2.0
FSH_REMOVESHARE Remove a name from the sharing set
FSH_SEGALLOC Allocate a GDT or LDT segment
FSH_SEGFREE Release a GDT or LDT segment
FSH_SEGREALLOC Change segment size
FSH_SEMCLEAR Clear a semaphore
FSH_SEMREQUEST Request a semaphore
FSH_SEMSET Set a semaphore
FSH_SEMSETWAIT Set a semaphore and wait for clear
FSH_SEMWAIT Wait for clear
FSH_SETVOLUME force a volume to be mounted on the drive
FSH_STORECHAR Store character into string
FSH_UPPERCASE Uppercase ASCIIZ string
FSH_WILDMATCH Match using OS/2 wildcards
FSH_YIELD Yield CPU to higher priority threads

FSDs are loaded as dynamic link libraries and may import services provided by the kernel. These services can be called directly by the file system, passing the relevant parameters.

No validation of input parameters is done unless otherwise specified. The FSD calls FSH_PROBEBUF, where appropriate, before calling the FS help routine.

When any service returns an error code, the FSD must return to the caller as soon as possible and return the specific error code from the helper to the FS router.

There are many deadlocks that may occur as a result of operations issued by FSDs. OS/2 provides no means whereby deadlocks between file systems and applications can be detected.