diff --git a/.bcachefs_revision b/.bcachefs_revision index 1e846287..a589122a 100644 --- a/.bcachefs_revision +++ b/.bcachefs_revision @@ -1 +1 @@ -de906c3e2eddad291d46bd0e7c81c68eaadcd08a +fc4f1d59cf9330bbb27cd12c459706aa5e7fe33c diff --git a/libbcachefs/alloc_background.c b/libbcachefs/alloc_background.c index c627cdd1..990701a6 100644 --- a/libbcachefs/alloc_background.c +++ b/libbcachefs/alloc_background.c @@ -1438,6 +1438,9 @@ again: cond_resched(); nodes_unwritten = false; + if (bch2_journal_error(&c->journal)) + return true; + rcu_read_lock(); for_each_cached_btree(b, c, tbl, i, pos) if (btree_node_need_write(b)) { diff --git a/libbcachefs/extents.c b/libbcachefs/extents.c index b1f9269a..34eb70ce 100644 --- a/libbcachefs/extents.c +++ b/libbcachefs/extents.c @@ -972,20 +972,7 @@ static int count_iters_for_insert(struct btree_trans *trans, POS(0, idx + sectors)) >= 0) break; - *nr_iters += 1; - - if (overwrite && - r_k.k->type == KEY_TYPE_reflink_v) { - struct bkey_s_c_reflink_v r = bkey_s_c_to_reflink_v(r_k); - - if (le64_to_cpu(r.v->refcount) == 1) - *nr_iters += bch2_bkey_nr_alloc_ptrs(r_k); - } - - /* - * if we're going to be deleting an entry from - * the reflink btree, need more iters... - */ + *nr_iters += 1 + bch2_bkey_nr_alloc_ptrs(r_k); if (*nr_iters >= max_iters) { struct bpos pos = bkey_start_pos(k.k);