From owner-freebsd-toolchain@freebsd.org Sat Nov 4 11:41:11 2017 Return-Path: Delivered-To: freebsd-toolchain@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 81334E6C055; Sat, 4 Nov 2017 11:41:11 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com [209.85.215.50]) (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 120816ACA4; Sat, 4 Nov 2017 11:41:10 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf0-f50.google.com with SMTP id a2so5795734lfh.11; Sat, 04 Nov 2017 04:41:10 -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:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kycv5RGcFMNZ810lqDKIhBMCPOmTxS8FkzejgV7H/s0=; b=j+JcFbbiq4lvVSCUkOY/BFtUoVHHuPJvh7lsSh3djdEbBJ+u1sXV7lhsfq6rr4iUQZ fdArP/LuFsMU4oLL8w+XrcKlQ1614sL1imfJlGCT3paoXs/0nwE2gcLmORG0fiuzX/51 /fb5VJ+yyAZ8Sa+/9UQC4fcIVqJPX/IohGgcP6bguhfk6+gD01KqJ35CTZdETKiO1al4 5CszKTC0kw3MhnP7M22EjVaioqa3tL8jzgVEIg4MwcKHDTVWEBaYNjCw4aSwGKhYbj3p YL2uvv2a+hJL9aNtwAbqPRAfUOs1SQM8aIFMs8kvSg2/TMYMGeys6DbtHdkeQ9EzFRGP lfnw== X-Gm-Message-State: AJaThX6JCx2DGt6UGM9wxCTcTWw8lpzo5ViL7kNJdr8QAOZSLzAw3o2W fD8EozGO9cDwQt+OIaajvJT3o7+Y X-Google-Smtp-Source: ABhQp+SivUYWUCi1d6hf9yk9gRN4Eo/JH8hcYed5/0PfDF5KRjkIfe67ZK4EvpG+M2JMUlpI7jN/hA== X-Received: by 10.25.38.21 with SMTP id m21mr3513825lfm.95.1509795663218; Sat, 04 Nov 2017 04:41:03 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id j71sm1456581lfk.6.2017.11.04.04.41.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Nov 2017 04:41:02 -0700 (PDT) Subject: Re: svn commit: r325320 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs [breaks lld on zfs: lld uses fallocate] To: Mark Millard , FreeBSD Toolchain , svn-src-head@freebsd.org, FreeBSD Current References: <6140C4E2-168F-4E5D-B3C2-717ECB67C980@dsl-only.net> From: Andriy Gapon Message-ID: <134eea8e-1a2e-d77c-f7fa-01e14db7f47b@FreeBSD.org> Date: Sat, 4 Nov 2017 13:41:00 +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: <6140C4E2-168F-4E5D-B3C2-717ECB67C980@dsl-only.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Nov 2017 11:41:11 -0000 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 -- Andriy Gapon