diff --git a/.bcachefs_revision b/.bcachefs_revision index bd4b8378..81d60a21 100644 --- a/.bcachefs_revision +++ b/.bcachefs_revision @@ -1 +1 @@ -452d7a3f10e48aec6c00c91b122b0a12f7726d59 +2a26443359de230e360b7de6531db938bfb0cbd8 diff --git a/libbcachefs/btree/check.c b/libbcachefs/btree/check.c index 94976a1c..3fc7b748 100644 --- a/libbcachefs/btree/check.c +++ b/libbcachefs/btree/check.c @@ -697,7 +697,7 @@ static int bch2_gc_mark_key(struct btree_trans *trans, enum btree_id btree_id, if (bch2_trans_has_updates(trans)) { CLASS(disk_reservation, res)(c); return bch2_trans_commit(trans, &res.r, NULL, BCH_TRANS_COMMIT_no_enospc) ?: - -BCH_ERR_transaction_restart_nested; + bch_err_throw(c, transaction_restart_commit); } try(bch2_key_trigger(trans, btree_id, level, old, unsafe_bkey_s_c_to_s(k), diff --git a/libbcachefs/btree/commit.c b/libbcachefs/btree/commit.c index 1ac29be5..bc0a6580 100644 --- a/libbcachefs/btree/commit.c +++ b/libbcachefs/btree/commit.c @@ -1026,6 +1026,8 @@ retry: goto fatal_err; } + event_inc_trace(c, transaction_commit, buf, prt_str(&buf, trans->fn)); + return 0; fatal_err: bch2_fs_fatal_error(c, "fatal error in transaction commit: %s", bch2_err_str(ret)); diff --git a/libbcachefs/btree/interior.c b/libbcachefs/btree/interior.c index 61915a53..eddf6b4d 100644 --- a/libbcachefs/btree/interior.c +++ b/libbcachefs/btree/interior.c @@ -2122,8 +2122,8 @@ int __bch2_foreground_maybe_merge(struct btree_trans *trans, if (!bpos_eq(bpos_successor(prev->data->max_key), next->data->min_key)) { CLASS(printbuf, buf)(); + bch2_log_msg_start(c, &buf); - printbuf_indent_add_nextline(&buf, 2); prt_printf(&buf, "%s(): ", __func__); ret = __bch2_topology_error(c, &buf); prt_newline(&buf); @@ -2135,7 +2135,7 @@ int __bch2_foreground_maybe_merge(struct btree_trans *trans, prt_printf(&buf, "next starts at "); bch2_bpos_to_text(&buf, next->data->min_key); - bch_err(c, "%s", buf.buf); + bch2_print_str(c, KERN_ERR, buf.buf); goto err; } diff --git a/libbcachefs/btree/iter.c b/libbcachefs/btree/iter.c index e53c7766..bdb07a6f 100644 --- a/libbcachefs/btree/iter.c +++ b/libbcachefs/btree/iter.c @@ -742,7 +742,9 @@ static noinline_for_stack int btree_node_root_err(struct btree_trans *trans, str bch2_btree_pos_to_text(&buf, c, b); prt_newline(&buf); - return __bch2_topology_error(c, &buf); + int ret = __bch2_topology_error(c, &buf); + bch2_print_str(trans->c, KERN_ERR, buf.buf); + return ret; } static inline int btree_path_lock_root(struct btree_trans *trans, @@ -916,7 +918,9 @@ static noinline_for_stack int btree_node_missing_err(struct btree_trans *trans, bch2_bkey_val_to_text(&buf, c, bkey_i_to_s_c(&path_l(path)->b->key)); prt_newline(&buf); - return __bch2_topology_error(c, &buf); + int ret = __bch2_topology_error(c, &buf); + bch2_print_str(trans->c, KERN_ERR, buf.buf); + return ret; } static noinline_for_stack int btree_node_gap_err(struct btree_trans *trans, @@ -934,7 +938,9 @@ static noinline_for_stack int btree_node_gap_err(struct btree_trans *trans, bch2_bkey_val_to_text(&buf, c, bkey_i_to_s_c(k)); prt_newline(&buf); - return __bch2_topology_error(c, &buf); + int ret = __bch2_topology_error(c, &buf); + bch2_print_str(trans->c, KERN_ERR, buf.buf); + return ret; } static noinline int btree_node_iter_and_journal_peek(struct btree_trans *trans,