]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
JFFS2: Speed up and fix comparison functions
authorMark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
Wed, 1 Jul 2015 04:38:23 +0000 (16:38 +1200)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 06:24:12 +0000 (08:24 +0200)
commit0d6cc1f8de30546c93109d012bb42ed0bf16cea4
treee46f35222923d20882f6de7fbd17c50ec79b1d47
parent63b29147935e3605fa71e2d80e20fafc475f96ca
JFFS2: Speed up and fix comparison functions

Copying complete nodes from flash can be slow if the flash is slow
to read. By only reading the data needed, the sorting operation can
be made much faster.

The directory entry comparison function also had a two bugs. First, it
did not ensure the name was copied, so the name comparison may have
been faulty (although it would have worked with NOR flash).  Second,
setting the ino to zero to ignore the entry did not work, since this
was either writing to a temporary buffer, or (for NOR flash) directly
to flash. Either way, the change was not remembered.

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