You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2014/06/30 16:01:42 UTC
svn commit: r1606744 - /subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
Author: stefan2
Date: Mon Jun 30 14:01:42 2014
New Revision: 1606744
URL: http://svn.apache.org/r1606744
Log:
Create r0 contents only after initializing the config data, thus
removing the need to temporarily initialize parts of the FFD.
* subversion/libsvn_fs_fs/fs_fs.c
(write_revision_zero): Remove FFD init bits.
(svn_fs_fs__create): Write r0 only after initializing all in-memory data.
Modified:
subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c?rev=1606744&r1=1606743&r2=1606744&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Mon Jun 30 14:01:42 2014
@@ -1483,7 +1483,6 @@ write_revision_zero(svn_fs_t *fs,
svn_fs_fs__p2l_entry_t *entry;
svn_fs_fs__revision_file_t *rev_file;
const char *l2p_proto_index, *p2l_proto_index;
- fs_fs_data_t *ffd = fs->fsap_data;
/* Write a skeleton r0 with no indexes. */
SVN_ERR(svn_io_file_create(path_revision_zero,
@@ -1524,13 +1523,6 @@ write_revision_zero(svn_fs_t *fs,
entry->item.number = SVN_FS_FS__ITEM_INDEX_CHANGES;
APR_ARRAY_PUSH(index_entries, svn_fs_fs__p2l_entry_t *) = entry;
- /* If the config file has not been initialized, yet, set some defaults
- here for r0. r0 is so small we could do with any non-zero values. */
- if (ffd->l2p_page_size == 0)
- ffd->l2p_page_size = 0x2000;
- if (ffd->p2l_page_size == 0)
- ffd->p2l_page_size = 0x10000;
-
/* Now re-open r0, create proto-index files from our entries and
rewrite the index section of r0. */
SVN_ERR(svn_fs_fs__open_pack_or_rev_file_writable(&rev_file, fs, 0,
@@ -1664,8 +1656,6 @@ svn_fs_fs__create(svn_fs_t *fs,
SVN_ERR(svn_io_file_create_empty(svn_fs_fs__path_lock(fs, pool), pool));
SVN_ERR(svn_fs_fs__set_uuid(fs, NULL, pool));
- SVN_ERR(write_revision_zero(fs, pool));
-
/* Create the fsfs.conf file if supported. Older server versions would
simply ignore the file but that might result in a different behavior
than with the later releases. Also, hotcopy would ignore, i.e. not
@@ -1678,6 +1668,9 @@ svn_fs_fs__create(svn_fs_t *fs,
/* Global configuration options. */
SVN_ERR(read_global_config(fs));
+ /* Add revision 0. */
+ SVN_ERR(write_revision_zero(fs, pool));
+
/* Create the min unpacked rev file. */
if (ffd->format >= SVN_FS_FS__MIN_PACKED_FORMAT)
SVN_ERR(svn_io_file_create(svn_fs_fs__path_min_unpacked_rev(fs, pool),