Make blocktree indir block sizes variable.
[vcfs.git] / blocktree.h
index c962874..fd2ea99 100644 (file)
@@ -4,10 +4,6 @@
 #include "store.h"
 #include "inttypes.h"
 
-#define BT_INDBITS 10
-#define BT_INDSZ (1 << BT_INDBITS)
-#define BT_INDBSZ (sizeof(struct btnode) * BT_INDSZ)
-
 typedef loff_t block_t;
 
 struct btnode {
@@ -23,10 +19,10 @@ struct btop {
     void *pdata;
 };
 
-ssize_t btget(struct store *st, struct btnode *tree, block_t bl, void *buf, size_t len);
-int btputmany(struct store *st, struct btnode *tree, struct btop *ops, int numops);
-int btput(struct store *st, struct btnode *tree, block_t bl, void *buf, size_t len);
-block_t btcount(struct store *st, struct btnode *tree);
+ssize_t btget(struct store *st, struct btnode *tree, block_t bl, void *buf, size_t len, size_t blsize);
+int btputmany(struct store *st, struct btnode *tree, struct btop *ops, int numops, size_t blsize);
+int btput(struct store *st, struct btnode *tree, block_t bl, void *buf, size_t len, size_t blsize);
+block_t btcount(struct store *st, struct btnode *tree, size_t blsize);
 void btsortops(struct btop *ops, int numops);
 void btmkop(struct btop *op, block_t bl, void *buf, size_t len);