summaryrefslogtreecommitdiff
path: root/fs/bcachefs/data_update.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-10-09 03:32:17 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:42 -0400
commit1be887979bc12a6c88b33b0d53dfdc369bfa9d49 (patch)
tree204a1391ae5ad3342f8026a69da401134261c88f /fs/bcachefs/data_update.h
parent160dff6dad43d9428b1250f927721a9a8756cfd9 (diff)
bcachefs: Handle dropping pointers in data_update path
Cached pointers are generally dropped, not moved: this led to an assertion firing in the data update path when there were no new replicas being written. This path adds a data_options field for pointers to be dropped, and tweaks move_extent() to check if we're only dropping pointers, not writing new ones, before kicking off a data update operation. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/data_update.h')
-rw-r--r--fs/bcachefs/data_update.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/data_update.h b/fs/bcachefs/data_update.h
index ee38bd655af1..5d8690795959 100644
--- a/fs/bcachefs/data_update.h
+++ b/fs/bcachefs/data_update.h
@@ -10,6 +10,7 @@ struct moving_context;
struct data_update_opts {
unsigned rewrite_ptrs;
+ unsigned kill_ptrs;
u16 target;
u8 extra_replicas;
unsigned btree_insert_flags;
@@ -35,5 +36,6 @@ int bch2_data_update_init(struct bch_fs *, struct data_update *,
struct write_point_specifier,
struct bch_io_opts, struct data_update_opts,
enum btree_id, struct bkey_s_c);
+void bch2_data_update_opts_normalize(struct bkey_s_c, struct data_update_opts *);
#endif /* _BCACHEFS_DATA_UPDATE_H */