roadnottaken wrote:All this talk of reiser4 brought to mind a question that has been bugging me since I've tried to move to reiser4. Using reiser4progs 1.0.6, I have been able to display the list of plugins. However, I have no clue how to use most of them because I don't know the plugin types, except for those with the same types as a plugin in the default profile. For obvious reasons, I can't just look up plugin types on the Namesys website. Does anyone know what the various plugin types are?
cryptcompress related plugin options:
Settings related to transparent compression in Reiser4
The following is a list of pset members 1 which are needed to create/manage cryptcompress files. Currently values of listed pset members (except @file) are inherited from parent objects, and for root directory they are installed by mkfs.reiser4 via appropriate options.
file
Points to a file plugin which is to service VFS entrypoints.
List of currently possible values (label/description):
*
"reg40", "unix-file plugin". Manages regular files.
*
"ccreg40", "cryptcompress file plugin". Manages regular files with encrypted and(or) compressed bodies.
*
"dir40", "directory file plugin". Manages directories.
*
"sym40", "symlink file plugin". Manages symlinks.
Currently there is no interface to set this pset member explicitly. For regular files @file is assigned by default as @create of parent directory at creation time (see below).
create
Points to a file plugin, which is to define values of "file" pset member of regular children at creation time, i.e. the following assignment takes place:
reiser4_inode * object; /* directory */
reiser4_inode * child; /* regular file */
...
child->pset->file = object->pset->create;
List of currently possible values (label/description):
*
"reg40", "unix-file plugin". Create a regular file managed by unix-file plugin.
*
"ccreg40", "cryptcompress file plugin". Create a regular file managed by cryptcompress file plugin.
Default value 2 is "reg40" (create a unix-file).
cluster
Points to a cluster plugin which defines size of logical cluster in a cryptcompress file.
List of currently possible values (labels):
*
"4K", "8K", "16K", "32K", "64K".
Default value is "64K".
Note: logical clusters smaller then page size are unsupported.
compression
Points to a compression transform plugin, which defines algorithms of compression, decompression and checksum for data transform. Checksums are appended per disk cluster to verify data integrity before decompression.
List of currently possible values (label/description):
*
"lzo1", wrappers for minimal compression library of Markus Oberhumer, adler32 checksum.
*
"gzip1", wrappers for the fastest compression algorithms of linux zlib library, adler32 checksum.
Default value is "lzo1".
compression_mode
Points to a compression mode plugin which defines some heuristic for data compression. Currently this is a set of handlers called by deflate manager in flush time. Properly assigned compression mode allows to reduce cpu and memory usage when handling incompressible data.
List of currently possible values (label/description):
*
"ultim", "Check ultimately". In this mode compression will be "turned off" forever as soon as deflate manager meet incompressible page cluster.
*
"latt", "Check on dynamic lattice". This is adaptive mode that manage special per-inode compression toggle. This toggle shows last compression experience: ->discard_hook() sets it to 0; ->accept_hook() sets it to 1. ->should_compress() first looks at this toggle. If it is 1, then ->should_compress() advises to compress current logical cluster. Otherwise ->should_compress() advises to compress it only in the case when its index belongs to the lattice of variable factor X (X = 2, 4, ..., 32) which get increased after each unsuccessful experience (successful one returns it back to minimal value).
*
"conv", "Convert to extent". This mode activates a special hook in reiser4 context of sys_write() (when writing from special offset in some write iteration) which tries to estimate whether a file is compressible by testing its first logical cluster (64K by default). Such evaluation is performed only once per file's life. If evaluation result is negative, then fragments will be converted to extents, and management will be passed to unix-file plugin. Back conversion does not take place. If evaluation result is positive, then file remains under cryptcompress plugin control, but compression mode plugin will be converted to "latt", i.e all future decisions about compressibility will be in the competence of the flush algorithm.
*
"force", "Compress everything". In this mode deflate manager is forced to compress every logical cluster (unless it is too small).
*
"none", "Do not compress". In this mode deflate manager does not invoke compression.
Default value is "conv".
examples:
mkfs.reiser4 -o formatting=tails /dev/sda6
mkfs.reiser4 -o formatting=extents /dev/sda6
mkfs.reiser4 -o create=ccreg40,compress=gzip1 /dev/sda6
mkfs.reiser4 -o create=ccreg40,compress=lzo1 /dev/sda6
mkfs.reiser4 -o create=ccreg40,compress=gzip1,compressMode=conv /dev/sda6
mkfs.reiser4 -o create=ccreg40,compress=gzip1,compressMode=conv /dev/sda6
mkfs.reiser4 -o create=ccreg40,compress=gzip1,compressMode=latt /dev/sda6 (default ?)
mkfs.reiser4 -o create=ccreg40,compress=gzip1,compressMode=force /dev/sda6
mkfs.reiser4 -o create=ccreg40,compress=gzip1,compressMode=ultim /dev/sda6
currently I'm too busy to look up for more, this should suffice for the beginning ...