diff options
author | J. Bruce Fields <bfields@citi.umich.edu> | 2009-10-27 18:45:17 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-10-27 18:45:17 -0400 |
commit | e343eb0d60f74547e0aeb5bd151105c2e6cfe588 (patch) | |
tree | 92586df0daf3298262a957640e5c86679c963f41 /fs/btrfs/extent_io.h | |
parent | ddc04fd4d5163aee9ebdb38a56c365b602e2b7b7 (diff) | |
parent | 012abeea669ea49636cf952d13298bb68654146a (diff) |
Merge commit 'v2.6.32-rc5' into for-2.6.33
Diffstat (limited to 'fs/btrfs/extent_io.h')
-rw-r--r-- | fs/btrfs/extent_io.h | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index 14ed16fd862d..36de250a7b2b 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #define EXTENT_BUFFER_FILLED (1 << 8) | 15 | #define EXTENT_BUFFER_FILLED (1 << 8) |
16 | #define EXTENT_BOUNDARY (1 << 9) | 16 | #define EXTENT_BOUNDARY (1 << 9) |
17 | #define EXTENT_NODATASUM (1 << 10) | 17 | #define EXTENT_NODATASUM (1 << 10) |
18 | #define EXTENT_DO_ACCOUNTING (1 << 11) | ||
18 | #define EXTENT_IOBITS (EXTENT_LOCKED | EXTENT_WRITEBACK) | 19 | #define EXTENT_IOBITS (EXTENT_LOCKED | EXTENT_WRITEBACK) |
19 | 20 | ||
20 | /* flags for bio submission */ | 21 | /* flags for bio submission */ |
@@ -25,6 +26,16 @@ | |||
25 | #define EXTENT_BUFFER_BLOCKING 1 | 26 | #define EXTENT_BUFFER_BLOCKING 1 |
26 | #define EXTENT_BUFFER_DIRTY 2 | 27 | #define EXTENT_BUFFER_DIRTY 2 |
27 | 28 | ||
29 | /* these are flags for extent_clear_unlock_delalloc */ | ||
30 | #define EXTENT_CLEAR_UNLOCK_PAGE 0x1 | ||
31 | #define EXTENT_CLEAR_UNLOCK 0x2 | ||
32 | #define EXTENT_CLEAR_DELALLOC 0x4 | ||
33 | #define EXTENT_CLEAR_DIRTY 0x8 | ||
34 | #define EXTENT_SET_WRITEBACK 0x10 | ||
35 | #define EXTENT_END_WRITEBACK 0x20 | ||
36 | #define EXTENT_SET_PRIVATE2 0x40 | ||
37 | #define EXTENT_CLEAR_ACCOUNTING 0x80 | ||
38 | |||
28 | /* | 39 | /* |
29 | * page->private values. Every page that is controlled by the extent | 40 | * page->private values. Every page that is controlled by the extent |
30 | * map has page->private set to one. | 41 | * map has page->private set to one. |
@@ -60,8 +71,13 @@ struct extent_io_ops { | |||
60 | struct extent_state *state, int uptodate); | 71 | struct extent_state *state, int uptodate); |
61 | int (*set_bit_hook)(struct inode *inode, u64 start, u64 end, | 72 | int (*set_bit_hook)(struct inode *inode, u64 start, u64 end, |
62 | unsigned long old, unsigned long bits); | 73 | unsigned long old, unsigned long bits); |
63 | int (*clear_bit_hook)(struct inode *inode, u64 start, u64 end, | 74 | int (*clear_bit_hook)(struct inode *inode, struct extent_state *state, |
64 | unsigned long old, unsigned long bits); | 75 | unsigned long bits); |
76 | int (*merge_extent_hook)(struct inode *inode, | ||
77 | struct extent_state *new, | ||
78 | struct extent_state *other); | ||
79 | int (*split_extent_hook)(struct inode *inode, | ||
80 | struct extent_state *orig, u64 split); | ||
65 | int (*write_cache_pages_lock_hook)(struct page *page); | 81 | int (*write_cache_pages_lock_hook)(struct page *page); |
66 | }; | 82 | }; |
67 | 83 | ||
@@ -79,10 +95,14 @@ struct extent_state { | |||
79 | u64 start; | 95 | u64 start; |
80 | u64 end; /* inclusive */ | 96 | u64 end; /* inclusive */ |
81 | struct rb_node rb_node; | 97 | struct rb_node rb_node; |
98 | |||
99 | /* ADD NEW ELEMENTS AFTER THIS */ | ||
82 | struct extent_io_tree *tree; | 100 | struct extent_io_tree *tree; |
83 | wait_queue_head_t wq; | 101 | wait_queue_head_t wq; |
84 | atomic_t refs; | 102 | atomic_t refs; |
85 | unsigned long state; | 103 | unsigned long state; |
104 | u64 split_start; | ||
105 | u64 split_end; | ||
86 | 106 | ||
87 | /* for use by the FS */ | 107 | /* for use by the FS */ |
88 | u64 private; | 108 | u64 private; |
@@ -279,10 +299,5 @@ int extent_range_uptodate(struct extent_io_tree *tree, | |||
279 | int extent_clear_unlock_delalloc(struct inode *inode, | 299 | int extent_clear_unlock_delalloc(struct inode *inode, |
280 | struct extent_io_tree *tree, | 300 | struct extent_io_tree *tree, |
281 | u64 start, u64 end, struct page *locked_page, | 301 | u64 start, u64 end, struct page *locked_page, |
282 | int unlock_page, | 302 | unsigned long op); |
283 | int clear_unlock, | ||
284 | int clear_delalloc, int clear_dirty, | ||
285 | int set_writeback, | ||
286 | int end_writeback, | ||
287 | int set_private2); | ||
288 | #endif | 303 | #endif |