+
+ /* Write all the data in the buffer to the disk together with any
+ * additional space at the end of the buffer up to the first
+ * multiple of BLOCK_SIZE. The last block is always written to the
+ * disk despite not being fully filled. If the last block is not
+ * fully filled, we keep it (moved to the begginig of the buffer)
+ * and any subsequent call to this function will rewrite the block
+ * together with the additional data added to the buffer. */