diff options
Diffstat (limited to 'fs/btrfs/delayed-ref.h')
-rw-r--r-- | fs/btrfs/delayed-ref.h | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/fs/btrfs/delayed-ref.h b/fs/btrfs/delayed-ref.h index 4ba9b93022ff..a764e2340d48 100644 --- a/fs/btrfs/delayed-ref.h +++ b/fs/btrfs/delayed-ref.h | |||
@@ -52,6 +52,7 @@ struct btrfs_delayed_ref_node { | |||
52 | 52 | ||
53 | unsigned int action:8; | 53 | unsigned int action:8; |
54 | unsigned int type:8; | 54 | unsigned int type:8; |
55 | unsigned int no_quota:1; | ||
55 | /* is this node still in the rbtree? */ | 56 | /* is this node still in the rbtree? */ |
56 | unsigned int is_head:1; | 57 | unsigned int is_head:1; |
57 | unsigned int in_tree:1; | 58 | unsigned int in_tree:1; |
@@ -196,14 +197,14 @@ int btrfs_add_delayed_tree_ref(struct btrfs_fs_info *fs_info, | |||
196 | u64 bytenr, u64 num_bytes, u64 parent, | 197 | u64 bytenr, u64 num_bytes, u64 parent, |
197 | u64 ref_root, int level, int action, | 198 | u64 ref_root, int level, int action, |
198 | struct btrfs_delayed_extent_op *extent_op, | 199 | struct btrfs_delayed_extent_op *extent_op, |
199 | int for_cow); | 200 | int no_quota); |
200 | int btrfs_add_delayed_data_ref(struct btrfs_fs_info *fs_info, | 201 | int btrfs_add_delayed_data_ref(struct btrfs_fs_info *fs_info, |
201 | struct btrfs_trans_handle *trans, | 202 | struct btrfs_trans_handle *trans, |
202 | u64 bytenr, u64 num_bytes, | 203 | u64 bytenr, u64 num_bytes, |
203 | u64 parent, u64 ref_root, | 204 | u64 parent, u64 ref_root, |
204 | u64 owner, u64 offset, int action, | 205 | u64 owner, u64 offset, int action, |
205 | struct btrfs_delayed_extent_op *extent_op, | 206 | struct btrfs_delayed_extent_op *extent_op, |
206 | int for_cow); | 207 | int no_quota); |
207 | int btrfs_add_delayed_extent_op(struct btrfs_fs_info *fs_info, | 208 | int btrfs_add_delayed_extent_op(struct btrfs_fs_info *fs_info, |
208 | struct btrfs_trans_handle *trans, | 209 | struct btrfs_trans_handle *trans, |
209 | u64 bytenr, u64 num_bytes, | 210 | u64 bytenr, u64 num_bytes, |
@@ -231,25 +232,6 @@ int btrfs_check_delayed_seq(struct btrfs_fs_info *fs_info, | |||
231 | u64 seq); | 232 | u64 seq); |
232 | 233 | ||
233 | /* | 234 | /* |
234 | * delayed refs with a ref_seq > 0 must be held back during backref walking. | ||
235 | * this only applies to items in one of the fs-trees. for_cow items never need | ||
236 | * to be held back, so they won't get a ref_seq number. | ||
237 | */ | ||
238 | static inline int need_ref_seq(int for_cow, u64 rootid) | ||
239 | { | ||
240 | if (for_cow) | ||
241 | return 0; | ||
242 | |||
243 | if (rootid == BTRFS_FS_TREE_OBJECTID) | ||
244 | return 1; | ||
245 | |||
246 | if ((s64)rootid >= (s64)BTRFS_FIRST_FREE_OBJECTID) | ||
247 | return 1; | ||
248 | |||
249 | return 0; | ||
250 | } | ||
251 | |||
252 | /* | ||
253 | * a node might live in a head or a regular ref, this lets you | 235 | * a node might live in a head or a regular ref, this lets you |
254 | * test for the proper type to use. | 236 | * test for the proper type to use. |
255 | */ | 237 | */ |