]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: don't build backref tree for COW-only blocks
authorJosef Bacik <josef@toxicpanda.com>
Thu, 3 Oct 2024 15:43:08 +0000 (11:43 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 13 Jan 2025 13:53:15 +0000 (14:53 +0100)
commit46bb6765d31138abe436b37a4f271895f7751bf2
treeff2d3f23b960114f431b3fb917b38d62cf4580c2
parent0097422c0dfe0a943cf879777cabf299bb6258f7
btrfs: don't build backref tree for COW-only blocks

We already determine the owner for any blocks we find when we're
relocating, and for COW-only blocks (and the data reloc tree) we COW
down to the block and call it good enough.  However we still build a
whole backref tree for them, even though we're not going to use it, and
then just don't put these blocks in the cache.

Rework the code to check if the block belongs to a COW-only root or the
data reloc root, and then just cow down to the block, skipping the
backref cache generation.

Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/relocation.c