Preliminary version of the file caching API - does not yet support journaling and such.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8843 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-09-04 17:15:22 +00:00
parent 7af4ca8acf
commit a1978b5cef

View File

@ -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 <fs_interface.h>
#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 */