Populate the write buffer with the content of rw_buf before writing