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
This commit is contained in:
@@ -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 by
|
||||
|
||||
Reference in New Issue
Block a user