[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

JFFS2 - BBC - model file support


Now there is only one feature in BBC which is not yet supported in the 
official JFFS2: model files. I would like to (re)implement it for JFFS2.

If someone doesn't know what are model files (and BBC), why they can be 
usefull: JFFS2 splits the files into 4KB blocks and compresses them 
individually. 4K can be too small for the compressors to detect 
correspontendes in the data and compress it effectively. To overcome 
this problem we can introduce the concept of model-based compressor, 
which can collect information about the file structure before making the 
file system image, and can use this (model) information during 
(de)compressing blocks. We developed a model based compressor - it use 
binary decision tree as model. It is designed specially for compressing 
ARM code.

In BBC there was a "bbc.conf" file in the root directory of the JFFS2 
image containg the names of the model files. At mounting time the system 
reads this file, and load all the specified files - using their names.

David, you wrote me that you don't like this (name-based) solution, 
because the models are regular files and the (at least the super)user 
can modify/delete it.

You suggested to use inode number instead of names - which is hidden 
from the user. I thought it over and now I descibe my plan how to 
implement it in details - before staring to do it:
- it will be optional (can be selected by kernel-config)
- to identify model-based compressors the highest bit of their 
JFFS2_COMPR_XXX number will be 1
- there will be possible to use more than one model per compressor. The 
usercompr field will be used to idenditify these models.
- there will be a new node type (with bitmask JFFS2_FEATURE_INCOMPAT) 
which stores the inode numbers of model files.
- model files will not have dentry, can be accessibly only using inode 
numbers (but certainly their nlink will be setted to 1)
- about mkfs.jffs2: using the existing switches (and with one additional 
to specify model files) the user can specify a default 
compressor-configuration (compression mode, compressor set and model 
files). It is the way how it works now. To improve it there will be a 
possibility for the user to use a compressor-configuration file with 
mkfs. All blocks of all files will be compressed using the default 
compressor-configuration except the ones mentioned in the 
compressor-configuration file, where this compressor-configuration can 
be specified. I think it is not only a usefull feature but can be a 
required one, because (for example) if someone want to use (not 
very-very new) bootloader to boot kernel from JFFS2 the blocks of the 
kernel files must be compressed only using zlib/rtime.

What is your opinion? Will it be OK?


To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo@xxxxxxx.com