]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/error.c
Update bcachefs sources to fd6fb298aa bcachefs: Make sure hash info gets initialized...
[bcachefs-tools-debian] / libbcachefs / error.c
index aa640284ed1990e575917229ba6340a0546fde08..545c55dabc277d341ee4e7c35343f83e9f734245 100644 (file)
@@ -158,6 +158,11 @@ int bch2_fsck_err(struct bch_fs *c, unsigned flags, const char *fmt, ...)
        mutex_lock(&c->fsck_error_lock);
        s = fsck_err_get(c, fmt);
        if (s) {
+               /*
+                * We may be called multiple times for the same error on
+                * transaction restart - this memoizes instead of asking the user
+                * multiple times for the same error:
+                */
                if (s->last_msg && !strcmp(buf.buf, s->last_msg)) {
                        ret = s->ret;
                        mutex_unlock(&c->fsck_error_lock);