aboutsummaryrefslogtreecommitdiff
path: root/zenstore/basicfile.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-04-12 14:15:37 +0200
committerDan Engelbrecht <[email protected]>2022-04-12 14:16:34 +0200
commit7947f31d84e1b45f9b777095b3f32339b89a19b9 (patch)
tree2e2cf0569a2ec14e6c90df482008e67dd75030ee /zenstore/basicfile.cpp
parentswitch posix_fallocate to fallocate on MacOS (diff)
downloadzen-7947f31d84e1b45f9b777095b3f32339b89a19b9.tar.xz
zen-7947f31d84e1b45f9b777095b3f32339b89a19b9.zip
remove fallocate on MacOS
Diffstat (limited to 'zenstore/basicfile.cpp')
-rw-r--r--zenstore/basicfile.cpp8
1 files changed, 0 insertions, 8 deletions
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)