diff options
author | Marcin Niestroj <m.niestroj@grinn-global.com> | 2018-09-26 13:08:46 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-10-08 09:53:31 +0200 |
commit | 383b9348d7af2ba9caad23c08fd6553d014457a9 (patch) | |
tree | 6a664cdee4c9438b852f548a41a5aa76a60b18f9 /commands | |
parent | 5154902196cb4d2da17a7236e720db0b8d4ac565 (diff) | |
download | barebox-383b9348d7af2ba9caad23c08fd6553d014457a9.tar.gz barebox-383b9348d7af2ba9caad23c08fd6553d014457a9.tar.xz |
fs: improve ramfs_truncate speed
During sequential writes into single file, fs layer is consequently
calling ramfs_truncate() function. When file size grows
ramfs_truncate() takes more and more time to complete, due to
interations through all already written data chunks. As an example
loading ~450M image using usb fastboot protocol took over 500s to
complete.
Use ramfs_find_chunk() function to search for last chunk of data in
ramfs_truncate() implementation, which saves a lot of loop
iterations. As a result loading ~450M image using usb fastboot
protocol takes around 25s now.
Tested-by: Maciej Zagrabski <m.zagrabski@grinn-global.com>
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
0 files changed, 0 insertions, 0 deletions