diff options
author | Jan Schmidt <list.btrfs@jan-o-sch.net> | 2012-05-29 11:06:54 -0400 |
---|---|---|
committer | Jan Schmidt <list.btrfs@jan-o-sch.net> | 2012-05-30 12:18:21 -0400 |
commit | 95a06077f7edbd00d32612562be4d857a5b7df54 (patch) | |
tree | 664ff2a92a2de3ba96be5a49ac36531d933ee5eb /fs/btrfs/delayed-ref.h | |
parent | 20b297d620cd1bb94127942bbb3702fb7b1030b2 (diff) |
Btrfs: use delayed ref sequence numbers for all fs-tree updates
The sequence number for delayed refs is needed to postpone certain delayed
refs for a very short period while walking backrefs. Before the tree
modification log, we thought we'd only have to hold back those references
that don't have a counter operation.
While now we've the tree mod log, we're rewinding fs tree blocks to a
defined consistent state. We cannot know in advance for which tree block
we'll be doing rewind operations later. Therefore, we must postpone all the
delayed refs for fs-tree blocks, even those having a counter operation.
Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Diffstat (limited to 'fs/btrfs/delayed-ref.h')
-rw-r--r-- | fs/btrfs/delayed-ref.h | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/fs/btrfs/delayed-ref.h b/fs/btrfs/delayed-ref.h index fd8244670212..413927fb9957 100644 --- a/fs/btrfs/delayed-ref.h +++ b/fs/btrfs/delayed-ref.h | |||
@@ -225,25 +225,6 @@ int btrfs_check_delayed_seq(struct btrfs_delayed_ref_root *delayed_refs, | |||
225 | u64 seq); | 225 | u64 seq); |
226 | 226 | ||
227 | /* | 227 | /* |
228 | * delayed refs with a ref_seq > 0 must be held back during backref walking. | ||
229 | * this only applies to items in one of the fs-trees. for_cow items never need | ||
230 | * to be held back, so they won't get a ref_seq number. | ||
231 | */ | ||
232 | static inline int need_ref_seq(int for_cow, u64 rootid) | ||
233 | { | ||
234 | if (for_cow) | ||
235 | return 0; | ||
236 | |||
237 | if (rootid == BTRFS_FS_TREE_OBJECTID) | ||
238 | return 1; | ||
239 | |||
240 | if ((s64)rootid >= (s64)BTRFS_FIRST_FREE_OBJECTID) | ||
241 | return 1; | ||
242 | |||
243 | return 0; | ||
244 | } | ||
245 | |||
246 | /* | ||
247 | * a node might live in a head or a regular ref, this lets you | 228 | * a node might live in a head or a regular ref, this lets you |
248 | * test for the proper type to use. | 229 | * test for the proper type to use. |
249 | */ | 230 | */ |