summaryrefslogtreecommitdiff
path: root/libbcachefs/error.h
diff options
context:
space:
mode:
Diffstat (limited to 'libbcachefs/error.h')
-rw-r--r--libbcachefs/error.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/libbcachefs/error.h b/libbcachefs/error.h
index 94491190..36caedf7 100644
--- a/libbcachefs/error.h
+++ b/libbcachefs/error.h
@@ -32,6 +32,12 @@ bool bch2_inconsistent_error(struct bch_fs *);
int bch2_topology_error(struct bch_fs *);
+#define bch2_fs_topology_error(c, ...) \
+({ \
+ bch_err(c, "btree topology error: " __VA_ARGS__); \
+ bch2_topology_error(c); \
+})
+
#define bch2_fs_inconsistent(c, ...) \
({ \
bch_err(c, __VA_ARGS__); \
@@ -191,9 +197,9 @@ do { \
void bch2_fatal_error(struct bch_fs *);
-#define bch2_fs_fatal_error(c, ...) \
+#define bch2_fs_fatal_error(c, _msg, ...) \
do { \
- bch_err(c, __VA_ARGS__); \
+ bch_err(c, "%s(): fatal error " _msg, __func__, ##__VA_ARGS__); \
bch2_fatal_error(c); \
} while (0)