svn commit: r358899 - in head: lib/libc/sys sys/ufs/ffs
Kirk McKusick
mckusick at FreeBSD.org
Wed Mar 11 21:00:41 UTC 2020
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;
More information about the svn-src-head
mailing list