]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/error.c
Update bcachefs sources to 0906b1fb49 bcachefs: fixes for 32 bit/big endian machines
[bcachefs-tools-debian] / libbcachefs / error.c
index ca2a06e2e4eb3dbd751aa24ecb4c1622cc2bb594..2a357fc33ef71d689ca7a7efff013d4f6c841e63 100644 (file)
@@ -3,20 +3,22 @@
 #include "io.h"
 #include "super.h"
 
-void bch2_inconsistent_error(struct bch_fs *c)
+bool bch2_inconsistent_error(struct bch_fs *c)
 {
        set_bit(BCH_FS_ERROR, &c->flags);
 
        switch (c->opts.errors) {
        case BCH_ON_ERROR_CONTINUE:
-               break;
+               return false;
        case BCH_ON_ERROR_RO:
                if (bch2_fs_emergency_read_only(c))
                        bch_err(c, "emergency read only");
-               break;
+               return true;
        case BCH_ON_ERROR_PANIC:
                panic(bch2_fmt(c, "panic after error"));
-               break;
+               return true;
+       default:
+               BUG();
        }
 }