diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-04-29 05:52:19 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:09:06 +0200 |
commit | 5db95e50e11bdd0a191a22fdbc1e68ec900aff89 (patch) | |
tree | 99e22b3d5ec168ab654cb7d4985b67aab19e7456 /fs/bcachefs/bkey_methods.h | |
parent | bcachefs: Refactor extent_handle_overwrites() (diff) | |
download | linux-5db95e50e11bdd0a191a22fdbc1e68ec900aff89.tar.xz linux-5db95e50e11bdd0a191a22fdbc1e68ec900aff89.zip |
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>
Diffstat (limited to 'fs/bcachefs/bkey_methods.h')
-rw-r--r-- | fs/bcachefs/bkey_methods.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/bcachefs/bkey_methods.h b/fs/bcachefs/bkey_methods.h index 3012035db1a3..4e316c2f6954 100644 --- a/fs/bcachefs/bkey_methods.h +++ b/fs/bcachefs/bkey_methods.h @@ -51,10 +51,7 @@ static inline bool bch2_bkey_maybe_mergable(const struct bkey *l, const struct b { return l->type == r->type && !bversion_cmp(l->version, r->version) && - !bpos_cmp(l->p, bkey_start_pos(r)) && - (u64) l->size + r->size <= KEY_SIZE_MAX && - bch2_bkey_ops[l->type].key_merge && - !bch2_key_merging_disabled; + !bpos_cmp(l->p, bkey_start_pos(r)); } bool bch2_bkey_merge(struct bch_fs *, struct bkey_s, struct bkey_s_c); |