]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/recovery.c
Update bcachefs sources to 938f680845d1 fixup! rename and export __kern_path_locked()
[bcachefs-tools-debian] / libbcachefs / recovery.c
index 130274b195e21621c391ad89d965440cf077816c..83fc121ff3c44d3012a1d5770536549cbc479971 100644 (file)
@@ -161,8 +161,8 @@ static int bch2_journal_replay(struct bch_fs *c)
 
        /*
         * First, attempt to replay keys in sorted order. This is more
-        * efficient, but some might fail if that would cause a journal
-        * deadlock.
+        * efficient - better locality of btree access -  but some might fail if
+        * that would cause a journal deadlock.
         */
        for (size_t i = 0; i < keys->nr; i++) {
                cond_resched();
@@ -211,6 +211,10 @@ static int bch2_journal_replay(struct bch_fs *c)
                BUG_ON(!k->overwritten);
        }
 
+       /*
+        * We need to put our btree_trans before calling flush_all_pins(), since
+        * that will use a btree_trans internally
+        */
        bch2_trans_put(trans);
        trans = NULL;
 
@@ -874,6 +878,8 @@ use_clean:
            test_bit(BCH_FS_ERRORS_FIXED, &c->flags) &&
            !test_bit(BCH_FS_ERRORS_NOT_FIXED, &c->flags) &&
            !test_bit(BCH_FS_ERROR, &c->flags)) {
+               bch2_flush_fsck_errs(c);
+
                bch_info(c, "Fixed errors, running fsck a second time to verify fs is clean");
                clear_bit(BCH_FS_ERRORS_FIXED, &c->flags);