From 615f867c14b2d70efb02dafb8e668d984e74d0e3 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sun, 17 Jul 2022 22:31:21 -0400 Subject: bcachefs: Improved errcodes Instead of overloading standard error codes (EINTR/EAGAIN), and defining short lists of error codes in multiple places that potentially end up overlapping & conflicting, we're now going to have one master list of error codes. Error codes are defined with an x-macro: thus we also have bch2_err_str() now. Also, error codes have a class field. Now, instead of checking for errors with ==, code should use bch2_err_matches(), which returns true if the error is equal to or a sub-error of the error class. This means we can define unique errors for every source location where an error is generated, which will help improve our error messages. Signed-off-by: Kent Overstreet --- fs/bcachefs/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/bcachefs/Makefile') diff --git a/fs/bcachefs/Makefile b/fs/bcachefs/Makefile index 95b990ad0196..2f4bd31c862f 100644 --- a/fs/bcachefs/Makefile +++ b/fs/bcachefs/Makefile @@ -27,6 +27,7 @@ bcachefs-y := \ disk_groups.o \ data_update.o \ ec.o \ + errcode.o \ error.o \ extents.o \ extent_update.o \ -- cgit v1.2.3