[PATCH] D39464: Define fs::allocate_file which preallocates disk blocks.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 12 23:56:19 PST 2017
ruiu added inline comments.
================
Comment at: llvm/lib/Support/Unix/Path.inc:436
return std::error_code(Err, std::generic_category());
+ return make_error_code(errc::function_not_supported);
}
----------------
krytarowski wrote:
> NetBSD needs `ftruncate`(2) as a fallback for `posix_fallocate`(2).
>
> In the default setup `posix_fallocate`() returns EOPNOTSUPP.
The current code use ftruncate if the function is available. So it doesn't use it as a fallback, but it uses only fallocate. It seems like a OK behavior to me on NetBSD if posix_fallocate always returns EOPNOTSUPP, but can you confirm?
https://reviews.llvm.org/D39464
More information about the llvm-commits
mailing list