diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-03-13 08:26:52 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:28 +0300 |
commit | 880e2275f9f1461c87cd113a8da291861cc01400 (patch) | |
tree | 8e8962da1c1e71c93758ce2b4a8374dbfc9f1bfa /fs/bcachefs/reflink.h | |
parent | d13f9ee61dac0b5d663844c5778309ec8af1561f (diff) | |
download | linux-880e2275f9f1461c87cd113a8da291861cc01400.tar.xz |
bcachefs: Move trigger fns to bkey_ops
This replaces the switch statements in bch2_mark_key(),
bch2_trans_mark_key() with new bkey methods - prep work for the next
patch, which fixes BTREE_TRIGGER_WANTS_OLD_AND_NEW.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/reflink.h')
-rw-r--r-- | fs/bcachefs/reflink.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/bcachefs/reflink.h b/fs/bcachefs/reflink.h index 3745873fd88d..4da4330014a8 100644 --- a/fs/bcachefs/reflink.h +++ b/fs/bcachefs/reflink.h @@ -10,7 +10,9 @@ bool bch2_reflink_p_merge(struct bch_fs *, struct bkey_s, struct bkey_s_c); #define bch2_bkey_ops_reflink_p (struct bkey_ops) { \ .key_invalid = bch2_reflink_p_invalid, \ .val_to_text = bch2_reflink_p_to_text, \ - .key_merge = bch2_reflink_p_merge, \ + .key_merge = bch2_reflink_p_merge, \ + .trans_trigger = bch2_trans_mark_reflink_p, \ + .atomic_trigger = bch2_mark_reflink_p, \ } const char *bch2_reflink_v_invalid(const struct bch_fs *, struct bkey_s_c); @@ -21,6 +23,8 @@ void bch2_reflink_v_to_text(struct printbuf *, struct bch_fs *, .key_invalid = bch2_reflink_v_invalid, \ .val_to_text = bch2_reflink_v_to_text, \ .swab = bch2_ptr_swab, \ + .trans_trigger = bch2_trans_mark_extent, \ + .atomic_trigger = bch2_mark_extent, \ } const char *bch2_indirect_inline_data_invalid(const struct bch_fs *, |