File size is updated correctly according to 

> fdatasync() is similar to fsync(), but does not flush modified metadata unless that metadata is needed in order to allow a subsequent data retrieval to be correctly handled.  For example, changes to  st_atime  or  st_mtime  (respec‐
       tively,  time  of  last  access  and  time  of last modification; see inode(7)) do not require flushing because they are not necessary for a subsequent data read to be handled correctly.  On the other hand, a change to the file size
       (st_size, as made by say ftruncate(2)), would require a metadata flush.

And we don't care about modification times.
Should work alright.
{
        size_t check_sum = static_cast<size_t>(CityHash_v1_0_2::CityHash64(block_data + block_header_check_sum_size, block_size - block_header_check_sum_size));
        std::memcpy(block_data, &check_sum, sizeof(size_t));
    }
    inline size_t getBlockSize() const { return block_size; }
    
    inline char * getBlockData() const { return block_data; }
    
    
    void readSimpleKeys(PaddedPODArray<UInt64> & simple_keys) const
    {
        char * block_start = block_data + block_header_size;
        char * block_end = block_data + block_size;
        static constexpr size_t key_prefix_size = sizeof(UInt64) + sizeof(size_t);
        while (block_start + key_prefix_size < block_end)
        {
            UInt64 key = unalignedLoad<UInt64>(block_start);
            block_start += sizeof(UInt64);
            size_t allocated_size = unalignedLoad<size_t>(block_start);
            block_start += sizeof(size_t);
            
            if (allocated_size == 0)
                break;
            simple_keys.emplace_back(key);
            block_start += allocated_size;
        }
    }
    void readComplexKeys(PaddedPODArray<StringRef> & complex_keys) const