From owner-freebsd-current@freebsd.org Sat Nov 4 12:10:34 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A695AE6D0AC; Sat, 4 Nov 2017 12:10:34 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 290C36BF56; Sat, 4 Nov 2017 12:10:33 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf0-f65.google.com with SMTP id e143so5842347lfg.12; Sat, 04 Nov 2017 05:10:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=KHneKq/CsIbqx1L+hr7XQMrEsisMCVmW6RTxw1G7TUQ=; b=NDM3pj5Hqim9SZx0QWX5/tKWJdWXFSpnp0S1JGkG2qqnBKB/XeNSGMGmqPVAHy0lME CLzBxCRD6zIdZFyqC/JX9d3EBShGUW0coke1yv3XY9mxZCW9SQa26ecRXW0J/3AMm8hP /NAGoZDmrECe74IevX/bgyL4OUfvBG2h7l+0Gim42apHh1U+Ww0mKBHIeAFbE+jDaEsA 1ZykUp6S/+QdSWvPHXlw7o9f1sCtiwu/L4s0MWWRSU0mHpjtm+T00VRXVL5OGEC05SwT 9F2gUK2qEvwxEgwgJQhAKZvmX0iE3PU2vgTjZzexBuM6nqnCSkwqUCf2WijzSxdL77ri N7tw== X-Gm-Message-State: AMCzsaXvaR6BPTKDCceH9tDnDAtQcj03gOSSMy5FGBMZKL84ynijTspQ H8wHRt5c8CupnvGSyYlHX4X4CgCh X-Google-Smtp-Source: ABhQp+T4yzOy9RXHnmaiarekGlpF5BXc2aazH27GPQlOAYSxXrMzETg+hwsplJJDyANR0IV3RVCsRQ== X-Received: by 10.25.21.233 with SMTP id 102mr3515130lfv.252.1509797100412; Sat, 04 Nov 2017 05:05:00 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id b14sm1739150ljb.74.2017.11.04.05.04.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Nov 2017 05:04:59 -0700 (PDT) Subject: Re: svn commit: r325320 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs [breaks lld on zfs: lld uses fallocate] From: Andriy Gapon To: Mark Millard , FreeBSD Toolchain , svn-src-head@freebsd.org, FreeBSD Current References: <6140C4E2-168F-4E5D-B3C2-717ECB67C980@dsl-only.net> <134eea8e-1a2e-d77c-f7fa-01e14db7f47b@FreeBSD.org> Message-ID: Date: Sat, 4 Nov 2017 14:04:58 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <134eea8e-1a2e-d77c-f7fa-01e14db7f47b@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 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, 04 Nov 2017 12:10:34 -0000 On 04/11/2017 13:41, Andriy Gapon 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 > My response above is quite dry, so I want to add this. Thank you very much for the deep analysis. I am sorry for the trouble that my change caused, but I think that its root cause lies elsewhere (lld, posix). -- Andriy Gapon