2004-09-04 21:15:22 +04:00
|
|
|
/* 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 */
|
2004-09-07 01:53:36 +04:00
|
|
|
extern void *file_cache_create(mount_id mountID, vnode_id vnodeID, off_t size, int fd);
|
2004-09-04 21:15:22 +04:00
|
|
|
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 */
|