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
Unknown Object (File)
Wed, Nov 5, 7:34 AM
Unknown Object (File)
Wed, Nov 5, 5:06 AM
Unknown Object (File)
Wed, Nov 5, 5:06 AM
Unknown Object (File)
Wed, Nov 5, 2:44 AM
Unknown Object (File)
Wed, Nov 5, 2:44 AM
Unknown Object (File)
Wed, Nov 5, 2:44 AM
Unknown Object (File)
Wed, Nov 5, 12:20 AM
Unknown Object (File)
Tue, Nov 4, 5:04 AM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 68355
Build 65238: arc lint + arc unit

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