Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Feb 2018 00:20:20 +0100
From:      Willem Jan Withagen <wjw@digiware.nl>
To:        Alan Somers <asomers@freebsd.org>
Cc:        Ian Lepore <ian@freebsd.org>, freebsd current <freebsd-current@freebsd.org>
Subject:   Re: posix_fallocate on ZFS
Message-ID:  <df0dc948-b744-44e7-cccd-e29e69c441c6@digiware.nl>
In-Reply-To: <CAOtMX2gQOf%2BJYCWCVp_6zGm%2B3F=Qx3u2FckU9TEyDhkJjk6Dmg@mail.gmail.com>
References:  <1e2f43fd-85da-6629-62d1-6e96790278e5@digiware.nl> <CAOtMX2jZr_kvJgOZWeiB-AZ3-7-uUu%2BUQ3P0nKhGZ0eNRzwMOQ@mail.gmail.com> <1518291799.32585.228.camel@freebsd.org> <4fa8de06-c7a0-5585-4fa7-5bf59b99d627@digiware.nl> <CAOtMX2gQOf%2BJYCWCVp_6zGm%2B3F=Qx3u2FckU9TEyDhkJjk6Dmg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11/02/2018 00:10, Alan Somers wrote:
> On Sat, Feb 10, 2018 at 3:50 PM, Willem Jan Withagen <wjw@digiware.nl 
> <mailto:wjw@digiware.nl>> wrote:
> 
>     On 10/02/2018 20:43, Ian Lepore wrote:
> 
>         On Sat, 2018-02-10 at 11:24 -0700, Alan Somers wrote:
> 
>             On Sat, Feb 10, 2018 at 10:28 AM, Willem Jan Withagen
>             wrote:
> 
> 
>                 Hi,
> 
>                 This has been disabled on ZFS since last November.
>                 And I do understand the rationale on this.
> 
>                 BUT
> 
>                 I've now upgraded some of my HEAD Ceph test systems and
>                 they now fail,
>                 since Ceph uses posix_fallocate() to allocate space for the
>                 FileStore-journal.
> 
>                 Is there any expectation that this is going to fixed in
>                 any near future?
> 
>                 --WjW
> 
>             No.  It's fundamentally impossible to support
>             posix_fallocate on a COW
>             filesystem like ZFS.  Ceph should be taught to ignore an
>             EINVAL result,
>             since the system call is merely advisory.
> 
>             -Alan
> 
> 
>         Unfortunately, posix documents that the function returns EINVAL only
>         due to bad input parameters, so ignoring that seems like a bad idea.
> 
>         Wouldn't it be better if we returned EOPNOTSUP if that's the actual
>         situation?  That could be safely ignored.
> 
> 
>     I would probably help in my situation....
> 
>     And I've been looking at the manpage, but cannot seem to find any
>     indication that EINVAL is returned on running it on FreeBSD.
> 
> 
> It's in the manpage, but only on head.  It hasn't been in any stable 
> release yet.
> https://svnweb.freebsd.org/base/head/lib/libc/sys/posix_fallocate.2?revision=325422&view=markup#l112

Right, it is. And it is even in the man-page were I looked. :(
Just plainly read over it.

To be honest I would expect it to have a bit more proza in the header of 
the manpage. Because it is rather significant that it does not work on 
certain FSes. And not just hide this in a single line in the explanation 
of an error value...

--WjW




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?df0dc948-b744-44e7-cccd-e29e69c441c6>