diff options
author | Nikolay Borisov <nborisov@suse.com> | 2021-10-12 10:21:35 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-10-26 19:08:06 +0200 |
commit | f42c5da6c12e990d8ec415199600b4d593c63bf5 (patch) | |
tree | 623c803bfb83b0fb977ab6d218393cb83e052926 /fs/btrfs/delayed-ref.h | |
parent | btrfs: rely on owning_root field in btrfs_add_delayed_tree_ref to detect CHUN... (diff) | |
download | linux-f42c5da6c12e990d8ec415199600b4d593c63bf5.tar.xz linux-f42c5da6c12e990d8ec415199600b4d593c63bf5.zip |
btrfs: add additional parameters to btrfs_init_tree_ref/btrfs_init_data_ref
In order to make 'real_root' used only in ref-verify it's required to
have the necessary context to perform the same checks that this member
is used for. So add 'mod_root' which will contain the root on behalf of
which a delayed ref was created and a 'skip_group' parameter which
will contain callsite-specific override of skip_qgroup.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/delayed-ref.h')
-rw-r--r-- | fs/btrfs/delayed-ref.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/btrfs/delayed-ref.h b/fs/btrfs/delayed-ref.h index 8826f3e2b809..8ab79def8e98 100644 --- a/fs/btrfs/delayed-ref.h +++ b/fs/btrfs/delayed-ref.h @@ -271,7 +271,7 @@ static inline void btrfs_init_generic_ref(struct btrfs_ref *generic_ref, } static inline void btrfs_init_tree_ref(struct btrfs_ref *generic_ref, - int level, u64 root) + int level, u64 root, u64 mod_root, bool skip_qgroup) { /* If @real_root not set, use @root as fallback */ if (!generic_ref->real_root) @@ -282,7 +282,8 @@ static inline void btrfs_init_tree_ref(struct btrfs_ref *generic_ref, } static inline void btrfs_init_data_ref(struct btrfs_ref *generic_ref, - u64 ref_root, u64 ino, u64 offset) + u64 ref_root, u64 ino, u64 offset, u64 mod_root, + bool skip_qgroup) { /* If @real_root not set, use @root as fallback */ if (!generic_ref->real_root) |