diff options
author | Qu Wenruo <wqu@suse.com> | 2019-04-04 02:45:33 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-04-29 13:02:49 -0400 |
commit | 8a5040f7d9fddc532bdec698fb0ff0bebe33d4ed (patch) | |
tree | 7511e725380aff9b3a3005d1924d56660ea78f0f /fs/btrfs/ref-verify.h | |
parent | 76675593b69f2fcd57e24d9dd2a9b278f0130d0b (diff) |
btrfs: ref-verify: Use btrfs_ref to refactor btrfs_ref_tree_mod()
It's a perfect match for btrfs_ref_tree_mod() to use btrfs_ref, as
btrfs_ref describes a metadata/data reference update comprehensively.
Now we have one less function use confusing owner/level trick.
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/ref-verify.h')
-rw-r--r-- | fs/btrfs/ref-verify.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/btrfs/ref-verify.h b/fs/btrfs/ref-verify.h index b7d2a4edfdb7..855de37719b5 100644 --- a/fs/btrfs/ref-verify.h +++ b/fs/btrfs/ref-verify.h | |||
@@ -9,9 +9,8 @@ | |||
9 | #ifdef CONFIG_BTRFS_FS_REF_VERIFY | 9 | #ifdef CONFIG_BTRFS_FS_REF_VERIFY |
10 | int btrfs_build_ref_tree(struct btrfs_fs_info *fs_info); | 10 | int btrfs_build_ref_tree(struct btrfs_fs_info *fs_info); |
11 | void btrfs_free_ref_cache(struct btrfs_fs_info *fs_info); | 11 | void btrfs_free_ref_cache(struct btrfs_fs_info *fs_info); |
12 | int btrfs_ref_tree_mod(struct btrfs_root *root, u64 bytenr, u64 num_bytes, | 12 | int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info, |
13 | u64 parent, u64 ref_root, u64 owner, u64 offset, | 13 | struct btrfs_ref *generic_ref); |
14 | int action); | ||
15 | void btrfs_free_ref_tree_range(struct btrfs_fs_info *fs_info, u64 start, | 14 | void btrfs_free_ref_tree_range(struct btrfs_fs_info *fs_info, u64 start, |
16 | u64 len); | 15 | u64 len); |
17 | 16 | ||
@@ -30,9 +29,8 @@ static inline void btrfs_free_ref_cache(struct btrfs_fs_info *fs_info) | |||
30 | { | 29 | { |
31 | } | 30 | } |
32 | 31 | ||
33 | static inline int btrfs_ref_tree_mod(struct btrfs_root *root, u64 bytenr, | 32 | static inline int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info, |
34 | u64 num_bytes, u64 parent, u64 ref_root, | 33 | struct btrfs_ref *generic_ref) |
35 | u64 owner, u64 offset, int action) | ||
36 | { | 34 | { |
37 | return 0; | 35 | return 0; |
38 | } | 36 | } |