svn commit: r325523 - stable/11/contrib/llvm/lib/Support/Unix
Ed Maste
emaste at FreeBSD.org
Wed Nov 8 00:40:20 UTC 2017
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
More information about the svn-src-stable-11
mailing list