]> git.dujemihanovic.xyz Git - u-boot.git/commit
JFFS2: Use merge sort when parsing filesystem
authorMark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
Wed, 1 Jul 2015 04:38:29 +0000 (16:38 +1200)
committerTom Rini <trini@konsulko.com>
Thu, 13 Aug 2015 00:47:32 +0000 (20:47 -0400)
commit10d3ac346f54ab9526cd352239a5906ee2b92fee
treec3dc2f4c0df60a876aba4de9b962bd84d6b570e5
parent54a883840be500cbcda4903118dd571e4532e83f
JFFS2: Use merge sort when parsing filesystem

When building the file system the existing code does an insertion into
a linked list. It attempts to speed this up by keeping a pointer to
where the last entry was inserted but it's still slow.

Now the nodes are just inserted into the list without searching
through for the correct place. This unsorted list is then sorted once
using mergesort after all the entries have been added to the list.
This speeds up the scanning of the flash file system considerably.

Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
fs/jffs2/Makefile
fs/jffs2/jffs2_1pass.c
fs/jffs2/jffs2_private.h
fs/jffs2/mergesort.c [new file with mode: 0644]