summaryrefslogtreecommitdiff
path: root/fs/bcachefs/errcode.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-11-28 13:42:05 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:17 -0400
commitfc6c01e2ea5292a740ddedb5b2b3805e8ecb3f4b (patch)
treebc9b86af3d7198eb57f96b65e645d537601c65b2 /fs/bcachefs/errcode.h
parentdcfc593f7b3a35e340f0cefa3281a3285ddb48e8 (diff)
bcachefs: Convert bucket_alloc_ret to negative error codes
Start a new header, errcode.h, for bcachefs-private error codes - more error codes will be converted later. This patch just converts bucket_alloc_ret so that they can be mixed with standard error codes and passed as ERR_PTR errors - the ec.c code was doing this already, but incorrectly. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/errcode.h')
-rw-r--r--fs/bcachefs/errcode.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/bcachefs/errcode.h b/fs/bcachefs/errcode.h
new file mode 100644
index 000000000000..f7d12915c1cc
--- /dev/null
+++ b/fs/bcachefs/errcode.h
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _BCACHEFS_ERRCODE_H
+#define _BCACHEFS_ERRCODE_H
+
+enum {
+ /* Bucket allocator: */
+ OPEN_BUCKETS_EMPTY = 2048,
+ FREELIST_EMPTY, /* Allocator thread not keeping up */
+ INSUFFICIENT_DEVICES,
+};
+
+#endif /* _BCACHFES_ERRCODE_H */