diff options
Diffstat (limited to 'fs/btrfs/extent_io.h')
-rw-r--r-- | fs/btrfs/extent_io.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index c5b483a7913..1f9df88afbf 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h | |||
@@ -22,6 +22,10 @@ | |||
22 | /* flags for bio submission */ | 22 | /* flags for bio submission */ |
23 | #define EXTENT_BIO_COMPRESSED 1 | 23 | #define EXTENT_BIO_COMPRESSED 1 |
24 | 24 | ||
25 | /* these are bit numbers for test/set bit */ | ||
26 | #define EXTENT_BUFFER_UPTODATE 0 | ||
27 | #define EXTENT_BUFFER_BLOCKING 1 | ||
28 | |||
25 | /* | 29 | /* |
26 | * page->private values. Every page that is controlled by the extent | 30 | * page->private values. Every page that is controlled by the extent |
27 | * map has page->private set to one. | 31 | * map has page->private set to one. |
@@ -95,11 +99,19 @@ struct extent_buffer { | |||
95 | unsigned long map_start; | 99 | unsigned long map_start; |
96 | unsigned long map_len; | 100 | unsigned long map_len; |
97 | struct page *first_page; | 101 | struct page *first_page; |
102 | unsigned long bflags; | ||
98 | atomic_t refs; | 103 | atomic_t refs; |
99 | int flags; | ||
100 | struct list_head leak_list; | 104 | struct list_head leak_list; |
101 | struct rb_node rb_node; | 105 | struct rb_node rb_node; |
102 | struct mutex mutex; | 106 | |
107 | /* the spinlock is used to protect most operations */ | ||
108 | spinlock_t lock; | ||
109 | |||
110 | /* | ||
111 | * when we keep the lock held while blocking, waiters go onto | ||
112 | * the wq | ||
113 | */ | ||
114 | wait_queue_head_t lock_wq; | ||
103 | }; | 115 | }; |
104 | 116 | ||
105 | struct extent_map_tree; | 117 | struct extent_map_tree; |
@@ -193,6 +205,8 @@ int extent_commit_write(struct extent_io_tree *tree, | |||
193 | unsigned from, unsigned to); | 205 | unsigned from, unsigned to); |
194 | sector_t extent_bmap(struct address_space *mapping, sector_t iblock, | 206 | sector_t extent_bmap(struct address_space *mapping, sector_t iblock, |
195 | get_extent_t *get_extent); | 207 | get_extent_t *get_extent); |
208 | int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, | ||
209 | __u64 start, __u64 len, get_extent_t *get_extent); | ||
196 | int set_range_dirty(struct extent_io_tree *tree, u64 start, u64 end); | 210 | int set_range_dirty(struct extent_io_tree *tree, u64 start, u64 end); |
197 | int set_state_private(struct extent_io_tree *tree, u64 start, u64 private); | 211 | int set_state_private(struct extent_io_tree *tree, u64 start, u64 private); |
198 | int get_state_private(struct extent_io_tree *tree, u64 start, u64 *private); | 212 | int get_state_private(struct extent_io_tree *tree, u64 start, u64 *private); |