Date: Wed, 8 Nov 2017 00:39:04 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325523 - stable/11/contrib/llvm/lib/Support/Unix Message-ID: <201711080039.vA80d4Vj061725@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Wed Nov 8 00:39:04 2017 New Revision: 325523 URL: https://svnweb.freebsd.org/changeset/base/325523 Log: MFC r325420: lld: accept EINVAL to indicate posix_fallocate is unsupported As of r325320 posix_fallocate on a ZFS filesystem returns EINVAL to indicate that the operation is not supported. (I think this is a strange choice of errno on the part of POSIX.) PR: 223383, 223440 Reported by: Mark Millard Sponsored by: The FreeBSD Foundation Modified: stable/11/contrib/llvm/lib/Support/Unix/Path.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/llvm/lib/Support/Unix/Path.inc ============================================================================== --- stable/11/contrib/llvm/lib/Support/Unix/Path.inc Tue Nov 7 23:52:14 2017 (r325522) +++ stable/11/contrib/llvm/lib/Support/Unix/Path.inc Wed Nov 8 00:39:04 2017 (r325523) @@ -427,7 +427,7 @@ std::error_code resize_file(int FD, uint64_t Size) { // If we have posix_fallocate use it. Unlike ftruncate it always allocates // space, so we get an error if the disk is full. if (int Err = ::posix_fallocate(FD, 0, Size)) { - if (Err != EOPNOTSUPP) + if (Err != EINVAL && Err != EOPNOTSUPP) return std::error_code(Err, std::generic_category()); } #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711080039.vA80d4Vj061725>