[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Implement sharding for FSFS

From: David Glasser <glasser_at_mit.edu>
Date: 2007-04-04 20:37:49 CEST

On 4/4/07, Malcolm Rowe <malcolm@farside.org.uk> wrote:
> +/* Write the format number and maximum number of files per directory
> + to a new format file in PATH.
> +
> + Use POOL for temporary allocation. */
> +static svn_error_t *
> +write_format(const char *path, int format, int max_files_per_dir,
> + apr_pool_t *pool)
> +{
> + /* svn_io_write_version_file() does a load of magic to allow it to
> + replace version files that already exist. Luckily, we never need to
> + do that. */
> + const char *contents;
> +
> + assert (format > 0);
> + if (format >= SVN_FS_FS__MIN_LAYOUT_FORMAT_OPTION_FORMAT)
> + {
> + if (max_files_per_dir)
> + contents = apr_psprintf(pool,
> + "%d\n"
> + "layout sharded %d\n",
> + format, max_files_per_dir);
> + else
> + contents = apr_psprintf(pool,
> + "%d\n"
> + "linear", format);
> + }

I haven't had a chance to test this, but doesn't this want to be
"layout linear\n", not just "linear"?

The feature looks like the right design to me.

--dave

-- 
David Glasser | glasser_at_mit.edu | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Apr 4 20:38:02 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.