Added functions file_cache_{disable,enable}(). They allow to disable

actual caching in the file cache, i.e. all reads and writes go directly
to the underlying device. The implementation is not quite complete,
since the VM can still add pages to the cache when the file is mmap()ed,
which can lead to inconsistencies.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26779 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-08-04 03:15:50 +00:00
parent 2f462cb8e9
commit 7491000f20
6 changed files with 158 additions and 0 deletions
+2
View File
@@ -73,6 +73,8 @@ extern void block_cache_put(void *_cache, off_t blockNumber);
/* file cache */
extern void *file_cache_create(dev_t mountID, ino_t vnodeID, off_t size);
extern void file_cache_delete(void *_cacheRef);
extern void file_cache_enable(void *_cacheRef);
extern status_t file_cache_disable(void *_cacheRef);
extern status_t file_cache_set_size(void *_cacheRef, off_t size);
extern status_t file_cache_sync(void *_cache);