summaryrefslogtreecommitdiff
path: root/fs/bcachefs/subvolume.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-07-06 21:16:10 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:10:06 -0400
commit8726dc936fb79fda4a0280033cdd180f7f343cdd (patch)
treef0fe5bddcf6dc498b6bb16f9b1110078aabdf4a0 /fs/bcachefs/subvolume.h
parent73bd774d28d2b2e6a05c31bf7afb9247e02a8e49 (diff)
bcachefs: Change check for invalid key types
As part of the forward compatibility patch series, we need to allow for new key types without complaining loudly when running an old version. This patch changes the flags parameter of bkey_invalid to an enum, and adds a new flag to indicate we're being called from the transaction commit path. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/subvolume.h')
-rw-r--r--fs/bcachefs/subvolume.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/bcachefs/subvolume.h b/fs/bcachefs/subvolume.h
index 1a39f713db87..105410e080e0 100644
--- a/fs/bcachefs/subvolume.h
+++ b/fs/bcachefs/subvolume.h
@@ -5,9 +5,11 @@
#include "darray.h"
#include "subvolume_types.h"
+enum bkey_invalid_flags;
+
void bch2_snapshot_tree_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c);
int bch2_snapshot_tree_invalid(const struct bch_fs *, struct bkey_s_c,
- unsigned, struct printbuf *);
+ enum bkey_invalid_flags, struct printbuf *);
#define bch2_bkey_ops_snapshot_tree ((struct bkey_ops) { \
.key_invalid = bch2_snapshot_tree_invalid, \
@@ -19,7 +21,7 @@ int bch2_snapshot_tree_lookup(struct btree_trans *, u32, struct bch_snapshot_tre
void bch2_snapshot_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c);
int bch2_snapshot_invalid(const struct bch_fs *, struct bkey_s_c,
- unsigned, struct printbuf *);
+ enum bkey_invalid_flags, struct printbuf *);
int bch2_mark_snapshot(struct btree_trans *, enum btree_id, unsigned,
struct bkey_s_c, struct bkey_s_c, unsigned);