c005f7ed | 10-Oct-2017 |
Vagrant Cascadian <vagrant@debian.org> |
fs/jffs2/mini_inflate.c: use "static inline" instead of "inline"
This makes gcc no longer expect an out-of-line version of the functions being present elsewhere.
This fixes a failure to build on se
fs/jffs2/mini_inflate.c: use "static inline" instead of "inline"
This makes gcc no longer expect an out-of-line version of the functions being present elsewhere.
This fixes a failure to build on several marvell targets with gcc-7 on Debian:
https://bugs.debian.org/877963
Signed-off-by: Adrian Bunk <bunk@debian.org> Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
show more ...
|
10d3ac34 | 30-Jun-2015 |
Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz> |
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 las
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>
show more ...
|
54a88384 | 30-Jun-2015 |
Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz> |
JFFS2: Use CLEANMARKER to reduce scanning time
If a sector has a CLEANMARKER at the beginning, it indicates that the entire sector has been erased. Therefore, if this is found, we can skip the entir
JFFS2: Use CLEANMARKER to reduce scanning time
If a sector has a CLEANMARKER at the beginning, it indicates that the entire sector has been erased. Therefore, if this is found, we can skip the entire block. This was not being done before this patch.
The code now does the same as the kernel does when encountering a CLEANMARKER. It still checks that the next few words are FFFFFFFF, and if so, the block is assumed to be empty, and so is skipped.
Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
show more ...
|
081adef7 | 30-Jun-2015 |
Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz> |
JFFS2: Change scansize to match linux kernel
The scan code is similar to the linux kernel, but the kernel defines a much smaller size to scan through before deciding a sector is blank. Assuming that
JFFS2: Change scansize to match linux kernel
The scan code is similar to the linux kernel, but the kernel defines a much smaller size to scan through before deciding a sector is blank. Assuming that what is in the kernel is OK, make these two match.
On its own, this change makes no difference to scanning of any sectors which have a clean marker at the beginning, since the entire sector is not blank.
Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
show more ...
|
2d6d93a2 | 30-Jun-2015 |
Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz> |
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 on
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>
show more ...
|
891224a5 | 30-Jun-2015 |
Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz> |
JFFS2: Only list each directory entry once
If multiple versions of a file exist, only the most recent version should be used. The scheme to write 0 for the inode in older versions did not work, sinc
JFFS2: Only list each directory entry once
If multiple versions of a file exist, only the most recent version should be used. The scheme to write 0 for the inode in older versions did not work, since this would have required writing to flash.
The only time this caused an issue was listing a directory, where older versions of the file would still be seen. Since the directory entries are sorted, just look at the next entry in the list, and if it's the same move to that entry instead.
Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
show more ...
|
225cf4cd | 30-Jun-2015 |
Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz> |
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 faste
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>
show more ...
|