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.
write_request.aio_offset = current_block_index * block_size;
        #endif
        while (io_submit(aio_context.ctx, 1, &write_request_ptr) < 0)
        {
            if (errno != EINTR)
                throw Exception(ErrorCodes::CANNOT_IO_SUBMIT, "Cannot submit request for asynchronous IO on file {}", file_path);
        }
        
        io_event event;
        while (io_getevents(aio_context.ctx, 1, 1, &event, nullptr) < 0)
        {
            if (errno != EINTR)
                throw Exception(ErrorCodes::CANNOT_IO_GETEVENTS, "Failed to wait for asynchronous IO completion on file {}", file_path);
        }
        
        __msan_unpoison(&event, sizeof(event));
        auto bytes_written = eventResult(event);
        ProfileEvents::increment(ProfileEvents::AIOWrite);
        ProfileEvents::increment(ProfileEvents::AIOWriteBytes, bytes_written);
        if (bytes_written != static_cast<decltype(bytes_written)>(block_size * buffer_size_in_blocks))
            throw Exception(ErrorCodes::AIO_WRITE_ERROR,
                "Not all data was written for asynchronous IO on file {}. returned: {}",
                file_path,
                std::to_string(bytes_written));
        if (::fsync(file.fd) < 0)
            throwFromErrnoWithPath("Cannot fsync " + file_path, file_path, ErrorCodes::CANNOT_FSYNC);
        current_block_index += buffer_size_in_blocks;
        return true;
    }
    bool readKeys(size_t block_start, size_t blocks_length, PaddedPODArray<KeyType> & out) const