From owner-svn-src-all@freebsd.org Mon Jan 13 22:06:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F22351EEAC6; Mon, 13 Jan 2020 22:06:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47xSN867jKz4FhG; Mon, 13 Jan 2020 22:06:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CDC73B65A; Mon, 13 Jan 2020 22:06:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00DM6G0k049361; Mon, 13 Jan 2020 22:06:16 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00DM6GKh049360; Mon, 13 Jan 2020 22:06:16 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202001132206.00DM6GKh049360@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 13 Jan 2020 22:06:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r356707 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Commit-Revision: 356707 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jan 2020 22:06:17 -0000 Author: mav Date: Mon Jan 13 22:06:16 2020 New Revision: 356707 URL: https://svnweb.freebsd.org/changeset/base/356707 Log: 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 Reviewed by: mckusick, mav MFC after: 2 weeks Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D22973 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Mon Jan 13 22:01:37 2020 (r356706) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Mon Jan 13 22:06:16 2020 (r356707) @@ -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);