First draft of the new block cache API with transaction support.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9893 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -9,10 +9,30 @@
|
||||
#include <fs_interface.h>
|
||||
|
||||
|
||||
typedef void (*transaction_notification_hook)(int32);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* transactions */
|
||||
extern int32 cache_transaction_start(void *_cache, transaction_notification_hook hook);
|
||||
extern status_t cache_transaction_sync(void *_cache, int32 id);
|
||||
extern status_t cache_transaction_end(void *_cache, int32 id);
|
||||
extern status_t cache_transaction_abort(void *_cache, int32 id);
|
||||
|
||||
/* block cache */
|
||||
extern void block_cache_delete(void *_cache, bool allowWrites);
|
||||
extern void *block_cache_create(int fd, off_t numBlocks, size_t blockSize);
|
||||
extern status_t block_cache_sync(void *_cache);
|
||||
|
||||
extern void *block_cache_get_writable_etc(void *_cache, off_t blockNumber, off_t base, off_t length, int32 transaction);
|
||||
extern void *block_cache_get_writable(void *_cache, off_t blockNumber, int32 transaction);
|
||||
extern void *block_cache_get_empty(void *_cache, off_t blockNumber, int32 transaction);
|
||||
extern const void *block_cache_get_etc(void *_cache, off_t blockNumber, off_t base, off_t length);
|
||||
extern const void *block_cache_get(void *_cache, off_t blockNumber);
|
||||
extern void block_cache_put(void *_cache, off_t blockNumber);
|
||||
|
||||
/* file cache */
|
||||
extern void *file_cache_create(mount_id mountID, vnode_id vnodeID, off_t size, int fd);
|
||||
extern void file_cache_delete(void *_cacheRef);
|
||||
|
||||
Reference in New Issue
Block a user