mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-12-08 00:00:12 +03:00
Update bcachefs sources to 482e1f078108 bcachefs: fix CLASS()/goto build error
This commit is contained in:
parent
7bf5599c8c
commit
c8b1bbf2ea
@ -1 +1 @@
|
||||
66119f8201e1dc63d7e9ed11874265ff64750218
|
||||
482e1f07810803ba5509653d4a4fcd217d26d280
|
||||
|
||||
@ -322,17 +322,14 @@ static int reconcile_bp_del(struct btree_trans *trans, enum btree_id work_btree,
|
||||
struct bch_backpointer bp = rb_bp(btree, level, k);
|
||||
|
||||
if (bp_k.k->type != KEY_TYPE_backpointer || memcmp(bp_k.v, &bp, sizeof(bp))) {
|
||||
int ret = 0;
|
||||
|
||||
CLASS(printbuf, buf)();
|
||||
prt_printf(&buf, "btree ptr points to bad/missing reconcile bp\n");
|
||||
bch2_bkey_val_to_text(&buf, trans->c, k);
|
||||
prt_newline(&buf);
|
||||
bch2_bkey_val_to_text(&buf, trans->c, bp_k);
|
||||
|
||||
fsck_err(trans, btree_ptr_to_bad_reconcile_bp, "%s", buf.buf);
|
||||
fsck_err:
|
||||
return ret;
|
||||
ret_fsck_err(trans, btree_ptr_to_bad_reconcile_bp, "%s", buf.buf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return bch2_btree_delete_at(trans, &iter, 0);
|
||||
@ -361,6 +358,12 @@ static struct bkey_s_c reconcile_bp_get_key(struct btree_trans *trans,
|
||||
int ret = 0;
|
||||
CLASS(printbuf, buf)();
|
||||
|
||||
/*
|
||||
* we're still using fsck_err() here, which does a goto, which has
|
||||
* problems with CLASS()
|
||||
*/
|
||||
CLASS(btree_iter_uninit, iter2)(trans);
|
||||
|
||||
/* don't allow bps to non btree nodes: */
|
||||
if (fsck_err_on(!bp.v->level,
|
||||
trans, reconcile_bp_to_leaf_node_key,
|
||||
@ -387,7 +390,7 @@ static struct bkey_s_c reconcile_bp_get_key(struct btree_trans *trans,
|
||||
|
||||
/* walk down a level, check for btree_node_will_make_reachable(b)) */
|
||||
|
||||
CLASS(btree_node_iter, iter2)(trans, bp.v->btree_id, bp.v->pos, 0, bp.v->level - 1, 0);
|
||||
bch2_trans_node_iter_init(trans, &iter2, bp.v->btree_id, bp.v->pos, 0, bp.v->level - 1, 0);
|
||||
struct btree *b = bch2_btree_iter_peek_node(&iter2);
|
||||
if (IS_ERR(b))
|
||||
return bkey_s_c_err(PTR_ERR(b));
|
||||
@ -2116,7 +2119,6 @@ static int check_reconcile_work_btree_key(struct btree_trans *trans,
|
||||
struct btree_iter *iter, struct bkey_s_c k)
|
||||
{
|
||||
struct bch_fs *c = trans->c;
|
||||
int ret = 0;
|
||||
|
||||
struct bch_inode_opts opts;
|
||||
try(bch2_bkey_get_io_opts(trans, NULL, k, &opts));
|
||||
@ -2128,7 +2130,7 @@ static int check_reconcile_work_btree_key(struct btree_trans *trans,
|
||||
|
||||
CLASS(printbuf, buf)();
|
||||
|
||||
if (fsck_err_on(rb_btree && !rb_idx,
|
||||
if (ret_fsck_err_on(rb_btree && !rb_idx,
|
||||
trans, btree_ptr_with_no_reconcile_bp,
|
||||
"btree ptr with no reconcile \n%s",
|
||||
(bch2_bkey_val_to_text(&buf, c, k), buf.buf))) {
|
||||
@ -2141,7 +2143,7 @@ static int check_reconcile_work_btree_key(struct btree_trans *trans,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (fsck_err_on(!rb_btree && rb_idx,
|
||||
if (ret_fsck_err_on(!rb_btree && rb_idx,
|
||||
trans, btree_ptr_with_bad_reconcile_bp,
|
||||
"btree ptr with bad reconcile \n%s",
|
||||
(bch2_bkey_val_to_text(&buf, c, k), buf.buf))) {
|
||||
@ -2168,7 +2170,7 @@ static int check_reconcile_work_btree_key(struct btree_trans *trans,
|
||||
prt_newline(&buf);
|
||||
bch2_bkey_val_to_text(&buf, trans->c, bp_k);
|
||||
|
||||
fsck_err(trans, btree_ptr_to_bad_reconcile_bp, "%s", buf.buf);
|
||||
ret_fsck_err(trans, btree_ptr_to_bad_reconcile_bp, "%s", buf.buf);
|
||||
|
||||
if (bp_k.k->type != KEY_TYPE_backpointer) {
|
||||
struct bkey_i_backpointer *new_bp = errptr_try(bch2_bkey_alloc(trans, &rb_iter, 0, backpointer));
|
||||
@ -2185,8 +2187,8 @@ static int check_reconcile_work_btree_key(struct btree_trans *trans,
|
||||
}
|
||||
}
|
||||
}
|
||||
fsck_err:
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int check_reconcile_work_btrees(struct btree_trans *trans)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user