diff options
author | Jan Schmidt <list.btrfs@jan-o-sch.net> | 2012-05-29 17:06:54 +0200 |
---|---|---|
committer | Jan Schmidt <list.btrfs@jan-o-sch.net> | 2012-05-30 18:18:21 +0200 |
commit | 95a06077f7edbd00d32612562be4d857a5b7df54 (patch) | |
tree | 664ff2a92a2de3ba96be5a49ac36531d933ee5eb /fs/btrfs/ctree.h | |
parent | 20b297d620cd1bb94127942bbb3702fb7b1030b2 (diff) | |
download | linux-3.10-95a06077f7edbd00d32612562be4d857a5b7df54.tar.gz linux-3.10-95a06077f7edbd00d32612562be4d857a5b7df54.tar.bz2 linux-3.10-95a06077f7edbd00d32612562be4d857a5b7df54.zip |
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/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 6ba21b12cec..f5f11a6c5e9 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -3121,4 +3121,11 @@ void btrfs_get_tree_mod_seq(struct btrfs_fs_info *fs_info, void btrfs_put_tree_mod_seq(struct btrfs_fs_info *fs_info, struct seq_list *elem); +static inline int is_fstree(u64 rootid) +{ + if (rootid == BTRFS_FS_TREE_OBJECTID || + (s64)rootid >= (s64)BTRFS_FIRST_FREE_OBJECTID) + return 1; + return 0; +} #endif |