summaryrefslogtreecommitdiff
path: root/fs/bcachefs/inode.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-03-13 00:26:52 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:28 -0400
commit880e2275f9f1461c87cd113a8da291861cc01400 (patch)
tree8e8962da1c1e71c93758ce2b4a8374dbfc9f1bfa /fs/bcachefs/inode.h
parentd13f9ee61dac0b5d663844c5778309ec8af1561f (diff)
downloadlwn-880e2275f9f1461c87cd113a8da291861cc01400.tar.gz
lwn-880e2275f9f1461c87cd113a8da291861cc01400.zip
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/inode.h')
-rw-r--r--fs/bcachefs/inode.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/bcachefs/inode.h b/fs/bcachefs/inode.h
index 77957cc7f9dd..2337ecfc600e 100644
--- a/fs/bcachefs/inode.h
+++ b/fs/bcachefs/inode.h
@@ -13,11 +13,15 @@ void bch2_inode_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c);
#define bch2_bkey_ops_inode (struct bkey_ops) { \
.key_invalid = bch2_inode_invalid, \
.val_to_text = bch2_inode_to_text, \
+ .trans_trigger = bch2_trans_mark_inode, \
+ .atomic_trigger = bch2_mark_inode, \
}
#define bch2_bkey_ops_inode_v2 (struct bkey_ops) { \
.key_invalid = bch2_inode_v2_invalid, \
.val_to_text = bch2_inode_to_text, \
+ .trans_trigger = bch2_trans_mark_inode, \
+ .atomic_trigger = bch2_mark_inode, \
}
static inline bool bkey_is_inode(const struct bkey *k)