@@ -27,7 +27,7 @@ const char * const bch2_bkey_types[] = {
2727};
2828
2929static int deleted_key_invalid (struct bch_fs * c , struct bkey_s_c k ,
30- enum bkey_invalid_flags flags , struct printbuf * err )
30+ enum bch_validate_flags flags , struct printbuf * err )
3131{
3232 return 0 ;
3333}
@@ -41,7 +41,7 @@ static int deleted_key_invalid(struct bch_fs *c, struct bkey_s_c k,
4141})
4242
4343static int empty_val_key_invalid (struct bch_fs * c , struct bkey_s_c k ,
44- enum bkey_invalid_flags flags , struct printbuf * err )
44+ enum bch_validate_flags flags , struct printbuf * err )
4545{
4646 int ret = 0 ;
4747
@@ -58,7 +58,7 @@ static int empty_val_key_invalid(struct bch_fs *c, struct bkey_s_c k,
5858})
5959
6060static int key_type_cookie_invalid (struct bch_fs * c , struct bkey_s_c k ,
61- enum bkey_invalid_flags flags , struct printbuf * err )
61+ enum bch_validate_flags flags , struct printbuf * err )
6262{
6363 return 0 ;
6464}
@@ -82,7 +82,7 @@ static void key_type_cookie_to_text(struct printbuf *out, struct bch_fs *c,
8282})
8383
8484static int key_type_inline_data_invalid (struct bch_fs * c , struct bkey_s_c k ,
85- enum bkey_invalid_flags flags , struct printbuf * err )
85+ enum bch_validate_flags flags , struct printbuf * err )
8686{
8787 return 0 ;
8888}
@@ -123,7 +123,7 @@ const struct bkey_ops bch2_bkey_null_ops = {
123123};
124124
125125int bch2_bkey_val_invalid (struct bch_fs * c , struct bkey_s_c k ,
126- enum bkey_invalid_flags flags ,
126+ enum bch_validate_flags flags ,
127127 struct printbuf * err )
128128{
129129 const struct bkey_ops * ops = bch2_bkey_type_ops (k .k -> type );
@@ -159,7 +159,7 @@ const char *bch2_btree_node_type_str(enum btree_node_type type)
159159
160160int __bch2_bkey_invalid (struct bch_fs * c , struct bkey_s_c k ,
161161 enum btree_node_type type ,
162- enum bkey_invalid_flags flags ,
162+ enum bch_validate_flags flags ,
163163 struct printbuf * err )
164164{
165165 int ret = 0 ;
@@ -172,7 +172,7 @@ int __bch2_bkey_invalid(struct bch_fs *c, struct bkey_s_c k,
172172 return 0 ;
173173
174174 bkey_fsck_err_on (k .k -> type < KEY_TYPE_MAX &&
175- (type == BKEY_TYPE_btree || (flags & BKEY_INVALID_COMMIT )) &&
175+ (type == BKEY_TYPE_btree || (flags & BCH_VALIDATE_commit )) &&
176176 !(bch2_key_types_allowed [type ] & BIT_ULL (k .k -> type )), c , err ,
177177 bkey_invalid_type_for_btree ,
178178 "invalid key type for btree %s (%s)" ,
@@ -224,7 +224,7 @@ int __bch2_bkey_invalid(struct bch_fs *c, struct bkey_s_c k,
224224
225225int bch2_bkey_invalid (struct bch_fs * c , struct bkey_s_c k ,
226226 enum btree_node_type type ,
227- enum bkey_invalid_flags flags ,
227+ enum bch_validate_flags flags ,
228228 struct printbuf * err )
229229{
230230 return __bch2_bkey_invalid (c , k , type , flags , err ) ?:
0 commit comments