svn commit: r325320 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs [breaks lld on zfs: lld uses fallocate]
Mark Millard
markmi at dsl-only.net
Sat Nov 4 20:13:10 UTC 2017
On 2017-Nov-4, at 4:58 AM, Ed Maste <emaste at freebsd.org> wrote:
> On 4 November 2017 at 07:41, Andriy Gapon <avg at freebsd.org> wrote:
>> On 04/11/2017 12:32, Mark Millard wrote:
>>> if (int Err = ::posix_fallocate(FD, 0, Size)) {
>>> if (Err != EOPNOTSUPP)
>>> return std::error_code(Err, std::generic_category());
>>> }
>>
>> The commit message that you didn't include into your reply contains some useful
>> information that authors / maintainers of this code should probably take into
>> account:
>>
>>> Please note that EINVAL is used to report that the underlying file system
>>> does not support the operation (POSIX.1-2008).
>>
>> Here is a link for that:
>> http://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_fallocate.html
>
> I have no idea how they decided EINVAL was a reasonable errno for this case.
I think they viewed it as a bad fd argument: a reference
into a wrong file system, much like a wrong len (<0) or
offset (<0).
That there is no other means of run-time classifying the
file system(s)(?) was not viewed as sufficient reason
to give it a different classification.
But it is just a guess.
===
Mark Millard
markmi at dsl-only.net
More information about the freebsd-current
mailing list