io-fs-media

Neutrino Media Filesystem

Syntax:

io-fs-media options

Runs on:

ARM, PowerPC, SH, x86

Options:

-a
Always start all the built-in drivers.
-b
Don't run in the background (used for debugging).
-cTYPE=num
Set a cache size. The type of cache is specified by TYPE, and can be one of:
-d driver,options
Start only the specified driver with the specified options. The available drivers are (see below for more information about these drivers):

Note: Because io-fs-media is single-threaded, you should start each driver in its own process.

-o fsys[=blkpat],[+options]
Override automount options for fsys. The “+” appends options.
-o cd[=device],use,nojoliet,noudf
CD filesystem options
-o lt[=blkpat],use,format[=maxfile:maxmap],sync=sec,notrans
LT filesystem options
-s
Cause rename, unlink, chmod, chown and chmod to be synchronous.

Note: The -s option applies to writable filesystems; the media filesystems supported by io-fs-media are read-only, and don't support this option.

-t
Print the built-in tables to stdout, then exit.
-v
Add the verbose option to all mounted filesystems.

Description:

The io-fs-media filesystem makes disparate media devices and filesystems appear as POSIX-compliant filesystems under QNX Neutrino. It is based on the io-fs filesystem framework, and provides some extensions specific to media devices. This variant of io-fs is designed specifically for use with the MME. For more information about the architecture of io-fs, see the Introduction to the MME.

The io-fs-media supports these media devices and filesystems:


Note: Other media device support options for io-fs-media may be available; contact your QNX sales representative for information.

The io-fs configuration files

io-fs uses the following configuration files, located at io-fs/lib/config/etc/:

iofs.fsd

The iofs-fsd configuration file sets the driver startup rules. To use a rule, simply uncomment the line for the drive.


Note:
  • Use the -d command line option to have force start a driver.
  • The mount= option is only available for drivers that can only mount a single known file system, such as “media”, “tmp” or “et”.
  • Block devices can mount many filesystems; these are configured in the iofs.fsm table.

Below is a sample iofs.fsd configuration file.

# DRIVER       OPTIONS
tmp           mount=/fs/tmpfs
#file          dir=/dev:/var/images,safe
#ata
umass

#mtest         mount=/fs/mtest%#
ipod          device=/dev/ser1,mount=/fs/ipod%#
pfs           mount=/fs/pfs%#

#sim_nor       object=/nor,size=32m,mount=/fs/etfs%#
#sim_nand512   object=/nand512,size=512k,mount=/fs/etfs%#
#sim_nand2048  object=/nand2048,size=64m,mount=/fs/etfs%#

iofs.fsf

The iofs-fsf configuration file sets the filename rules used by io-fs.

Below is a sample iofs.fsf configuration file.

# Filename rules
# PATTERN     FLAGS
*.aac         SN P(64K)   G(64K)
*.flac/*.aac
*.mp3/*.aac
*.ogg/*.aac
*.wav/*.aac
*.wma/*.aac

*.mpg         SN P(256K)  G(64K 256K,256K 2M,1M)
*.avi/*.mpg
*.mov/*.mpg
*.mpeg/*.mpg
*.wmv/*.mpg

*.o           SN P(64K)   G(16K  16K,64K)
*.lib         SN P(64K)   G(256K)

# Next group for testing
*.non         SN P(0K)    G(0K)
*.pag         SN P(4K)    G(4K)
*.bun         SN P(64K)   G(64K)
*.wad         SN P(256K)  G(256K)
*.thr         SN P(1M)    G(1M)
*.xxx         E

!             S  P(64K)   G(16K 16K,64K)
*                         G(4K  16K,8K 64K,32K)

Filename rule nomenclature

The filename rules use the following nomenclature:

iofs.fsm

The iofs-fsf configuration file contains a table that defines the rules used by io-fs to auto-mount devices.

Below is a description of the contents of the io-fs mount rule table in the iofs.fsm configuration file. For more information about how io-fs uses the rules in the table see the comments following the table.

Pattern File
system
Mount
point
Options
dos-* dos /fs/dos%#
nt-* nt /fs/ntfs%#
lt-* lt /fs/ltfs%# if=unknown,format,endif
qnx4-* qnx4 /fs/qnx%#
ext-* ext2 /fs/ext%#
cd cd /fs/cda%#
usb-*-disk pc volmgr if=invalid,format,endif,if=empty,add=dos:full,endif
flop-*-disk dos /fs/dosflop%#
disk efi volmgr
disk pc volmgr
disk dos /fs/dos%# if=invalid,abandon,endif
disk qnx4 /fs/qnx%# if=invalid,abandon,endif
disk lt /fs/ltfs%# if=invalid,abandon,endif

Comments

The fields defining how io-fs auto-mounts a device are described below.

Pattern

The Pattern field sets a pattern as defined by the fnmatch function, which is applied to a block device containing a file system. The block device has a well-defined naming convention, as follows:

bus-busdevno-class-unit-type.fstype-partslot

Where:

Filesystem name

The Filesystem name field sets the name of the filesystem to start: “lt”, “dos”, “qnx4”, “nt”, “ext2”, “cd”, etc.; or, if the mountpoint is NULL, the name of the volume manager to use; for example, “pc” for a standard Microsoft partition table.

Mountpoint

The Mountpoint field sets the location where io-fs mounts the filesystem in the pathname space.

The percent sign “%” is a special macro character with the following values defined:

Options

The Options field sets filesystem-specific or volume manager-specific options. Common options include:

Starting the RAM Filesystem

The RAM/TMP filesystem creates a temporary POSIX filesytem in system RAM that exists for the duration of the io-fs-media process.

The TMP filesystem has these additional command line options:

use
Print out a usage message and then exit.
mount=path
The path to mount the RAM filesystem at; if not specified, the filesystem is mounted at /fs/tmpfs.
minsize=megsM
The minimum filesystem size, in Mb. See About the minsize and maxsize options below.
maxsize=megsM
The maximum filesystem size, in Mb. See About the minsize and maxsize options below.
noglob
Specify that the filesystem shouldn't be located in global memory.

Note: The noglob option is for ARM9 targets only.

About the minsize and maxsize options

For the minsize and maxsize options, you must specify that the unit is megabytes by appending an “M” to the megs value. For example:

# io-fs-media -d tmp,minsize=3M,maxsize=12M,noglob -cpages=4 -cbundles=0

The minsize option sets the the minimum memory size, which is allocated at startup as contiguous memory. This memory allocation can increase up to the size specified by the maxsize option as needed. Memory that is allocated after startup may or may not be allocated contiguously.

With ARM9 targets, behavior varies from that described above: at start up, memory is allocated contiguously up to the value specified by the maxsize option.

Examples:

The examples below show some io-fs start up options:

io-fs -b
Do not put into the back ground so you can kill it with a keyboard break. Great for debugging.
io-fs -b -olt,format
Always format auto-mounted ltfs partitions.

See also:

iofs-ipod.so, iofs-pfs.so, mme