summaryrefslogtreecommitdiff
path: root/disk-io.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-02-02 09:18:22 -0500
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-02-02 09:18:22 -0500
commit215ad20a9b077d44ea1cf58b1bac64a7f42d058a (patch)
tree6f1ed85ebf6bd133cb8c7089100963f45cdf341c /disk-io.h
parent5622872d31e6f19bab5e5896ed6272872e0a980c (diff)
Add backing store, memory management
Diffstat (limited to 'disk-io.h')
-rw-r--r--disk-io.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/disk-io.h b/disk-io.h
new file mode 100644
index 00000000..ee95fa05
--- /dev/null
+++ b/disk-io.h
@@ -0,0 +1,21 @@
+#ifndef __DISKIO__
+#define __DISKIO__
+
+struct tree_buffer {
+ u64 blocknr;
+ int count;
+ union {
+ struct node node;
+ struct leaf leaf;
+ };
+};
+
+struct tree_buffer *read_tree_block(struct ctree_root *root, u64 blocknr);
+int write_tree_block(struct ctree_root *root, struct tree_buffer *buf);
+struct ctree_root *open_ctree(char *filename);
+int close_ctree(struct ctree_root *root);
+void tree_block_release(struct ctree_root *root, struct tree_buffer *buf);
+struct tree_buffer *alloc_free_block(struct ctree_root *root);
+int update_root_block(struct ctree_root *root);
+
+#endif