From owner-freebsd-current@freebsd.org Sat Feb 10 19:47:55 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 391C7F186D8 for ; Sat, 10 Feb 2018 19:47:55 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD93A6EC8D for ; Sat, 10 Feb 2018 19:47:54 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 4671ad4b-0e9b-11e8-91c6-33ffc249f3e8 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id 4671ad4b-0e9b-11e8-91c6-33ffc249f3e8; Sat, 10 Feb 2018 19:47:51 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w1AJlm4i030026; Sat, 10 Feb 2018 12:47:48 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1518292068.32585.230.camel@freebsd.org> Subject: Re: posix_fallocate on ZFS From: Ian Lepore To: Alan Somers Cc: Willem Jan Withagen , freebsd current Date: Sat, 10 Feb 2018 12:47:48 -0700 In-Reply-To: References: <1e2f43fd-85da-6629-62d1-6e96790278e5@digiware.nl> <1518291799.32585.228.camel@freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Feb 2018 19:47:55 -0000 On Sat, 2018-02-10 at 12:45 -0700, Alan Somers wrote: > On Sat, Feb 10, 2018 at 12:43 PM, 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'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