Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/i/inflator.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/i/inflator.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/i/inflator.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/i/inflator.html on line 8

inflator

Inflate previously deflated files


Note: You must be root to start this resource manager.

Syntax:

inflator [-b num] [-v[v...]] [mountpoints...]
         [!exclude...]

Runs on:

Neutrino

Options:

-b num
The number of decompression buffers (default: 8).
-v[v...]
Be verbose. Each additional v makes the output more verbose.

Note: If you specify the -v option, you need to start inflator in the background. If you don't use this option, inflator automatically daemonizes itself.

mountpoints
Directories to overlay (the default is /). If a mountpoint starts with an exclamation mark (!), that directory is excluded.
!exclude
Directories to exclude.

Description:

The inflator resource manager sits in front of other filesystems and inflates files that were previously deflated using the deflate utility. It's typically used when the underlying filesystem is a flash filesystem — it can almost double the effective size of the flash memory.

When started without arguments, inflator takes over /, placing it in front of any existing filesystems. It then catches each open() first. If the file is being opened for read, inflator attempts to open the file itself on an underlying filesystem. It reads the first 16 bytes and checks for the signature of a deflated file. If the file was deflated, inflator places itself between the application and the underlying filesystem. All reads return the original file data before it was deflated.

From the application's point of view, the file appears to be uncompressed. Random seeks are also supported. If the application does a stat() on the file, the size of the inflated file (the original size before it was deflated) is returned. If it's necessary to open a deflated file and see the deflated data or the deflated size, append .~~~ to the filename and open that. For example:

$ deflate file1    # Deflate a file
$ wc file1         # wc sees the contents of the original file
$ wc file1.~~~     # wc sees the contents of the deflated file
$ ls -l file1      # ls reports the size of the original file
$ ls -l file1.~~~  # ls reports the size of the deflated file

If a file opened for read doesn't have the deflate signature, inflator returns ENOENT, which gives the file to the next underlying filesystem. In this manner, inflator gets out of the way. Likewise if a file is opened for any write mode, inflator again returns ENOENT and gets out of the way. You can use the -v option to monitor the opens that inflator receives and which ones it accepts. You can use multiple -v options to obtain more verbosity.

By default, inflator maintains 8 inflation buffers that are used to decompress data. If more than 8 files are being processed at one time, the buffers are used as a cache. If a buffer is stolen away from a file, a subsequent read on that file requires the data to be reread and inflated again. A single -v prints a message each time a buffer is stolen, allowing you to tune your system. Since memory is often in short supply in embedded systems, you should use the minimum number of buffers needed to achieve acceptable performance.

The size of the buffers is determined by the deflate utility. It defaults to 8K, but may be set to any of 4K, 8K, 16K or 32K. In effect, the file is broken into smaller compression blocks instead of compressing the entire file as a whole. Without this, random seeking in the file would be a performance nightmare. On fast processors (200MHz), the cost of inflating the data shouldn't be significant. On slower processors, it may be a performance issue as the inflation code competes for processor cycles.


Note: Some versions of the flash filesystem (devf-*) also support compression. For most systems, inflator provides better compression and comparable, if not better, performance.

Examples:

Take over / and inflate files that have been deflated when they're opened for reading by applications:

inflator

Take over / as above, but pass on any files under /tmp to any underlying filesystems without examining them in any way:

inflator / !/tmp

Take over directories where executables are usually located. Inflate files that have been deflated when they're opened for reading by applications:

inflator /sbin /bin /usr/sbin /usr/bin /usr/photon/bin

Take over / as above, but output some diagnostics (note the ampersand, which is needed to make inflator run in the background when -v is specified):

inflator -v &

Take over / as above, but output lots of diagnostics:

inflator -vvvvv &

Caveats:

You can't run inflator twice on the same mountpoint.

See also:

deflate, devf-*


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/i/inflator.html on line 248

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/i/inflator.html on line 248