Optimize the access at the mapping trees

We access them sequentially, and keeping the last accessed block
is enough to improve the speed.
This commit is contained in:
Andrea Mazzoleni 2015-10-04 23:47:06 +02:00
parent 20043778e4
commit 74ca71600d
2 changed files with 73 additions and 13 deletions

View file

@ -330,6 +330,12 @@ struct snapraid_disk {
tommy_tree fs_parity;
tommy_tree fs_file;
/**
* Last chunk we accessed.
* It's used to optimize access of sequential blocks.
*/
struct snapraid_chunk* fs_last;
/**
* List of all the snapraid_file for the disk.
*/