]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/error.c
Update bcachefs sources to e99d29e402 bcachefs: zstd support, compression refactoring
[bcachefs-tools-debian] / libbcachefs / error.c
index 8357c8de895d28f692a9b81d160334275853d1ad..ca2a06e2e4eb3dbd751aa24ecb4c1622cc2bb594 100644 (file)
@@ -95,11 +95,17 @@ print:
        vscnprintf(buf, sizeof(_buf), fmt, args);
        va_end(args);
 
+       if (c->opts.fix_errors == FSCK_OPT_EXIT) {
+               bch_err(c, "%s, exiting", buf);
+               mutex_unlock(&c->fsck_error_lock);
+               return FSCK_ERR_EXIT;
+       }
+
        if (flags & FSCK_CAN_FIX) {
-               if (c->opts.fix_errors == FSCK_ERR_ASK) {
+               if (c->opts.fix_errors == FSCK_OPT_ASK) {
                        printk(KERN_ERR "%s: fix?", buf);
                        fix = ask_yn();
-               } else if (c->opts.fix_errors == FSCK_ERR_YES ||
+               } else if (c->opts.fix_errors == FSCK_OPT_YES ||
                           (c->opts.nochanges &&
                            !(flags & FSCK_CAN_IGNORE))) {
                        if (print)