diff options
Diffstat (limited to 'fs/btrfs/ordered-data.h')
-rw-r--r-- | fs/btrfs/ordered-data.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/fs/btrfs/ordered-data.h b/fs/btrfs/ordered-data.h index f29d4bf5fbe7..8eadfe406cdd 100644 --- a/fs/btrfs/ordered-data.h +++ b/fs/btrfs/ordered-data.h | |||
@@ -79,6 +79,8 @@ struct btrfs_ordered_sum { | |||
79 | #define BTRFS_ORDERED_UPDATED_ISIZE 7 /* indicates whether this ordered extent | 79 | #define BTRFS_ORDERED_UPDATED_ISIZE 7 /* indicates whether this ordered extent |
80 | * has done its due diligence in updating | 80 | * has done its due diligence in updating |
81 | * the isize. */ | 81 | * the isize. */ |
82 | #define BTRFS_ORDERED_LOGGED_CSUM 8 /* We've logged the csums on this ordered | ||
83 | ordered extent */ | ||
82 | 84 | ||
83 | struct btrfs_ordered_extent { | 85 | struct btrfs_ordered_extent { |
84 | /* logical offset in the file */ | 86 | /* logical offset in the file */ |
@@ -96,6 +98,9 @@ struct btrfs_ordered_extent { | |||
96 | /* number of bytes that still need writing */ | 98 | /* number of bytes that still need writing */ |
97 | u64 bytes_left; | 99 | u64 bytes_left; |
98 | 100 | ||
101 | /* number of bytes that still need csumming */ | ||
102 | u64 csum_bytes_left; | ||
103 | |||
99 | /* | 104 | /* |
100 | * the end of the ordered extent which is behind it but | 105 | * the end of the ordered extent which is behind it but |
101 | * didn't update disk_i_size. Please see the comment of | 106 | * didn't update disk_i_size. Please see the comment of |
@@ -118,6 +123,9 @@ struct btrfs_ordered_extent { | |||
118 | /* list of checksums for insertion when the extent io is done */ | 123 | /* list of checksums for insertion when the extent io is done */ |
119 | struct list_head list; | 124 | struct list_head list; |
120 | 125 | ||
126 | /* If we need to wait on this to be done */ | ||
127 | struct list_head log_list; | ||
128 | |||
121 | /* used to wait for the BTRFS_ORDERED_COMPLETE bit */ | 129 | /* used to wait for the BTRFS_ORDERED_COMPLETE bit */ |
122 | wait_queue_head_t wait; | 130 | wait_queue_head_t wait; |
123 | 131 | ||
@@ -189,11 +197,15 @@ struct btrfs_ordered_extent *btrfs_lookup_ordered_range(struct inode *inode, | |||
189 | int btrfs_ordered_update_i_size(struct inode *inode, u64 offset, | 197 | int btrfs_ordered_update_i_size(struct inode *inode, u64 offset, |
190 | struct btrfs_ordered_extent *ordered); | 198 | struct btrfs_ordered_extent *ordered); |
191 | int btrfs_find_ordered_sum(struct inode *inode, u64 offset, u64 disk_bytenr, u32 *sum); | 199 | int btrfs_find_ordered_sum(struct inode *inode, u64 offset, u64 disk_bytenr, u32 *sum); |
192 | int btrfs_run_ordered_operations(struct btrfs_root *root, int wait); | 200 | int btrfs_run_ordered_operations(struct btrfs_trans_handle *trans, |
201 | struct btrfs_root *root, int wait); | ||
193 | void btrfs_add_ordered_operation(struct btrfs_trans_handle *trans, | 202 | void btrfs_add_ordered_operation(struct btrfs_trans_handle *trans, |
194 | struct btrfs_root *root, | 203 | struct btrfs_root *root, |
195 | struct inode *inode); | 204 | struct inode *inode); |
196 | void btrfs_wait_ordered_extents(struct btrfs_root *root, int delay_iput); | 205 | void btrfs_wait_ordered_extents(struct btrfs_root *root, int delay_iput); |
206 | void btrfs_get_logged_extents(struct btrfs_root *log, struct inode *inode); | ||
207 | void btrfs_wait_logged_extents(struct btrfs_root *log, u64 transid); | ||
208 | void btrfs_free_logged_extents(struct btrfs_root *log, u64 transid); | ||
197 | int __init ordered_data_init(void); | 209 | int __init ordered_data_init(void); |
198 | void ordered_data_exit(void); | 210 | void ordered_data_exit(void); |
199 | #endif | 211 | #endif |