From 58b0dd9acdd446037c9989a42ad593807098a0b4 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 8 Sep 2020 20:51:19 +0000 Subject: [PATCH] MFC 359465: Document EINTEGRITY errors for many system calls. EINTEGRITY was previously documented as a UFS-specific error for mount(2). This documents EINTEGRITY as a filesystem-independent error that may be reported by the backing store of a filesystem. While here, document EIO as a filesystem-independent error for both mount(2) and posix_fadvise(2). EIO was previously only documented for UFS for mount(2). --- lib/libc/sys/access.2 | 4 +++- lib/libc/sys/acct.2 | 4 +++- lib/libc/sys/bind.2 | 4 +++- lib/libc/sys/chdir.2 | 4 +++- lib/libc/sys/chflags.2 | 6 +++++- lib/libc/sys/chmod.2 | 6 +++++- lib/libc/sys/chown.2 | 6 +++++- lib/libc/sys/chroot.2 | 4 +++- lib/libc/sys/execve.2 | 4 +++- lib/libc/sys/fhlink.2 | 4 +++- lib/libc/sys/fhreadlink.2 | 4 +++- lib/libc/sys/fsync.2 | 4 +++- lib/libc/sys/getdirentries.2 | 4 +++- lib/libc/sys/getfh.2 | 4 +++- lib/libc/sys/getfsstat.2 | 4 +++- lib/libc/sys/ktrace.2 | 4 +++- lib/libc/sys/link.2 | 4 +++- lib/libc/sys/mkdir.2 | 4 +++- lib/libc/sys/mkfifo.2 | 4 +++- lib/libc/sys/mknod.2 | 4 +++- lib/libc/sys/mount.2 | 9 ++++++++- lib/libc/sys/open.2 | 4 +++- lib/libc/sys/pathconf.2 | 6 +++++- lib/libc/sys/posix_fadvise.2 | 6 +++++- lib/libc/sys/posix_fallocate.2 | 4 +++- lib/libc/sys/quotactl.2 | 4 +++- lib/libc/sys/read.2 | 4 +++- lib/libc/sys/readlink.2 | 4 +++- lib/libc/sys/rename.2 | 4 +++- lib/libc/sys/rmdir.2 | 4 +++- lib/libc/sys/sendfile.2 | 5 ++++- lib/libc/sys/stat.2 | 6 +++++- lib/libc/sys/statfs.2 | 6 +++++- lib/libc/sys/swapon.2 | 5 ++++- lib/libc/sys/symlink.2 | 4 +++- lib/libc/sys/truncate.2 | 4 +++- lib/libc/sys/undelete.2 | 4 +++- lib/libc/sys/unlink.2 | 4 +++- lib/libc/sys/utimensat.2 | 4 +++- lib/libc/sys/utimes.2 | 4 +++- lib/libc/sys/write.2 | 8 +++++++- share/man/man9/VOP_READDIR.9 | 4 +++- share/man/man9/VOP_READLINK.9 | 4 +++- share/man/man9/g_data.9 | 4 +++- 44 files changed, 157 insertions(+), 44 deletions(-) diff --git a/lib/libc/sys/access.2 b/lib/libc/sys/access.2 index f21eb038841..4d5d2132c1a 100644 --- a/lib/libc/sys/access.2 +++ b/lib/libc/sys/access.2 @@ -28,7 +28,7 @@ .\" @(#)access.2 8.2 (Berkeley) 4/1/94 .\" $FreeBSD$ .\" -.Dd September 15, 2014 +.Dd March 30, 2020 .Dt ACCESS 2 .Os .Sh NAME @@ -168,6 +168,8 @@ argument points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp Also, the diff --git a/lib/libc/sys/acct.2 b/lib/libc/sys/acct.2 index dfa241d1e45..43a48972ee8 100644 --- a/lib/libc/sys/acct.2 +++ b/lib/libc/sys/acct.2 @@ -28,7 +28,7 @@ .\" @(#)acct.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 17, 2004 +.Dd March 30, 2020 .Dt ACCT 2 .Os .Sh NAME @@ -119,6 +119,8 @@ argument points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr acct 5 , diff --git a/lib/libc/sys/bind.2 b/lib/libc/sys/bind.2 index f630715f1cf..05e462a1746 100644 --- a/lib/libc/sys/bind.2 +++ b/lib/libc/sys/bind.2 @@ -28,7 +28,7 @@ .\" @(#)bind.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd August 18, 2016 +.Dd March 30, 2020 .Dt BIND 2 .Os .Sh NAME @@ -122,6 +122,8 @@ A prefix component of the path name does not exist. Too many symbolic links were encountered in translating the pathname. .It Bq Er EIO An I/O error occurred while making the directory entry or allocating the inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EROFS The name would reside on a read-only file system. .It Bq Er EISDIR diff --git a/lib/libc/sys/chdir.2 b/lib/libc/sys/chdir.2 index b0c7f021d9b..acc3b601f00 100644 --- a/lib/libc/sys/chdir.2 +++ b/lib/libc/sys/chdir.2 @@ -28,7 +28,7 @@ .\" @(#)chdir.2 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd December 1, 2017 +.Dd March 30, 2020 .Dt CHDIR 2 .Os .Sh NAME @@ -96,6 +96,8 @@ argument points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp The diff --git a/lib/libc/sys/chflags.2 b/lib/libc/sys/chflags.2 index 6fbec4129e5..fa09e1a4449 100644 --- a/lib/libc/sys/chflags.2 +++ b/lib/libc/sys/chflags.2 @@ -28,7 +28,7 @@ .\" @(#)chflags.2 8.3 (Berkeley) 5/2/95 .\" $FreeBSD$ .\" -.Dd March 22, 2013 +.Dd March 30, 2020 .Dt CHFLAGS 2 .Os .Sh NAME @@ -256,6 +256,8 @@ points outside the process's allocated address space. An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EOPNOTSUPP The underlying file system does not support file flags, or does not support all of the flags set in @@ -298,6 +300,8 @@ The file resides on a read-only file system. An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EOPNOTSUPP The underlying file system does not support file flags, or does not support all of the flags set in diff --git a/lib/libc/sys/chmod.2 b/lib/libc/sys/chmod.2 index 2c9ef9dbcb6..34acac45b2f 100644 --- a/lib/libc/sys/chmod.2 +++ b/lib/libc/sys/chmod.2 @@ -28,7 +28,7 @@ .\" @(#)chmod.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd December 1, 2017 +.Dd March 30, 2020 .Dt CHMOD 2 .Os .Sh NAME @@ -236,6 +236,8 @@ argument points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EFTYPE The effective user ID is not the super-user, the mode includes the sticky bit .Dv ( S_ISVTX ) , @@ -257,6 +259,8 @@ refers to a socket, not to a file. The file resides on a read-only file system. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp In addition to the diff --git a/lib/libc/sys/chown.2 b/lib/libc/sys/chown.2 index 97cf8a38905..8e9a937c9c0 100644 --- a/lib/libc/sys/chown.2 +++ b/lib/libc/sys/chown.2 @@ -28,7 +28,7 @@ .\" @(#)chown.2 8.4 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd December 1, 2017 +.Dd March 30, 2020 .Dt CHOWN 2 .Os .Sh NAME @@ -175,6 +175,8 @@ argument points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp The @@ -197,6 +199,8 @@ The effective user ID is not the super-user. The named file resides on a read-only file system. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp In addition to the errors specified for diff --git a/lib/libc/sys/chroot.2 b/lib/libc/sys/chroot.2 index bcc3faf09ee..4fd2c40e634 100644 --- a/lib/libc/sys/chroot.2 +++ b/lib/libc/sys/chroot.2 @@ -28,7 +28,7 @@ .\" @(#)chroot.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd January 3, 2012 +.Dd March 30, 2020 .Dt CHROOT 2 .Os .Sh NAME @@ -121,6 +121,8 @@ argument points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr chdir 2 , diff --git a/lib/libc/sys/execve.2 b/lib/libc/sys/execve.2 index 598c264dbc0..20b73342f96 100644 --- a/lib/libc/sys/execve.2 +++ b/lib/libc/sys/execve.2 @@ -28,7 +28,7 @@ .\" @(#)execve.2 8.5 (Berkeley) 6/1/94 .\" $FreeBSD$ .\" -.Dd September 21, 2010 +.Dd March 30, 2020 .Dt EXECVE 2 .Os .Sh NAME @@ -304,6 +304,8 @@ point to an illegal address. .It Bq Er EIO An I/O error occurred while reading from the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp In addition, the diff --git a/lib/libc/sys/fhlink.2 b/lib/libc/sys/fhlink.2 index d15ffb628ce..db4ccf6fe40 100644 --- a/lib/libc/sys/fhlink.2 +++ b/lib/libc/sys/fhlink.2 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 29, 2018 +.Dd March 30, 2020 .Dt FHLINK 2 .Os .Sh NAME @@ -219,6 +219,8 @@ containing the directory has been exhausted. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system to make the directory entry. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EROFS The requested link requires writing in a directory on a read-only file system. diff --git a/lib/libc/sys/fhreadlink.2 b/lib/libc/sys/fhreadlink.2 index 599db0985eb..2837fd593d8 100644 --- a/lib/libc/sys/fhreadlink.2 +++ b/lib/libc/sys/fhreadlink.2 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 29, 2018 +.Dd March 30, 2020 .Dt FHREADLINK 2 .Os .Sh NAME @@ -76,6 +76,8 @@ Too many symbolic links were encountered in translating the file handle The named file is not a symbolic link. .It Bq Er EIO An I/O error occurred while reading from the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EFAULT The .Fa buf diff --git a/lib/libc/sys/fsync.2 b/lib/libc/sys/fsync.2 index e0661736506..540e02b7849 100644 --- a/lib/libc/sys/fsync.2 +++ b/lib/libc/sys/fsync.2 @@ -34,7 +34,7 @@ .\" @(#)fsync.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd February 6, 2018 +.Dd March 30, 2020 .Dt FSYNC 2 .Os .Sh NAME @@ -107,6 +107,8 @@ argument refers to a socket, not to a file. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr fsync 1 , diff --git a/lib/libc/sys/getdirentries.2 b/lib/libc/sys/getdirentries.2 index 2951f553ea0..f2d1c05240d 100644 --- a/lib/libc/sys/getdirentries.2 +++ b/lib/libc/sys/getdirentries.2 @@ -28,7 +28,7 @@ .\" @(#)getdirentries.2 8.2 (Berkeley) 5/3/95 .\" $FreeBSD$ .\" -.Dd Nov 14, 2018 +.Dd March 30, 2020 .Dt GETDIRENTRIES 2 .Os .Sh NAME @@ -189,6 +189,8 @@ or the current position pointer is invalid. An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr lseek 2 , diff --git a/lib/libc/sys/getfh.2 b/lib/libc/sys/getfh.2 index 0f17927ba7d..d6318cdd1aa 100644 --- a/lib/libc/sys/getfh.2 +++ b/lib/libc/sys/getfh.2 @@ -29,7 +29,7 @@ .\" @(#)getfh.2 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd December 11, 2018 +.Dd March 30, 2020 .Dt GETFH 2 .Os .Sh NAME @@ -192,6 +192,8 @@ points to an invalid address. An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er ESTALE The file handle .Fa fhp diff --git a/lib/libc/sys/getfsstat.2 b/lib/libc/sys/getfsstat.2 index ad965757788..1f5b52b6991 100644 --- a/lib/libc/sys/getfsstat.2 +++ b/lib/libc/sys/getfsstat.2 @@ -28,7 +28,7 @@ .\" @(#)getfsstat.2 8.3 (Berkeley) 5/25/95 .\" $FreeBSD$ .\" -.Dd December 27, 2016 +.Dd March 30, 2020 .Dt GETFSSTAT 2 .Os .Sh NAME @@ -118,6 +118,8 @@ or An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr statfs 2 , diff --git a/lib/libc/sys/ktrace.2 b/lib/libc/sys/ktrace.2 index 532c885f422..ffe967e35ed 100644 --- a/lib/libc/sys/ktrace.2 +++ b/lib/libc/sys/ktrace.2 @@ -28,7 +28,7 @@ .\" @(#)ktrace.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd March 31, 2016 +.Dd March 30, 2020 .Dt KTRACE 2 .Os .Sh NAME @@ -177,6 +177,8 @@ Search permission is denied for a component of the path prefix. Too many symbolic links were encountered in translating the pathname. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er ENOSYS The kernel was not compiled with .Nm diff --git a/lib/libc/sys/link.2 b/lib/libc/sys/link.2 index bb238447e5d..05cf3382159 100644 --- a/lib/libc/sys/link.2 +++ b/lib/libc/sys/link.2 @@ -28,7 +28,7 @@ .\" @(#)link.2 8.3 (Berkeley) 1/12/94 .\" $FreeBSD$ .\" -.Dd December 1, 2017 +.Dd March 30, 2020 .Dt LINK 2 .Os .Sh NAME @@ -215,6 +215,8 @@ containing the directory has been exhausted. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system to make the directory entry. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EROFS The requested link requires writing in a directory on a read-only file system. diff --git a/lib/libc/sys/mkdir.2 b/lib/libc/sys/mkdir.2 index c2c92656723..b926705c2f1 100644 --- a/lib/libc/sys/mkdir.2 +++ b/lib/libc/sys/mkdir.2 @@ -28,7 +28,7 @@ .\" @(#)mkdir.2 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd June 26, 2008 +.Dd March 30, 2020 .Dt MKDIR 2 .Os .Sh NAME @@ -126,6 +126,8 @@ which the directory is being created has been exhausted. An I/O error occurred while making the directory entry or allocating the inode. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EFAULT The .Fa path diff --git a/lib/libc/sys/mkfifo.2 b/lib/libc/sys/mkfifo.2 index 6ab30af1484..f9a306e1a83 100644 --- a/lib/libc/sys/mkfifo.2 +++ b/lib/libc/sys/mkfifo.2 @@ -28,7 +28,7 @@ .\" @(#)mkfifo.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 10, 2008 +.Dd March 30, 2020 .Dt MKFIFO 2 .Os .Sh NAME @@ -134,6 +134,8 @@ error occurred while making the directory entry or allocating the inode. An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EFAULT The .Fa path diff --git a/lib/libc/sys/mknod.2 b/lib/libc/sys/mknod.2 index 8fd504dec8e..08117c51193 100644 --- a/lib/libc/sys/mknod.2 +++ b/lib/libc/sys/mknod.2 @@ -28,7 +28,7 @@ .\" @(#)mknod.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd December 1, 2017 +.Dd March 30, 2020 .Dt MKNOD 2 .Os .Sh NAME @@ -108,6 +108,8 @@ Too many symbolic links were encountered in translating the pathname. The process's effective user ID is not super-user. .It Bq Er EIO An I/O error occurred while making the directory entry or allocating the inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er ENOSPC The directory in which the entry for the new node is being placed cannot be extended because there is no space left on the file diff --git a/lib/libc/sys/mount.2 b/lib/libc/sys/mount.2 index 2d296e6f5b1..0a3a23609c9 100644 --- a/lib/libc/sys/mount.2 +++ b/lib/libc/sys/mount.2 @@ -28,7 +28,7 @@ .\" @(#)mount.2 8.3 (Berkeley) 5/24/95 .\" $FreeBSD$ .\" -.Dd December 1, 2017 +.Dd March 30, 2020 .Dt MOUNT 2 .Os .Sh NAME @@ -265,6 +265,13 @@ The .Fa dir argument points outside the process's allocated address space. +.It Bq Er EIO +An I/O error occurred while reading data from +.Fa special . +.It Bq Er EINTEGRITY +The backing store for +.Fa special +detected corrupted data while reading. .El .Pp The following errors can occur for a diff --git a/lib/libc/sys/open.2 b/lib/libc/sys/open.2 index 960cbbc7430..e9dd7b2d14b 100644 --- a/lib/libc/sys/open.2 +++ b/lib/libc/sys/open.2 @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd February 9, 2020 +.Dd March 30, 2020 .Dt OPEN 2 .Os .Sh NAME @@ -450,6 +450,8 @@ which the file is being created has been exhausted. An I/O error occurred while making the directory entry or allocating the inode for .Dv O_CREAT . +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er ETXTBSY The file is a pure procedure (shared text) file that is being executed and the diff --git a/lib/libc/sys/pathconf.2 b/lib/libc/sys/pathconf.2 index 4a4789069b5..62ec532705e 100644 --- a/lib/libc/sys/pathconf.2 +++ b/lib/libc/sys/pathconf.2 @@ -28,7 +28,7 @@ .\" @(#)pathconf.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 7, 2009 +.Dd March 30, 2020 .Dt PATHCONF 2 .Os .Sh NAME @@ -230,6 +230,8 @@ Search permission is denied for a component of the path prefix. Too many symbolic links were encountered in translating the pathname. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp The @@ -244,6 +246,8 @@ argument is not a valid open file descriptor. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr lseek 2 , diff --git a/lib/libc/sys/posix_fadvise.2 b/lib/libc/sys/posix_fadvise.2 index ac2bb73fdb9..0e4d25ac4c5 100644 --- a/lib/libc/sys/posix_fadvise.2 +++ b/lib/libc/sys/posix_fadvise.2 @@ -28,7 +28,7 @@ .\" @(#)madvise.2 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd October 3, 2015 +.Dd March 30, 2020 .Dt POSIX_FADVISE 2 .Os .Sh NAME @@ -124,6 +124,10 @@ argument does not refer to a regular file. The .Fa fd argument is associated with a pipe or FIFO. +.It Bq Er EIO +An I/O error occurred while reading from or writing to a file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr madvise 2 diff --git a/lib/libc/sys/posix_fallocate.2 b/lib/libc/sys/posix_fallocate.2 index 4fba3dd8761..8f59dc00f10 100644 --- a/lib/libc/sys/posix_fallocate.2 +++ b/lib/libc/sys/posix_fallocate.2 @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd November 4, 2017 +.Dd March 30, 2020 .Dt POSIX_FALLOCATE 2 .Os .Sh NAME @@ -112,6 +112,8 @@ argument was less than zero, or the operation is not supported by the file system. .It Bq Er EIO An I/O error occurred while reading from or writing to a file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er ENODEV The .Fa fd diff --git a/lib/libc/sys/quotactl.2 b/lib/libc/sys/quotactl.2 index f93090b0df4..0ab87324575 100644 --- a/lib/libc/sys/quotactl.2 +++ b/lib/libc/sys/quotactl.2 @@ -31,7 +31,7 @@ .\" @(#)quotactl.2 8.2 (Berkeley) 3/10/95 .\" $FreeBSD$ .\" -.Dd March 5, 1999 +.Dd March 30, 2020 .Dt QUOTACTL 2 .Os .Sh NAME @@ -228,6 +228,8 @@ An .Tn I/O error occurred while reading from or writing to a file containing quotas. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EFAULT An invalid .Fa addr diff --git a/lib/libc/sys/read.2 b/lib/libc/sys/read.2 index 68674f009e5..da4ca2de95a 100644 --- a/lib/libc/sys/read.2 +++ b/lib/libc/sys/read.2 @@ -28,7 +28,7 @@ .\" @(#)read.2 8.4 (Berkeley) 2/26/94 .\" $FreeBSD$ .\" -.Dd July 8, 2020 +.Dd March 30, 2020 .Dt READ 2 .Os .Sh NAME @@ -182,6 +182,8 @@ argument points outside the allocated address space. .It Bq Er EIO An I/O error occurred while reading from the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EBUSY Failed to read from a file, e.g. /proc//regs while is not stopped .It Bq Er EINTR diff --git a/lib/libc/sys/readlink.2 b/lib/libc/sys/readlink.2 index 2403764aa65..72aadef37cc 100644 --- a/lib/libc/sys/readlink.2 +++ b/lib/libc/sys/readlink.2 @@ -28,7 +28,7 @@ .\" @(#)readlink.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 10, 2008 +.Dd March 30, 2020 .Dt READLINK 2 .Os .Sh NAME @@ -108,6 +108,8 @@ Too many symbolic links were encountered in translating the pathname. The named file is not a symbolic link. .It Bq Er EIO An I/O error occurred while reading from the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EFAULT The .Fa buf diff --git a/lib/libc/sys/rename.2 b/lib/libc/sys/rename.2 index fb1b989cb7b..c67f6ebdc19 100644 --- a/lib/libc/sys/rename.2 +++ b/lib/libc/sys/rename.2 @@ -28,7 +28,7 @@ .\" @(#)rename.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 21, 2018 +.Dd March 30, 2020 .Dt RENAME 2 .Os .Sh NAME @@ -240,6 +240,8 @@ user's quota of disk blocks on the file system containing the directory has been exhausted. .It Bq Er EIO An I/O error occurred while making or updating a directory entry. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EROFS The requested link requires writing in a directory on a read-only file system. diff --git a/lib/libc/sys/rmdir.2 b/lib/libc/sys/rmdir.2 index 5fe464b3b72..de7331acdc3 100644 --- a/lib/libc/sys/rmdir.2 +++ b/lib/libc/sys/rmdir.2 @@ -28,7 +28,7 @@ .\" @(#)rmdir.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd December 9, 2006 +.Dd March 30, 2020 .Dt RMDIR 2 .Os .Sh NAME @@ -100,6 +100,8 @@ for a mounted file system. .It Bq Er EIO An I/O error occurred while deleting the directory entry or deallocating the inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EROFS The directory entry to be removed resides on a read-only file system. .It Bq Er EFAULT diff --git a/lib/libc/sys/sendfile.2 b/lib/libc/sys/sendfile.2 index 226bff88f5d..95f8509f8c2 100644 --- a/lib/libc/sys/sendfile.2 +++ b/lib/libc/sys/sendfile.2 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 25, 2019 +.Dd March 30, 2020 .Dt SENDFILE 2 .Os .Sh NAME @@ -336,6 +336,9 @@ is negative. .It Bq Er EIO An error occurred while reading from .Fa fd . +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from +.Fa fd . .It Bq Er ENOTCAPABLE The .Fa fd diff --git a/lib/libc/sys/stat.2 b/lib/libc/sys/stat.2 index a38dcee748d..8d8a0c0a417 100644 --- a/lib/libc/sys/stat.2 +++ b/lib/libc/sys/stat.2 @@ -28,7 +28,7 @@ .\" @(#)stat.2 8.4 (Berkeley) 5/1/95 .\" $FreeBSD$ .\" -.Dd December 5, 2018 +.Dd March 30, 2020 .Dt STAT 2 .Os .Sh NAME @@ -342,6 +342,8 @@ argument points to an invalid address. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er ELOOP Too many symbolic links were encountered in translating the pathname. .It Bq Er ENAMETOOLONG @@ -373,6 +375,8 @@ argument points to an invalid address. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EOVERFLOW The file size in bytes cannot be represented correctly in the structure pointed to by diff --git a/lib/libc/sys/statfs.2 b/lib/libc/sys/statfs.2 index e68c2caf72e..a865652022b 100644 --- a/lib/libc/sys/statfs.2 +++ b/lib/libc/sys/statfs.2 @@ -28,7 +28,7 @@ .\" @(#)statfs.2 8.5 (Berkeley) 5/24/95 .\" $FreeBSD$ .\" -.Dd February 13, 2017 +.Dd March 30, 2020 .Dt STATFS 2 .Os .Sh NAME @@ -204,6 +204,8 @@ points to an invalid address. An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp The @@ -225,6 +227,8 @@ points to an invalid address. An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr fhstatfs 2 , diff --git a/lib/libc/sys/swapon.2 b/lib/libc/sys/swapon.2 index 9a3d6607568..47acbc2dc17 100644 --- a/lib/libc/sys/swapon.2 +++ b/lib/libc/sys/swapon.2 @@ -28,7 +28,7 @@ .\" @(#)swapon.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd October 4, 2013 +.Dd March 30, 2020 .Dt SWAPON 2 .Os .Sh NAME @@ -115,6 +115,9 @@ is out of range (this indicates no device driver exists for the associated hardware). .It Bq Er EIO An I/O error occurred while opening the swap device. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system to open the +swap device. .El .Pp Lastly, diff --git a/lib/libc/sys/symlink.2 b/lib/libc/sys/symlink.2 index ec5f8d40bfe..3b88b0c6490 100644 --- a/lib/libc/sys/symlink.2 +++ b/lib/libc/sys/symlink.2 @@ -28,7 +28,7 @@ .\" @(#)symlink.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 10, 2008 +.Dd March 30, 2020 .Dt SYMLINK 2 .Os .Sh NAME @@ -151,6 +151,8 @@ The user's quota of inodes on the file system on which the symbolic link is being created has been exhausted. .It Bq Er EIO An I/O error occurred while making the directory entry or allocating the inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EFAULT The .Fa name1 diff --git a/lib/libc/sys/truncate.2 b/lib/libc/sys/truncate.2 index dfbe006965b..b4efd9b3f02 100644 --- a/lib/libc/sys/truncate.2 +++ b/lib/libc/sys/truncate.2 @@ -28,7 +28,7 @@ .\" @(#)truncate.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd May 4, 2015 +.Dd March 30, 2020 .Dt TRUNCATE 2 .Os .Sh NAME @@ -117,6 +117,8 @@ The argument was less than 0. .It Bq Er EIO An I/O error occurred updating the inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EFAULT The .Fa path diff --git a/lib/libc/sys/undelete.2 b/lib/libc/sys/undelete.2 index 981911259ae..cd1e9f17f66 100644 --- a/lib/libc/sys/undelete.2 +++ b/lib/libc/sys/undelete.2 @@ -29,7 +29,7 @@ .\" @(#)undelete.2 8.4 (Berkeley) 10/18/94 .\" $FreeBSD$ .\" -.Dd January 22, 2006 +.Dd March 30, 2020 .Dt UNDELETE 2 .Os .Sh NAME @@ -87,6 +87,8 @@ The last component of the path is .Ql .. . .It Bq Er EIO An I/O error occurred while updating the directory entry. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EROFS The name resides on a read-only file system. .It Bq Er EFAULT diff --git a/lib/libc/sys/unlink.2 b/lib/libc/sys/unlink.2 index 39e3095429a..65f5fab32ae 100644 --- a/lib/libc/sys/unlink.2 +++ b/lib/libc/sys/unlink.2 @@ -28,7 +28,7 @@ .\" @(#)unlink.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd December 1, 2017 +.Dd March 30, 2020 .Dt UNLINK 2 .Os .Sh NAME @@ -144,6 +144,8 @@ are owned by the effective user ID. .It Bq Er EIO An I/O error occurred while deleting the directory entry or deallocating the inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EROFS The named file resides on a read-only file system. .It Bq Er EFAULT diff --git a/lib/libc/sys/utimensat.2 b/lib/libc/sys/utimensat.2 index 3f5434230ca..a6294cdf685 100644 --- a/lib/libc/sys/utimensat.2 +++ b/lib/libc/sys/utimensat.2 @@ -31,7 +31,7 @@ .\" @(#)utimes.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 7, 2017 +.Dd March 30, 2020 .Dt UTIMENSAT 2 .Os .Sh NAME @@ -192,6 +192,8 @@ or .Dv UTIME_OMIT . .It Bq Er EIO An I/O error occurred while reading or writing the affected inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EPERM The .Fa times diff --git a/lib/libc/sys/utimes.2 b/lib/libc/sys/utimes.2 index 480ccebecdb..6831e504d1f 100644 --- a/lib/libc/sys/utimes.2 +++ b/lib/libc/sys/utimes.2 @@ -30,7 +30,7 @@ .\" @(#)utimes.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 9, 2016 +.Dd March 30, 2020 .Dt UTIMES 2 .Os .Sh NAME @@ -165,6 +165,8 @@ component of at least one of the values specified by the argument has a value less than 0 or greater than 999999. .It Bq Er EIO An I/O error occurred while reading or writing the affected inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er ELOOP Too many symbolic links were encountered in translating the pathname. .It Bq Er ENAMETOOLONG diff --git a/lib/libc/sys/write.2 b/lib/libc/sys/write.2 index f9918cdc3cb..fb70c5e4186 100644 --- a/lib/libc/sys/write.2 +++ b/lib/libc/sys/write.2 @@ -28,7 +28,7 @@ .\" @(#)write.2 8.5 (Berkeley) 4/2/94 .\" $FreeBSD$ .\" -.Dd December 1, 2017 +.Dd March 30, 2020 .Dt WRITE 2 .Os .Sh NAME @@ -205,6 +205,12 @@ is greater than if the sysctl .Va debug.iosize_max_clamp is non-zero). +.It Bq Er EINTEGRITY +The backing store for +.Fa fd +detected corrupted data while reading. +(For example, writing a partial filesystem block may require first reading +the existing block which may trigger this error.) .El .Pp In addition, diff --git a/share/man/man9/VOP_READDIR.9 b/share/man/man9/VOP_READDIR.9 index bac1f3f5fa6..3f4d9b56663 100644 --- a/share/man/man9/VOP_READDIR.9 +++ b/share/man/man9/VOP_READDIR.9 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 24, 1996 +.Dd March 30, 2020 .Dt VOP_READDIR 9 .Os .Sh NAME @@ -100,6 +100,8 @@ Memory for the cookies should be allocated using: An attempt was made to read from an illegal offset in the directory. .It Bq Er EIO A read error occurred while reading the directory. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading the directory. .El .Sh SEE ALSO .Xr vnode 9 diff --git a/share/man/man9/VOP_READLINK.9 b/share/man/man9/VOP_READLINK.9 index c1883c1e99c..ac07afc84f2 100644 --- a/share/man/man9/VOP_READLINK.9 +++ b/share/man/man9/VOP_READLINK.9 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 24, 1996 +.Dd March 30, 2020 .Dt VOP_READLINK 9 .Os .Sh NAME @@ -58,6 +58,8 @@ Zero is returned on success, otherwise an error code is returned. .Bl -tag -width Er .It Bq Er EIO A read error occurred while reading the contents of the symlink. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading the contents of the symlink. .El .Sh SEE ALSO .Xr uiomove 9 , diff --git a/share/man/man9/g_data.9 b/share/man/man9/g_data.9 index 724854e23dc..698195019c4 100644 --- a/share/man/man9/g_data.9 +++ b/share/man/man9/g_data.9 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 16, 2004 +.Dd March 30, 2020 .Dt G_DATA 9 .Os .Sh NAME @@ -103,6 +103,8 @@ Possible errors: .Bl -tag -width Er .It Bq Er EIO An I/O error occurred while reading from or writing to the consumer. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the consumer. .El .Sh SEE ALSO .Xr geom 4 , -- 2.45.0