summaryrefslogtreecommitdiff
path: root/fs/bcachefs/buckets.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-12-30 14:37:25 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:36 -0400
commite3e464ac6d09269b19cea3dc32b626db44d0e6ba (patch)
tree7aafd377933161ed88573a5e3dab7ee3d8e0e06a /fs/bcachefs/buckets.h
parent57b0b3db475de6b724e4db3b827c00484cdde642 (diff)
bcachefs: Move extent overwrite handling out of core btree code
Ever since the btree code was first written, handling of overwriting existing extents - including partially overwriting and splittin existing extents - was handled as part of the core btree insert path. The modern transaction and iterator infrastructure didn't exist then, so that was the only way for it to be done. This patch moves that outside of the core btree code to a pass that runs at transaction commit time. This is a significant simplification to the btree code and overall reduction in code size, but more importantly it gets us much closer to the core btree code being completely independent of extents and is important prep work for snapshots. This introduces a new feature bit; the old and new extent update models are incompatible when the filesystem needs journal replay. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/buckets.h')
-rw-r--r--fs/bcachefs/buckets.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/buckets.h b/fs/bcachefs/buckets.h
index 4c84787575f5..29ebc07a2497 100644
--- a/fs/bcachefs/buckets.h
+++ b/fs/bcachefs/buckets.h
@@ -268,7 +268,7 @@ int bch2_fs_usage_apply(struct bch_fs *, struct bch_fs_usage_online *,
int bch2_mark_overwrite(struct btree_trans *, struct btree_iter *,
struct bkey_s_c, struct bkey_i *,
- struct bch_fs_usage *, unsigned);
+ struct bch_fs_usage *, unsigned, bool);
int bch2_mark_update(struct btree_trans *, struct btree_iter *,
struct bkey_i *, struct bch_fs_usage *, unsigned);