diff -r 33e464fd6773 -r 12d5361e7472 cache/engine.h --- a/cache/engine.h Thu Aug 07 20:28:06 2008 +0300 +++ b/cache/engine.h Fri Aug 08 00:15:29 2008 +0300 @@ -5,14 +5,23 @@ /* * Allocate a `struct cache`-compatible struct and return it via cache_ptr. */ - int (fn_init*) (struct cache_engine *engine, struct cache **cache_ptr); + int (*fn_init) (struct cache_engine *, struct cache **); /* * Allocate a `struct cache_op`-compatible struct and return it via cache_ptr. * * Begin the index lookup. */ - int (fn_op_start*) (struct cache *cache, struct cache_op **op_ptr, struct cache_key *key); + int (*fn_op_start) (struct cache *, struct cache_op **, struct cache_key *); + + /* + * Prepare to write and possibly read this cache entry. + * + * size_hint, if nonzero, provides a guess at the size of the cache entry that can be used to optimize stuff + */ + int (*fn_op_begin_write) (struct cache_op *, size_t size_hint); + + int (*fn_op_push) (struct cache_op *op, int fd, size_t *size); }; #endif /* CACHE_ENGINE_H */