This implements an idea Lucas came up with: Our block layer is quite stupid. It works on chunks from which one is currently 16KiB in size. Whenever such a chunk is written to we must write the whole chunk which also means we have to read it from the device first in order to keep unaffected data. This series adds a discard_range() function which can be used to tell the block layer that a certain range of the device will be overwritten and the current content is no longer needed and thus doesn't have to be read. With this I saw a speed gain of around 30% when writing to a SD card. This series still needs a closer look before I want to merge it, but it's already worth being looked at ;) Sascha Sascha Hauer (4): fs: Introduce discard_range() cdev: Add discard_range hook block: Implement discard_range copy_file: call discard_range on destination file common/block.c | 21 +++++++++++++++++++++ fs/devfs.c | 21 +++++++++++++++++++++ fs/fs.c | 25 +++++++++++++++++++++++++ include/block.h | 3 +++ include/driver.h | 1 + include/fs.h | 3 +++ lib/libfile.c | 2 ++ 7 files changed, 76 insertions(+) -- 2.24.0 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox