]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/btrfs/extent_io.h
Btrfs: proper -ENOSPC handling
[net-next-2.6.git] / fs / btrfs / extent_io.h
index 14ed16fd862df22a93b7286c4c4811a8c12fa6ba..4794ec891fed31a3998098cb1999818627aacb12 100644 (file)
@@ -60,8 +60,13 @@ struct extent_io_ops {
                                      struct extent_state *state, int uptodate);
        int (*set_bit_hook)(struct inode *inode, u64 start, u64 end,
                            unsigned long old, unsigned long bits);
-       int (*clear_bit_hook)(struct inode *inode, u64 start, u64 end,
-                           unsigned long old, unsigned long bits);
+       int (*clear_bit_hook)(struct inode *inode, struct extent_state *state,
+                             unsigned long bits);
+       int (*merge_extent_hook)(struct inode *inode,
+                                struct extent_state *new,
+                                struct extent_state *other);
+       int (*split_extent_hook)(struct inode *inode,
+                                struct extent_state *orig, u64 split);
        int (*write_cache_pages_lock_hook)(struct page *page);
 };
 
@@ -79,10 +84,14 @@ struct extent_state {
        u64 start;
        u64 end; /* inclusive */
        struct rb_node rb_node;
+
+       /* ADD NEW ELEMENTS AFTER THIS */
        struct extent_io_tree *tree;
        wait_queue_head_t wq;
        atomic_t refs;
        unsigned long state;
+       u64 split_start;
+       u64 split_end;
 
        /* for use by the FS */
        u64 private;