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

Re: Re: Suggestion: Read-Only mount - No gc

Sorry about the diff! I am new to Linux, CVS, patch, diff, jffs, etc.
Your guidance is welcome.

I will figure out the "mount -orw,remount". Whatever that means
and let you know. :-).

I have created a cache to speed up mounting of read-only
partitions. Mounting a full 20-Meg partition was taking
unacceptably long. The cache basically stores the data
structures created by scanflash() - jffs_fmcontrol, jffs_file,
jffs_node, jffs_node_ref and jffs_fm. ( I think I missed
delete_list, oops. Gotta stash that too.)

JFFS can deal with missing an erase unit at the start of
the partition (I think ?) by altering the start that
scanflash() uses and shrinking the free_size.

Upon entering scanflash, if the partition is mounted RO 
and the cache is valid, then scanning is skipped and the
cache is loaded. The loading relinks the data structures
and inserts the files into the hash table. It is very
quick even for a full 20-Meg partition. Scanflash() exits
with all the expected data structures fully re-constructed.

Mounting a partition RW causes the cache to be erased.
Mounting again RO, causes scanflash() to run normally
then write the data structures to the cache. Subsequent
RO mounts use the cache and it loads very rapidly.

It all seems to work though more testing is required before
releasing it. I will make it available a little later if
anyone cares.

Its kind of a brute force solution but I couldn't wait
for a ReadWrite compatible solution.

Dan McDonald
The Late Night Software Shop 
Sign up today for your Free E-mail at: http://www.canoe.ca/CanoeMail