aboutsummaryrefslogtreecommitdiff
path: root/sys/cddl
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2020-01-13 22:06:16 +0000
committerAlexander Motin <mav@FreeBSD.org>2020-01-13 22:06:16 +0000
commitda19f62dfa0cad8f67b68f606137f7a06659164a (patch)
tree3a4efc8ca8ec58b8bf6cb484a3644a4b12ae7965 /sys/cddl
parenta532f299c9c5b18497817df610c41de65bc0a096 (diff)
downloadsrc-da19f62dfa0cad8f67b68f606137f7a06659164a.tar.gz
src-da19f62dfa0cad8f67b68f606137f7a06659164a.zip
Map ECKSUM and EFRAGS from ZFS onto real errnos.
Make it less confusing when, for example, stat sets errno to 122 because a checksum failed in ZFS: Before: getfacl: /foo/bar: stat() failed: Unknown error: 122 After: getfacl: /foo/bar: stat() failed: Integrity check failed Submitted by: Ryan Moeller <ryan@ixsystems.com> Reviewed by: mckusick, mav MFC after: 2 weeks Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D22973
Notes
Notes: svn path=/head/; revision=356707
Diffstat (limited to 'sys/cddl')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
index d1c66933b3bd..99aecb67069b 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
@@ -233,12 +233,11 @@ enum zio_wait_type {
};
/*
- * We'll take the number 122 and 123 to indicate checksum errors and
- * fragmentation. Those doesn't collide with any errno values as they
- * are greater than ELAST.
+ * These are bespoke errnos used in ZFS. We map them to their closest FreeBSD
+ * equivalents. This gives us more useful error messages from strerror(3).
*/
-#define ECKSUM 122
-#define EFRAGS 123
+#define ECKSUM EINTEGRITY
+#define EFRAGS ENOSPC
typedef void zio_done_func_t(zio_t *zio);