summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_map.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-08-30 08:50:51 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-08-30 08:50:51 -0400
commit07157aacb1ecd394a5494910b5f80d7e7d407d37 (patch)
treedc27c45e8b24167b13d89b0e7c3c3a94b293ce29 /fs/btrfs/extent_map.h
parent95e0528919cb0c7635b37496e0ad1c41e4c0dd7c (diff)
downloadlinux-07157aacb1ecd394a5494910b5f80d7e7d407d37.tar.gz
linux-07157aacb1ecd394a5494910b5f80d7e7d407d37.tar.bz2
linux-07157aacb1ecd394a5494910b5f80d7e7d407d37.zip
Btrfs: Add file data csums back in via hooks in the extent map code
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent_map.h')
-rw-r--r--fs/btrfs/extent_map.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/fs/btrfs/extent_map.h b/fs/btrfs/extent_map.h
index e91a2e9619ee..0eae6c420acb 100644
--- a/fs/btrfs/extent_map.h
+++ b/fs/btrfs/extent_map.h
@@ -6,12 +6,19 @@
#define EXTENT_MAP_INLINE (u64)-2
#define EXTENT_MAP_DELALLOC (u64)-1
+struct extent_map_ops {
+ int (*fill_delalloc)(struct inode *inode, u64 start, u64 end);
+ int (*writepage_io_hook)(struct page *page, u64 start, u64 end);
+ int (*readpage_io_hook)(struct page *page, u64 start, u64 end);
+ int (*readpage_end_io_hook)(struct page *page, u64 start, u64 end);
+};
+
struct extent_map_tree {
struct rb_root map;
struct rb_root state;
struct address_space *mapping;
rwlock_t lock;
- int (*fill_delalloc)(struct inode *inode, u64 start, u64 end);
+ struct extent_map_ops *ops;
};
/* note, this must start with the same fields as fs/extent_map.c:tree_entry */
@@ -36,6 +43,10 @@ struct extent_state {
wait_queue_head_t wq;
atomic_t refs;
unsigned long state;
+
+ /* for use by the FS */
+ u64 private;
+
struct list_head list;
};
@@ -89,4 +100,6 @@ int extent_commit_write(struct extent_map_tree *tree,
struct inode *inode, struct page *page,
unsigned from, unsigned to);
int set_range_dirty(struct extent_map_tree *tree, u64 start, u64 end);
+int set_state_private(struct extent_map_tree *tree, u64 start, u64 private);
+int get_state_private(struct extent_map_tree *tree, u64 start, u64 *private);
#endif