mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git
synced 2024-11-23 17:53:39 +08:00
70c5bab971
Implemented cache options in F2FS configuration 'c' (i.e. user options): * use c.cache_config.num_cache_entry to set the number of cache entries (in block), minimum 1024, or 0 to disable cache. * use c.cache_config.max_hash_collision to set maximum hash collision (max 16). * use c.cavhe_config.dbg_en to enable printing of debug messages. Cache properties: * Per block save based (block size = f2fs block size = 4K Bytes) * Device block indices are used to hash (simple modular hash function) to cache indices. * A hash collision (when a block is hashed to an already occupied cache block) will trigger offset-based relocation to max 16 other places, at first empty slot found policy. * A hash collision with all 17 possible relocating places occupied will evict the oldest used one (replaced by the new read block). A global 'use' tick is kept ticking-up per block read for this purpose. * On write cache hit, it will update the corresponding cached block. * On write cache miss, the data won't be cached. * Write-through policy only: never delayed write. * On read cache hit, it returns the cached block. * On read cache miss, it issues an I/O read to the kernel, and then caches and returns the block. * Currently read ahead is not implemented. Yet, the read ahead logic is kept as before, i.e. using kernel's read ahead mechanism. Signed-off-by: Robin Hsu <robinhsu@google.com> [Jaegeuk Kim: Fix one bug in dcache_update_rw()] Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> |
||
---|---|---|
.. | ||
android_config.h | ||
f2fs_fs.h | ||
quota.h |