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
This commit is contained in:
Kirk McKusick 2020-03-11 21:00:40 +00:00
parent ddc9d6e55a
commit 95ca762da8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=358899
2 changed files with 5 additions and 1 deletions

View File

@ -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.

View File

@ -416,7 +416,7 @@ readsuper(void *devfd, struct fs **fsp, off_t sblockloc, int isaltsblk,
return (0);
}
fs->fs_fmod = 0;
return (EINVAL);
return (EINTEGRITY);
}
/* Have to set for old filesystems that predate this field */
fs->fs_sblockactualloc = sblockloc;