Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Feb 2018 12:47:48 -0700
From:      Ian Lepore <ian@freebsd.org>
To:        Alan Somers <asomers@freebsd.org>
Cc:        Willem Jan Withagen <wjw@digiware.nl>, freebsd current <freebsd-current@freebsd.org>
Subject:   Re: posix_fallocate on ZFS
Message-ID:  <1518292068.32585.230.camel@freebsd.org>
In-Reply-To: <CAOtMX2jeEHowvTCmBe5=kdArtw9okCd42JmaQnZteidJray_jA@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> <CAOtMX2jeEHowvTCmBe5=kdArtw9okCd42JmaQnZteidJray_jA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 2018-02-10 at 12:45 -0700, Alan Somers wrote:
> On Sat, Feb 10, 2018 at 12:43 PM, Ian Lepore <ian@freebsd.org> 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'm afraid you are mistaken.  Posix _should've_ required EOPNOTSUP in this,
> but it actually requires EINVAL.
> 
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_fallocate.html

Oops, I apparently was looking at the prior version of the spec.
 Nevermind. :)

-- Ian




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1518292068.32585.230.camel>