diff --git a/headers/os/drivers/fs_cache.h b/headers/os/drivers/fs_cache.h new file mode 100644 index 0000000000..19e2ddbe6c --- /dev/null +++ b/headers/os/drivers/fs_cache.h @@ -0,0 +1,32 @@ +/* File System File and Block Caches +** +** Distributed under the terms of the Haiku License. +*/ +#ifndef _FS_CACHE_H +#define _FS_CACHE_H + + +#include + + +#ifdef __cplusplus +extern "C" { +#endif + +/* file cache */ +extern void *file_cache_create(mount_id mountID, vnode_id vnodeID, off_t size, int openMode); +extern void file_cache_delete(void *_cacheRef); +extern status_t file_cache_set_size(void *_cacheRef, off_t size); + +extern status_t file_cache_read_pages(void *_cacheRef, off_t offset, + const iovec *vecs, size_t count, size_t *_numBytes); +extern status_t file_cache_write_pages(void *_cacheRef, off_t offset, + const iovec *vecs, size_t count, size_t *_numBytes); +extern status_t file_cache_read(void *_cacheRef, off_t offset, void *bufferBase, size_t *_size); +extern status_t file_cache_write(void *_cacheRef, off_t offset, const void *buffer, size_t *_size); + +#ifdef __cplusplus +} +#endif + +#endif /* _FS_CACHE_H */