FS Service Routines

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
1. FS_ALLOCATEPAGESPACE Adjust the size of paging file PAGE I/O
2. FS_ATTACH Attach to an FSD ALL
3. FS_CANCELLOCKREQUEST Cancel file record lock request FILE I/O
4. FS_CHDIR Change/Verify directory path ALL
5. FS_CHGFILEPTR Move a file's position pointer ALL
6. FS_CLOSE Release a file handle ALL
7. FS_COMMIT Flush a file's buffer to disk ALL
8. FS_COPY Copy a file ALL
9. FS_DELETE Delete a file ALL
10. FS_DOPAGEIO Perform paging I/O operations PAGE I/O
11. FS_EXIT End of a process cleanup ALL
12. FS_FILEATTRIBUTE Query/Set file's attributes ALL
13. FS_FILEINFO Query/Set file's information ALL
14. FS_FILEIO Multi-function file I/O ALL
15. FS_FILELOCKS Request a file record lock/unlock FILE I/O
16. FS_FINDCLOSE Directory search close ALL
17. FS_FINDFIRST Find first matching filename ALL
18. FS_FINDFROMNAME Find matching filename from name ALL
19. FS_FINDNEXT Find next matching filename ALL
20. FS_FINDNOTIFYCLOSE Close FindNotify handle ALL
21. FS_FINDNOTIFYFIRST Monitor a directory for changes ALL
22. FS_FINDNOTIFYNEXT Resume reporting directory changes ALL
23. FS_FLUSHBUF Commit file buffers to disk ALL
24. FS_FSCTL File system control ALL
25. FS_FSINFO Query/Set file system information ALL
26. FS_INIT FSD initialization ALL
27. FS_IOCTL I/O device control ALL
28. FS_MKDIR Make a directory ALL
29. FS_MOUNT Mount/unmount volumes ALL
30. FS_MOVE Move a file or subdirectory ALL
31. FS_NEWSIZE Change a file's logical size ALL
32. FS_NMPIPE Do a named pipe operation ALL
33. FS_OPENCREATE Open/create/replace files ALL
34. FS_OPENPAGEFILE Create paging file and handle PAGE I/O
35. FS_PATHINFO Query/Set a file's information ALL
36. FS_PROCESSNAME FSD unique name canonicalization ALL
37. FS_READ Read data from a file ALL
38. FS_RMDIR Remove a subdirectory ALL
39. FS_SETSWAP Notification of swapfile ownership ALL
40. FS_SHUTDOWN Shutdown file system ALL
41. FS_VERIFYUNCNAME Verify UNC server ownership UNC
42. 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:

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)