Date: Wed, 5 Nov 2025 00:31:17 GMT From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 737edb8fb52b - main - posix_fallocate(2): move unsupported case to EOPNOTSUPP Message-ID: <202511050031.5A50VHc5028363@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=737edb8fb52b6ed13ae4e09553a0d2ae2899cede commit 737edb8fb52b6ed13ae4e09553a0d2ae2899cede Author: Kyle Evans <kevans@FreeBSD.org> AuthorDate: 2025-11-05 00:30:59 +0000 Commit: Kyle Evans <kevans@FreeBSD.org> CommitDate: 2025-11-05 00:30:59 +0000 posix_fallocate(2): move unsupported case to EOPNOTSUPP ZFS has since been changed to use EOPNOTSUPP instead of EINVAL, and fusefs/nfs are following suit. POSIX Issue 8 had also made this move, so it makes sense for us to standardize on EOPNOTSUPP. Note in the HISTORY section where we're diverging from our previous versions to align with the new standard. Reviewed by: asomers, imp (both previous version), kib Differential Revision: https://reviews.freebsd.org/D53537 --- lib/libsys/posix_fallocate.2 | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/lib/libsys/posix_fallocate.2 b/lib/libsys/posix_fallocate.2 index 8be075b41331..94858c4a0f90 100644 --- a/lib/libsys/posix_fallocate.2 +++ b/lib/libsys/posix_fallocate.2 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 30, 2020 +.Dd November 2, 2025 .Dt POSIX_FALLOCATE 2 .Os .Sh NAME @@ -105,8 +105,7 @@ The .Fa len argument was less than or equal to zero, the .Fa offset -argument was less than zero, -or the operation is not supported by the file system. +argument was less than zero. .It Bq Er EIO An I/O error occurred while reading from or writing to a file system. .It Bq Er EINTEGRITY @@ -123,6 +122,8 @@ media. The file descriptor .Fa fd has insufficient rights. +.It Bq Er EOPNOTSUPP +The operation is not supported by the file system. .It Bq Er ESPIPE The .Fa fd @@ -137,12 +138,29 @@ argument is associated with a pipe or FIFO. The .Fn posix_fallocate system call conforms to -.St -p1003.1-2004 . +.St -p1003.1-2024 . .Sh HISTORY The .Fn posix_fallocate function appeared in .Fx 9.0 . +.Pp +Previous versions of +.Nm +used +.Er EINVAL +to indicate that the operation is not supported by the file system, as specified +in +.St -p1003.1 +Base Specifications, Issue 7. +.St -p1003.1 +Base Specifications, Issue 8 switched to requiring +.Er EOPNOTSUPP +for this error case. +ZFS adopted the latter convention in +.Fx 15.0 , +and the remaining filesystems in base adopted it in +.Fx 15.1 . .Sh AUTHORS .Fn posix_fallocate and this manual page were initially written byhelp
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202511050031.5A50VHc5028363>
