| 10d3ac34 | 01-Jul-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 | 01-Jul-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 | 01-Jul-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 | 01-Jul-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 | 01-Jul-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 | 01-Jul-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 ...
|
| 040cc7b3 | 22-Jan-2015 |
Anton Habegger <anton.habegger@gmail.com> |
ubifs: Enable journal replay during mount
Enable ubifs_replay_journal during mount_ubifs, which was disabled before.
This commit fix an issue with unrecoverable ubifs volumes after power cut.
Ther
ubifs: Enable journal replay during mount
Enable ubifs_replay_journal during mount_ubifs, which was disabled before.
This commit fix an issue with unrecoverable ubifs volumes after power cut.
Therefor the gc.c is imported now from 1860e37 Linux 3.15
hs: added SPDX-License-Identifier for fs/ubifs/gc.c
Signed-off-by: Anton Habegger <anton.habegger@gmail.com>
show more ...
|
| d455d878 | 17-Nov-2014 |
Suriyan Ramasami <suriyan.r@gmail.com> |
fs: API changes enabling extra parameter to return size of type loff_t
The sandbox/ext4/fat/generic fs commands do not gracefully deal with files greater than 2GB. Negative values are returned in su
fs: API changes enabling extra parameter to return size of type loff_t
The sandbox/ext4/fat/generic fs commands do not gracefully deal with files greater than 2GB. Negative values are returned in such cases.
To handle this, the fs functions have been modified to take an additional parameter of type "* loff_t" which is then populated. The return value of the fs functions are used only for error conditions.
Signed-off-by: Suriyan Ramasami <suriyan.r@gmail.com> Acked-by: Simon Glass <sjg@chromium.org> [trini: Update board/gdsys/p1022/controlcenterd-id.c, drivers/fpga/zynqpl.c for changes] Signed-off-by: Tom Rini <trini@ti.com>
show more ...
|
| b4141195 | 06-Nov-2014 |
Masahiro Yamada <yamada.m@jp.panasonic.com> |
linux/kernel.h: sync min, max, min3, max3 macros with Linux
U-Boot has never cared about the type when we get max/min of two values, but Linux Kernel does. This commit gets min, max, min3, max3 mac
linux/kernel.h: sync min, max, min3, max3 macros with Linux
U-Boot has never cared about the type when we get max/min of two values, but Linux Kernel does. This commit gets min, max, min3, max3 macros synced with the kernel introducing type checks.
Many of references of those macros must be fixed to suppress warnings. We have two options: - Use min, max, min3, max3 only when the arguments have the same type (or add casts to the arguments) - Use min_t/max_t instead with the appropriate type for the first argument
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Pavel Machek <pavel@denx.de> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com> [trini: Fixup arch/blackfin/lib/string.c] Signed-off-by: Tom Rini <trini@ti.com>
show more ...
|