diff options
author | Qu Wenruo <wqu@suse.com> | 2020-03-26 14:11:09 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-05-25 11:25:19 +0200 |
commit | e9a28dc52af31d8af1883afe08e724a303b3c4eb (patch) | |
tree | 0967cfb74a693d6805ee3db2552bc329dd37732a /fs/btrfs/backref.h | |
parent | 7053544146ac7eb71de6cee1ffda678714f905d8 (diff) | |
download | linux-e9a28dc52af31d8af1883afe08e724a303b3c4eb.tar.gz linux-e9a28dc52af31d8af1883afe08e724a303b3c4eb.tar.bz2 linux-e9a28dc52af31d8af1883afe08e724a303b3c4eb.zip |
btrfs: rename tree_entry to rb_simple_node and export it
Structure tree_entry provides a very simple rb_tree which only uses
bytenr as search index.
That tree_entry is used in 3 structures: backref_node, mapping_node and
tree_block.
Since we're going to make backref_node independnt from relocation, it's
a good time to extract the tree_entry into rb_simple_node, and export it
into misc.h.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/backref.h')
-rw-r--r-- | fs/btrfs/backref.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/btrfs/backref.h b/fs/btrfs/backref.h index 55f1f56b378e..0d3fb76364c6 100644 --- a/fs/btrfs/backref.h +++ b/fs/btrfs/backref.h @@ -161,8 +161,10 @@ static inline void btrfs_backref_iter_release(struct btrfs_backref_iter *iter) * Represent a tree block in the backref cache */ struct btrfs_backref_node { - struct rb_node rb_node; - u64 bytenr; + struct { + struct rb_node rb_node; + u64 bytenr; + }; /* Use rb_simple_node for search/insert */ u64 new_bytenr; /* Objectid of tree block owner, can be not uptodate */ |