RAMFS - an IFS-based RAM Disk for OS/2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Some time ago I wanted to learn about Installable File Systems (IFSes)
in OS/2, so I wrote RAMFS, an IFS-based RAM disk.

RAMFS is freeware.  Feel free to use it, and to get ideas from the source
code when you develop your own file systems.  Please email me
(Karl Olsen, kro@post3.tele.dk) if you find it useful.  I have tested RAMFS
on OS/2 Warp 3.0, and seen it work on OS/2 Warp 4.0.

RAMFS is a "remote file system" (as opposed to a "local file system")
meaning that it isn't associated with a hard disk partition.  Instead, drive
letters are created through OS/2 calls.  OS/2 doesn't know the internal data
format in the file system - it only accesses the data through special file
system functions.

Files are stored in RAM.  This means that the data are lost when the system
is rebooted.  It is useful for holding temporary files - just let the TMP
and TEMP variables point to a RAMFS drive, and your temp directory is
automatically cleaned up at each boot.



Features
~~~~~~~~
  o Create as many RAM drives as you want, using the drive letters that
    you want

  o Size only limited by available RAM and swap disk space

  o Allocates swappable RAM from OS/2 as necessary when files are created,
    and releases it again when files are deleted

  o Long file name support like in HPFS.  Case isn't significant, but
    preserved like in HPFS. Files with long names are not visible from DOS
    and WINOS2 programs.

  o Extended Attributes - up to 64 KB total for each file/directory (HPFS
    supports up to 64 KB for each EA, up to 256 KB total for each file/
    directory)

  o RAM is allocated in units of one page (4 KB)



Non-features
~~~~~~~~~~~~
  o Doesn't support file locking functions (DosSetFileLocks())

  o Doesn't support the DosFindNotify...() functions.  I have never seen
    OS/2 use these functions.



Installation and use
~~~~~~~~~~~~~~~~~~~~
Add IFS=d:\path\RAMFS.IFS to config.sys and reboot.  Then, from an OS/2
prompt, use RAMDISK.EXE to create a RAM drive. To create a drive R:, type
RAMDISK R:
To have a RAM drive created at every boot, you can add RUN=d:\path\RAMDISK R:
to config.sys.



Source code
~~~~~~~~~~~
RAMFS.IFS is written in Borland C++ 3.1 and Turbo Assembler 3.1.  Yes,
Borland C++ happily compiles 16-bit code for OS/2.  If you want to
recompile, you will need the 16-bit OS/2 header files (not included here).
With some tweaking, you may be able to compile it with other 16-bit protect-
mode compilers.  You can link it with the 16-bit IBM LINK.EXE, or Borland
TLink 5.1 (the one that comes with Borland C++ 3.1).  Yes, Borland doesn't
document that TLink can generate OS/2 executables.
RAMDISK.EXE is a small and simple 32-bit utility.  You should be able to
recompile it with any 32-bit OS/2 compiler.  I used IBM CSet++ 2.1.



Files in RAMFS.ZIP
~~~~~~~~~~~~~~~~~~
README.TXT  - this file
RAMFS.IFS   - The Installable File System
RAMDISK.EXE - Utility to create RAM disk drives
SRC\*.*     - Source code to RAMFS.IFS and RAMDISK.EXE



Me   : Karl Olsen
Email: kro@post3.tele.dk
WWW  : home3.inet.tele.dk/kro
