From 7947f31d84e1b45f9b777095b3f32339b89a19b9 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Tue, 12 Apr 2022 14:15:37 +0200 Subject: remove fallocate on MacOS --- zenstore/basicfile.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'zenstore/basicfile.cpp') diff --git a/zenstore/basicfile.cpp b/zenstore/basicfile.cpp index a3e1c4f20..8eb172a1c 100644 --- a/zenstore/basicfile.cpp +++ b/zenstore/basicfile.cpp @@ -352,14 +352,6 @@ BasicFile::SetFileSize(uint64_t FileSize) ThrowSystemError(Error, fmt::format("Failed to set truncate file to {} for file {}", FileSize, PathFromHandle(m_FileHandle))); } } - if (FileSize > 0) - { - int Error = fallocate(Fd, 0, (off_t)FileSize); - if (Error) - { - ThrowSystemError(Error, fmt::format("Failed to allocate space of {} for file {}", FileSize, PathFromHandle(m_FileHandle))); - } - } #else int Fd = int(intptr_t(m_FileHandle)); if (ftruncate64(Fd, (off64_t)FileSize) < 0) -- cgit v1.2.3