bcachefs: Re-implement extent merging in transaction commit path
authorKent Overstreet <kent.overstreet@gmail.com>
Thu, 29 Apr 2021 03:52:19 +0000 (23:52 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:06 +0000 (17:09 -0400)
commit5db95e50e11bdd0a191a22fdbc1e68ec900aff89
tree99e22b3d5ec168ab654cb7d4985b67aab19e7456
parent81d22e5d832452ee479c64d5678c7422bc1bef5b
bcachefs: Re-implement extent merging in transaction commit path

We haven't had extent merging in quite some time. It used to be done by
the btree code when sorting btree nodes, but that was eliminated as part
of the work to separate extent handling from core btree code.

This patch re-implements extent merging in the transaction commit path.
We don't currently have the ability to merge reflink pointers, we need
to do some work on the triggers code to be able to do that without
ending up with incorrect refcounts.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/bkey_methods.c
fs/bcachefs/bkey_methods.h
fs/bcachefs/btree_update_leaf.c