]> git.karo-electronics.de Git - karo-tx-uboot.git/commit
JFFS2: Improve speed reading flash files
authorMark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
Wed, 1 Jul 2015 04:38:25 +0000 (16:38 +1200)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 06:24:12 +0000 (08:24 +0200)
commitced4360c4a7a4e1509d2ebcfe8538bc871f56dc4
tree32f88299b78f888dfcb10bb5f6286f225c61e817
parent66c00f9f8880ee12b8127a193b3d8fcbf9382612
JFFS2: Improve speed reading flash files

jffs2_1pass_read_inode() would read the entire data for each node
in the filesystem, regardless of whether it was part of the file
to be loaded or not. By only reading the header data for an inode,
and then reading the data only when it is found to be part of the
file to be loaded, much copying of data is saved.

jffs2_1pass_list_inodes() read each inode for every file in the
directory into a buffer. By using NULL as a buffer pointer, NOR
flash simply returns a pointer, and therefore avoids a memory copy.

Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
fs/jffs2/jffs2_1pass.c