Date: Wed, 11 Mar 2020 21:00:40 +0000 (UTC) From: Kirk McKusick <mckusick@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358899 - in head: lib/libc/sys sys/ufs/ffs Message-ID: <202003112100.02BL0esU016367@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mckusick Date: Wed Mar 11 21:00:40 2020 New Revision: 358899 URL: https://svnweb.freebsd.org/changeset/base/358899 Log: When mounting a UFS filesystem, return EINTEGRITY rather than EIO when a superblock check-hash error is detected. This change clarifies a mount that failed due to media hardware failures (EIO) from a mount that failed due to media errors (EINTEGRITY) that can be corrected by running fsck(8). Sponsored by: Netflix Modified: head/lib/libc/sys/mount.2 head/sys/ufs/ffs/ffs_subr.c Modified: head/lib/libc/sys/mount.2 ============================================================================== --- head/lib/libc/sys/mount.2 Wed Mar 11 20:40:24 2020 (r358898) +++ head/lib/libc/sys/mount.2 Wed Mar 11 21:00:40 2020 (r358899) @@ -307,6 +307,10 @@ No space remains in the mount table. .It Bq Er EINVAL The super block for the file system had a bad magic number or an out of range block size. +.It Bq Er EINTEGRITY +The super block for the file system had a bad check hash. +The check hash can usually be corrected by running +.Xr fsck 8 . .It Bq Er ENOMEM Not enough memory was available to read the cylinder group information for the file system. Modified: head/sys/ufs/ffs/ffs_subr.c ============================================================================== --- head/sys/ufs/ffs/ffs_subr.c Wed Mar 11 20:40:24 2020 (r358898) +++ head/sys/ufs/ffs/ffs_subr.c Wed Mar 11 21:00:40 2020 (r358899) @@ -416,7 +416,7 @@ readsuper(void *devfd, struct fs **fsp, off_t sblocklo return (0); } fs->fs_fmod = 0; - return (EINVAL); + return (EINTEGRITY); } /* Have to set for old filesystems that predate this field */ fs->fs_sblockactualloc = sblockloc;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202003112100.02BL0esU016367>