From owner-freebsd-current@freebsd.org Sat Feb 10 23:20:23 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 B32EDF05DE2 for ; Sat, 10 Feb 2018 23:20:23 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (smtp.digiware.nl [176.74.240.9]) (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 51E977851C; Sat, 10 Feb 2018 23:20:23 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from router.digiware.nl (localhost.digiware.nl [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id 2CD6E2EB80; Sun, 11 Feb 2018 00:20:21 +0100 (CET) X-Virus-Scanned: amavisd-new at digiware.com Received: from smtp.digiware.nl ([127.0.0.1]) by router.digiware.nl (router.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6cz0TGT_a3Yz; Sun, 11 Feb 2018 00:20:20 +0100 (CET) Received: from [192.168.11.152] (unknown [192.168.11.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.digiware.nl (Postfix) with ESMTPSA id 8FC9F2EB7F; Sun, 11 Feb 2018 00:20:20 +0100 (CET) Subject: Re: posix_fallocate on ZFS To: Alan Somers Cc: Ian Lepore , freebsd current References: <1e2f43fd-85da-6629-62d1-6e96790278e5@digiware.nl> <1518291799.32585.228.camel@freebsd.org> <4fa8de06-c7a0-5585-4fa7-5bf59b99d627@digiware.nl> From: Willem Jan Withagen Message-ID: Date: Sun, 11 Feb 2018 00:20:20 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB 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 23:20:23 -0000 On 11/02/2018 00:10, Alan Somers wrote: > On Sat, Feb 10, 2018 at 3:50 PM, Willem Jan Withagen > 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