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

Fwd: Re: Speeding up the mounting of JFFS Device



David:

Below is an old exchange of email. The attached
change allows you to specify the number of erase
units used to store the cache.

However, before you try the node cache make sure
that you are using a version of intrep.c that is
1.71 or newer. There was a change made to scanflash
that improved performance. It the improvement is
sufficient then you should not bother using the
node cache.

Bye!
Dan McDonald
---- Begin Included Message ----

From: "Dan" <dmcdon@xxxxxxx.com>
Sent: Sun, 29 Oct 2000 08:32:02 -0700
To: afong@xxxxxxx.org
Subject: Re: Speeding up the mounting of JFFS Device


Hi Amy:

I fixed the problem. Thanks for your help.
It seems that in my environment I don't trap accesses to
NULL pointers - it was fortunate that you did.

For inode 1, the name is indeed a NULL pointer.
Now when I encounter a NULL pointer for a name
I write a NULL string as the name. This will
keep the number of files and the number of names
in sync. See change to jffs_nc_write_name() in jffs_nc.c.

While adjusting files after the reading of the
cache if the file's name pointer is NULL I don't attach the
file name to the file. See change to jffs_nc_adjust_file()
in jffs_nc.c.

I noticed in some of your debug output that your
offsets into the node cache were up to 44000. It is
likely that the node cache would exceed one of
your erase units. I added a JFFS_NC_CACHE_SIZE to
jffs_nc.h. It is set to 2 now. This means that
the cache will now be 2*erasesize=128K for you.
The cache header now becomes

   mkfs.jffs -d trial > jffs_image.bin
   head -c 131072 jffs_cash.bin > whatever.bin
   cat whatever.bin jffs_image.bin > jffs_cash_image.bin

   mknod /dev/mtdchar1 c 90 2
   mknod /dev/mtdblock1 b 31 1

   eraseall /dev/mtdchar1
   cat jffs_cash_image.bin > /dev/mtdblock1

   mount -r -t jffs /dev/mtdblock1 /mnt/hack

For some reason the minor number for the char device
is 2 times the minor number of the block device ???.
It confused me for a bit.

The version 1.71 of intrep.c has also been merged
into this load.

Hopefully, this will solve your problem. Please
let me know about your results.




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


---- End Included Message ----





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

jffs.tgz