btrfs: introduce btrfs_is_data_reloc_root
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Wed, 8 Sep 2021 16:19:25 +0000 (01:19 +0900)
committerDavid Sterba <dsterba@suse.com>
Tue, 26 Oct 2021 17:08:01 +0000 (19:08 +0200)
commit37f00a6d2e9c97d6e7b5c3d47c49b714c3d0b99f
treeedac1c035442c95075e598b2efd14f66f858a12e
parent38d5e541dd29af347d14346b41b0bbb30976b566
btrfs: introduce btrfs_is_data_reloc_root

There are several places in our codebase where we check if a root is the
root of the data reloc tree and subsequent patches will introduce more.

Factor out the check into a small helper function instead of open coding
it multiple times.

Reviewed-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/inode.c
fs/btrfs/relocation.c