bcachefs: Don't block journal when finishing check_allocations()
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 29 May 2024 21:54:46 +0000 (17:54 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 14 Jul 2024 23:00:14 +0000 (19:00 -0400)
Blocking the journal was needed to finish checking old style accounting,
but that code is gone and it's not needed in the alloc rewrite,
mark_lock is sufficient for synchronization.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_gc.c

index 0fe869cff8be74835115d58044b897e952548fe8..cd5880c94eddcd5cbc2886509fe8adc7a8c355ea 100644 (file)
@@ -1142,15 +1142,11 @@ int bch2_check_allocations(struct bch_fs *c)
 
        c->gc_count++;
 
-       bch2_journal_block(&c->journal);
-out:
        ret   = bch2_gc_alloc_done(c) ?:
                bch2_accounting_gc_done(c) ?:
                bch2_gc_stripes_done(c) ?:
                bch2_gc_reflink_done(c);
-
-       bch2_journal_unblock(&c->journal);
-
+out:
        percpu_down_write(&c->mark_lock);
        /* Indicates that gc is no longer in progress: */
        __gc_pos_set(c, gc_phase(GC_PHASE_not_running));