summaryrefslogtreecommitdiff
path: root/disk-io.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-03-01 18:59:40 -0500
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-03-01 18:59:40 -0500
commita71a25da6968d3b681a04f5f9289a2ea4e192a79 (patch)
treecaa80d6d7d3292c57d9932168a19796738dd4e9d /disk-io.h
parentfa070f30711b3c06338fd314b2ba37f13c3ac13d (diff)
pretend page cache & commit code
Diffstat (limited to 'disk-io.h')
-rw-r--r--disk-io.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/disk-io.h b/disk-io.h
index 2729b757..b5dee2fa 100644
--- a/disk-io.h
+++ b/disk-io.h
@@ -1,5 +1,6 @@
#ifndef __DISKIO__
#define __DISKIO__
+#include "list.h"
struct tree_buffer {
u64 blocknr;
@@ -8,11 +9,16 @@ struct tree_buffer {
struct node node;
struct leaf leaf;
};
+ struct list_head dirty;
+ struct list_head cache;
};
struct tree_buffer *read_tree_block(struct ctree_root *root, u64 blocknr);
struct tree_buffer *find_tree_block(struct ctree_root *root, u64 blocknr);
int write_tree_block(struct ctree_root *root, struct tree_buffer *buf);
+int dirty_tree_block(struct ctree_root *root, struct tree_buffer *buf);
+int clean_tree_block(struct ctree_root *root, struct tree_buffer *buf);
+int commit_transaction(struct ctree_root *root);
struct ctree_root *open_ctree(char *filename, struct ctree_super_block *s);
int close_ctree(struct ctree_root *root);
void tree_block_release(struct ctree_root *root, struct tree_buffer *buf);