JFFS2 compression

Artem B. Bityuckiy abityuckiy at yandex.ru
Tue Oct 19 06:48:19 EDT 2004


Ferenc Havasi wrote:
> 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).
It isn't needed to store the default compression mode *on flash*. If you 
just move the variable jffs2_compression mode to the jffs2_sb_info 
structure, you will have per-filesystems compression mode. This means, 
for example, that if user changes (dynamically) the compression mode for 
one file-system, the compression mode for another file system isn't changed.

> 
> 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.
Great idea!

But this is the another (deeper) layer. If a file/directory has the 
compression mode set, it would be applied. But the *per-filesystem* 
compression may be used by default (for those files who are not 
mentioned in your "compression configuration" node).



-- 
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.




More information about the linux-mtd mailing list