diff options
Diffstat (limited to 'fs/btrfs/extent_map.h')
-rw-r--r-- | fs/btrfs/extent_map.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/btrfs/extent_map.h b/fs/btrfs/extent_map.h index 1195f09761fe..679225555f7b 100644 --- a/fs/btrfs/extent_map.h +++ b/fs/btrfs/extent_map.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #define EXTENT_FLAG_COMPRESSED 1 | 13 | #define EXTENT_FLAG_COMPRESSED 1 |
14 | #define EXTENT_FLAG_VACANCY 2 /* no file extent item found */ | 14 | #define EXTENT_FLAG_VACANCY 2 /* no file extent item found */ |
15 | #define EXTENT_FLAG_PREALLOC 3 /* pre-allocated extent */ | 15 | #define EXTENT_FLAG_PREALLOC 3 /* pre-allocated extent */ |
16 | #define EXTENT_FLAG_LOGGING 4 /* Logging this extent */ | ||
16 | 17 | ||
17 | struct extent_map { | 18 | struct extent_map { |
18 | struct rb_node rb_node; | 19 | struct rb_node rb_node; |
@@ -20,18 +21,23 @@ struct extent_map { | |||
20 | /* all of these are in bytes */ | 21 | /* all of these are in bytes */ |
21 | u64 start; | 22 | u64 start; |
22 | u64 len; | 23 | u64 len; |
24 | u64 mod_start; | ||
25 | u64 mod_len; | ||
23 | u64 orig_start; | 26 | u64 orig_start; |
24 | u64 block_start; | 27 | u64 block_start; |
25 | u64 block_len; | 28 | u64 block_len; |
29 | u64 generation; | ||
26 | unsigned long flags; | 30 | unsigned long flags; |
27 | struct block_device *bdev; | 31 | struct block_device *bdev; |
28 | atomic_t refs; | 32 | atomic_t refs; |
29 | unsigned int in_tree; | 33 | unsigned int in_tree; |
30 | unsigned int compress_type; | 34 | unsigned int compress_type; |
35 | struct list_head list; | ||
31 | }; | 36 | }; |
32 | 37 | ||
33 | struct extent_map_tree { | 38 | struct extent_map_tree { |
34 | struct rb_root map; | 39 | struct rb_root map; |
40 | struct list_head modified_extents; | ||
35 | rwlock_t lock; | 41 | rwlock_t lock; |
36 | }; | 42 | }; |
37 | 43 | ||
@@ -60,7 +66,7 @@ struct extent_map *alloc_extent_map(void); | |||
60 | void free_extent_map(struct extent_map *em); | 66 | void free_extent_map(struct extent_map *em); |
61 | int __init extent_map_init(void); | 67 | int __init extent_map_init(void); |
62 | void extent_map_exit(void); | 68 | void extent_map_exit(void); |
63 | int unpin_extent_cache(struct extent_map_tree *tree, u64 start, u64 len); | 69 | int unpin_extent_cache(struct extent_map_tree *tree, u64 start, u64 len, u64 gen); |
64 | struct extent_map *search_extent_mapping(struct extent_map_tree *tree, | 70 | struct extent_map *search_extent_mapping(struct extent_map_tree *tree, |
65 | u64 start, u64 len); | 71 | u64 start, u64 len); |
66 | #endif | 72 | #endif |