@@ -220,8 +220,7 @@ int bch2_get_next_backpointer(struct btree_trans *trans,
220
220
static void backpointer_not_found (struct btree_trans * trans ,
221
221
struct bpos bp_pos ,
222
222
struct bch_backpointer bp ,
223
- struct bkey_s_c k ,
224
- const char * thing_it_points_to )
223
+ struct bkey_s_c k )
225
224
{
226
225
struct bch_fs * c = trans -> c ;
227
226
struct printbuf buf = PRINTBUF ;
@@ -231,7 +230,7 @@ static void backpointer_not_found(struct btree_trans *trans,
231
230
return ;
232
231
233
232
prt_printf (& buf , "backpointer doesn't match %s it points to:\n " ,
234
- thing_it_points_to );
233
+ bp . level ? "btree node" : "extent" );
235
234
prt_printf (& buf , "bucket: " );
236
235
bch2_bpos_to_text (& buf , bucket );
237
236
prt_printf (& buf , "\n " );
@@ -303,7 +302,7 @@ struct bkey_s_c bch2_backpointer_get_key(struct btree_trans *trans,
303
302
return bkey_s_c_null ;
304
303
}
305
304
306
- backpointer_not_found (trans , bp_pos , bp , k , "extent" );
305
+ backpointer_not_found (trans , bp_pos , bp , k );
307
306
}
308
307
309
308
return bkey_s_c_null ;
@@ -338,8 +337,7 @@ struct btree *bch2_backpointer_get_node(struct btree_trans *trans,
338
337
if (b && btree_node_will_make_reachable (b )) {
339
338
b = ERR_PTR (- BCH_ERR_backpointer_to_overwritten_btree_node );
340
339
} else {
341
- backpointer_not_found (trans , bp_pos , bp ,
342
- bkey_i_to_s_c (& b -> key ), "btree node" );
340
+ backpointer_not_found (trans , bp_pos , bp , bkey_i_to_s_c (& b -> key ));
343
341
b = NULL ;
344
342
}
345
343
err :
@@ -797,7 +795,8 @@ static int check_one_backpointer(struct btree_trans *trans,
797
795
798
796
if (fsck_err_on (!k .k , c ,
799
797
backpointer_to_missing_ptr ,
800
- "backpointer for missing extent\n %s" ,
798
+ "backpointer for missing %s\n %s" ,
799
+ bp .v -> level ? "btree node" : "extent" ,
801
800
(bch2_bkey_val_to_text (& buf , c , bp .s_c ), buf .buf ))) {
802
801
ret = bch2_btree_delete_at_buffered (trans , BTREE_ID_backpointers , bp .k -> p );
803
802
goto out ;
0 commit comments