D D <ddw...@gmail.com> writes:

> I'd be interested to know if svnadmin employs some memory buffer to
> hot-copy.
> The offsets where data corruption starts look like multiples of 0x1000
> which is 4K.
> The NTFS cluster size on the disk is exactly 4K.
> If svnadmin just calls the OS to copy each file the problem should either
> be in the OS
> or the disk.

Hotcopy uses libsvn_subr/io.c:copy_contents where SVN__STREAM_CHUNK_SIZE
is 16384:

  /* Copy bytes till the cows come home. */
  while (1)
    {
      char buf[SVN__STREAM_CHUNK_SIZE];
      apr_size_t bytes_this_time = sizeof(buf);
      apr_status_t read_err;
      apr_status_t write_err;

      /* Read 'em. */
      read_err = apr_file_read(from_file, buf, &bytes_this_time);
      if (read_err && !APR_STATUS_IS_EOF(read_err))
        {
          return read_err;
        }

      /* Write 'em. */
      write_err = apr_file_write_full(to_file, buf, bytes_this_time, NULL);
      if (write_err)
        {
          return write_err;
        }

      if (read_err && APR_STATUS_IS_EOF(read_err))
        {
          /* Return the results of this close: an error, or success. */
          return APR_SUCCESS;
        }
    }


-- 
Philip

Reply via email to