btrfs: backref, only search backref entries from leaves of the same root
authorethanwu <ethanwu@synology.com>
Fri, 7 Feb 2020 09:38:17 +0000 (17:38 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2020 16:01:40 +0000 (17:01 +0100)
commitcfc0eed0ec89db7c4a8d461174cabfaa4a0912c7
tree5f0b20b8464113a5508a6f35baa2e5503a4cf5b2
parented58f2e66e849c34826083e5a6c1b506ee8a4d8e
btrfs: backref, only search backref entries from leaves of the same root

We could have some nodes/leaves in subvolume whose owner are not the
that subvolume. In this way, when we resolve normal backrefs of that
subvolume, we should avoid collecting those references from these blocks.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: ethanwu <ethanwu@synology.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/backref.c