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:
parent
c9814c28fc
commit
91ea5037fd
@ -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.
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user