Page MenuHomeFreeBSD

fusefs: standardize on OPNOTSUPP for posix_fallocate(2)
ClosedPublic

Authored by kevans on Sun, Nov 2, 3:20 PM.
Tags
None
Referenced Files
F134900114: D53535.id165677.diff
Wed, Nov 5, 2:44 AM
F134900113: D53535.id165684.diff
Wed, Nov 5, 2:44 AM
F134900096: D53535.id165680.diff
Wed, Nov 5, 2:44 AM
F134878864: D53535.diff
Wed, Nov 5, 12:20 AM
F134724505: D53535.diff
Tue, Nov 4, 5:04 AM
Unknown Object (File)
Mon, Nov 3, 2:33 AM
Unknown Object (File)
Sun, Nov 2, 10:39 PM
Unknown Object (File)
Sun, Nov 2, 10:36 PM
Subscribers

Details

Summary

POSIX Issue 7 had allowed EINVAL for this case, but issue 8 moves it
to ENOTSUP instead. ZFS uses the latter and we have some software in
ports already that's wanting to use that to detect the filesystem not
supporting it, so let's standardize on it.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kevans requested review of this revision.Sun, Nov 2, 3:20 PM
This revision is now accepted and ready to land.Sun, Nov 2, 3:25 PM
asomers requested changes to this revision.Sun, Nov 2, 3:32 PM

You must also update the test cases in tests/sys/fs/fusefs/fallocate.cc . In particular, I think that the PosixFallocate.eopnotsupp will fail now, unless you update it.

This revision now requires changes to proceed.Sun, Nov 2, 3:32 PM

Fix observed test failures; there's only a few places that we expect EINVAL.

asomers requested changes to this revision.Sun, Nov 2, 4:34 PM
asomers added inline comments.
sys/fs/fuse/fuse_vnops.c
666

I think you should also change this line to EOPNOTSUPP.

This revision now requires changes to proceed.Sun, Nov 2, 4:34 PM
kevans marked an inline comment as done.

Correct it for the file-specific unsupported mode as well

+ Two more adjusted return values to fix the test

sys/fs/fuse/fuse_vnops.c
666

Bah, yes, sorry- not sure how I missed that one.

This revision is now accepted and ready to land.Sun, Nov 2, 5:19 PM