diff options
| author | Dan Engelbrecht <[email protected]> | 2022-03-31 10:14:44 +0200 |
|---|---|---|
| committer | Dan Engelbrecht <[email protected]> | 2022-03-31 11:29:28 +0200 |
| commit | 3aebe78d461778bd743d63e1a296fcc7df564911 (patch) | |
| tree | ebdd9f2b12d9c3f140b11078e09d33ceb7252635 /zenstore/blockstore.cpp | |
| parent | improved logging for gc/migration (diff) | |
| download | zen-3aebe78d461778bd743d63e1a296fcc7df564911.tar.xz zen-3aebe78d461778bd743d63e1a296fcc7df564911.zip | |
Truncate migrated and new blocks after gc to save disk space
Diffstat (limited to 'zenstore/blockstore.cpp')
| -rw-r--r-- | zenstore/blockstore.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/zenstore/blockstore.cpp b/zenstore/blockstore.cpp index 350d9bb39..7eb73101a 100644 --- a/zenstore/blockstore.cpp +++ b/zenstore/blockstore.cpp @@ -91,6 +91,12 @@ BlockStoreFile::Write(const void* Data, uint64_t Size, uint64_t FileOffset) } void +BlockStoreFile::Truncate(uint64_t Size) +{ + m_File.SetFileSize(Size); +} + +void BlockStoreFile::Flush() { m_File.Flush(); |