JFFS2 compression

Ferenc Havasi havasi at inf.u-szeged.hu
Tue Oct 19 06:09:23 EDT 2004


Hi Artem,

> Just wonder, why the compression mode is the global variable 
> (jffs2_get_compression_mode, defined in compr.c). Theoretically, it 
> should be the attribute of superblock (in this case it would be possible 
> to have several JFFS2 filesystems with different compression modes).

Now the compression mode is a global thing. It can be configured by 
kernelconfig and is the same for every filesystem. There is no reserved 
space to store it in the different JFFS2 filesystems (it should need a 
new type of node or something like that).

There is plans for the future. One of them: there will be "compression 
configurations". This is much more general thing than compression mode. 
(contais not only the compression mode but the set of the enabled 
compressors and its priority) The user will be able to define different 
compressor configuration for files or directories. The description of 
these configuration will be stored in a new type of node 
(RWCOMPACT_COPY), and the index of the requested configuration will be 
stored in the upper 4 bits of 'usercompr' field of jffs2_raw_inode.

But it is only a plan. In mkfs it is already impemented (not commited 
yet), but in the file system for first we plan only to implement a very 
limited version of it (which support only the ability to declare a 
directory(s) for no compression).

Bye,
Ferenc




More information about the linux-mtd mailing list