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 2013/06/30 19:44:56 UTC
svn commit: r1498165 [1/5] - in
/subversion/branches/fsfs-format7/subversion: libsvn_fs_fs/
tests/libsvn_fs_fs/
Author: stefan2
Date: Sun Jun 30 17:44:56 2013
New Revision: 1498165
URL: http://svn.apache.org/r1498165
Log:
On the fsfs-format7 branch: remove format7 support from the FSFS backend.
Revert to format 6.
* subversion/libsvn_fs_fs/fs.h
(SVN_FS_FS__FORMAT_NUMBER): back to f6
(CONFIG_SECTION_IO,
CONFIG_OPTION_BLOCK_SIZE,
CONFIG_OPTION_L2P_PAGE_SIZE,
CONFIG_OPTION_P2L_PAGE_SIZE): drop f7 config options
(SVN_FS_FS__MIN_LOG_ADDRESSING_FORMAT): drop f7 capabilities
(fs_fs_data_t): remove f7 members
* subversion/libsvn_fs_fs/fs_fs.c
(read_config): don't read f7 config options
(write_config): remove f7 config options from template
(write_revision_zero,
svn_fs_fs__info_format): remove f7 support
* subversion/libsvn_fs_fs/caching.c
(svn_fs_fs__initialize_caches): remove init code for f7 caches
* subversion/libsvn_fs_fs/cached_data.h
(svn_fs_fs__get_representation_length): drop
* subversion/libsvn_fs_fs/cached_data.c
(SVN_FS_FS__ITEM_TYPE_ANY_REP,
SVN_FS_FS__ITEM_TYPE_NODEREV,
SVN_FS_FS__ITEM_TYPE_CHANGES): move declarations here to keep support
for dgb__log_access
(dgb__log_access,
get_node_revision_body,
svn_fs_fs__rev_get_root,
create_rep_state_body,
read_delta_window,
get_combined_window,
get_contents,
svn_fs_fs__get_changes): remove f7 support
(aligned_seek): use the APR default block size
(open_and_seek_revision,
open_and_seek_transaction,
get_fs_id_at_offset,
auto_read_diff_version,
read_plain_window): update callers
(get_cached_window_sizes_func,
get_cached_window_sizes,
read_container_window,
init_rep_state,
cache_windows,
read_rep_header,
svn_fs_fs__get_representation_length,
block_read_windows,
block_read_contents,
auto_select_stream,
block_read_changes,
block_read_changes_container,
block_read_noderev,
block_read_noderevs_container,
block_read_reps_container,
block_read): drop
* subversion/libsvn_fs_fs/id.h
(svn_fs_fs__id_create_root): drop declaration
* subversion/libsvn_fs_fs/id.c
(svn_fs_fs__id_create_root): drop implementation
* subversion/libsvn_fs_fs/index.h
(): drop everything except ...
(svn_fs_fs__item_offset): ... this one
* subversion/libsvn_fs_fs/index.c
(): drop everything except ...
(svn_fs_fs__item_offset): ... this one; drop f7 support
* subversion/libsvn_fs_fs/pack.c
(svn_fs_fs__order_dir_entries,
pack_rev_shard): drop f7 support
(path_order_t,
reference_t,
pack_context_t,
sub_item_ordered_t,
initialize_pack_context,
reset_pack_context,
close_pack_context.
copy_file_data,
write_null_bytes,
copy_item_to_temp,
get_item_array_index,
add_item_rep_mapping,
get_item,
copy_rep_to_temp,
compare_dir_entries_format7,
copy_node_to_temp,
compare_p2l_info,
sort_items,
compare_sub_items,
compare_p2l_info_rev,
compare_path_order,
compare_references,
sort_reps,
get_block_left,
auto_pad_block,
find_first_reference,
is_reference_match,
select_reps,
reps_fit_into_containers,
write_nodes_container,
store_nodes,
write_reps_container,
write_reps_containers,
should_flush_nodes_container,
store_items,
copy_reps_from_temp,
write_changes_container,
write_changes_containers,
write_property_containers,
append_entries,
write_l2p_index,
pack_range,
append_revision,
pack_log_addressed): drop
* subversion/libsvn_fs_fs/transaction.c
(store_l2p_index_entry,
store_p2l_index_entry,
allocate_item_index): drop
(rep_write_contents_close,
write_hash_rep,
write_hash_delta_rep,
write_final_rev,
write_final_changed_path_info,
commit_body): drop f7 support
* subversion/libsvn_fs_fs/verify.c
(compare_l2p_to_p2l_index,
compare_p2l_to_l2p_index,
verify_index_consistency): drop
(svn_fs_fs__verify): drop f7 support
* subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
(pack_filesystem): drop f7 support
(test_reps): drop
(test_info): update
* subversion/libsvn_fs_fs/changes.c,
subversion/libsvn_fs_fs/changes.h,
subversion/libsvn_fs_fs/noderevs.c,
subversion/libsvn_fs_fs/noderevs.h,
subversion/libsvn_fs_fs/reps.c,
subversion/libsvn_fs_fs/reps.h,
subversion/libsvn_fs_fs/string_table.c,
subversion/libsvn_fs_fs/string_table.h: drop container logic
Removed:
subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/changes.c
subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/changes.h
subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/noderevs.c
subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/noderevs.h
subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/reps.c
subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/reps.h
subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/string_table.c
subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/string_table.h
Modified:
subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.c
subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.h
subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/caching.c
subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs.h
subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs_fs.c
subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/id.c
subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/id.h
subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/index.c
subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/index.h
subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/pack.c
subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/transaction.c
subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/verify.c
subversion/branches/fsfs-format7/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.c?rev=1498165&r1=1498164&r2=1498165&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.c Sun Jun 30 17:44:56 2013
@@ -34,29 +34,21 @@
#include "pack.h"
#include "temp_serializer.h"
#include "index.h"
-#include "changes.h"
-#include "noderevs.h"
-#include "reps.h"
#include "../libsvn_fs/fs-loader.h"
#include "svn_private_config.h"
-/* forward-declare */
-static svn_error_t *
-block_read(void **result,
- svn_fs_t *fs,
- svn_revnum_t revision,
- apr_uint64_t item_index,
- apr_file_t *revision_file,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
-
/* Defined this to enable access logging via dgb__log_access
#define SVN_FS_FS__LOG_ACCESS
*/
+/* Data / item types.
+ */
+#define SVN_FS_FS__ITEM_TYPE_ANY_REP 1 /* item is a representation. */
+#define SVN_FS_FS__ITEM_TYPE_NODEREV 2 /* item is a noderev */
+#define SVN_FS_FS__ITEM_TYPE_CHANGES 3 /* item is a changed paths list */
+
/* When SVN_FS_FS__LOG_ACCESS has been defined, write a line to console
* showing where REVISION, ITEM_INDEX is located in FS and use ITEM to
* show details on it's contents if not NULL. To support format 6 and
@@ -77,13 +69,8 @@ dgb__log_access(svn_fs_t *fs,
#ifdef SVN_FS_FS__LOG_ACCESS
fs_fs_data_t *ffd = fs->fsap_data;
apr_off_t offset = -1;
- apr_off_t end_offset = 0;
apr_uint32_t sub_item = 0;
- apr_array_header_t *entries;
- svn_fs_fs__p2l_entry_t *entry = NULL;
- int i;
- static const char *types[] = {"<n/a>", "frep ", "drep ", "fprop", "dprop",
- "node ", "chgs ", "rep ", "c:", "n:"};
+ static const char *types[] = {"<n/a>", "rep ", "node ", "chgs "};
const char *description = "";
const char *type = types[item_type];
const char *pack = "";
@@ -96,7 +83,7 @@ dgb__log_access(svn_fs_t *fs,
if (revision < ffd->min_unpacked_rev)
pack = apr_psprintf(scratch_pool, "%4ld|",
revision / ffd->max_files_per_dir);
-
+
/* construct description if possible */
if (item_type == SVN_FS_FS__ITEM_TYPE_NODEREV && item != NULL)
{
@@ -148,58 +135,27 @@ dgb__log_access(svn_fs_t *fs,
}
}
- /* some info is only available in format7 repos */
- if (ffd->format >= SVN_FS_FS__MIN_LOG_ADDRESSING_FORMAT)
- {
- /* reverse index lookup: get item description in ENTRY */
- SVN_ERR(svn_fs_fs__p2l_entry_lookup(&entry, fs, revision, offset,
- scratch_pool));
- if (entry)
- {
- /* more details */
- end_offset = offset + entry->size;
- type = types[entry->type];
-
- /* merge the sub-item number with the container type */
- if ( entry->type == SVN_FS_FS__ITEM_TYPE_CHANGES_CONT
- || entry->type == SVN_FS_FS__ITEM_TYPE_NODEREVS_CONT
- || entry->type == SVN_FS_FS__ITEM_TYPE_REPS_CONT)
- type = apr_psprintf(scratch_pool, "%s%-3d", type, sub_item);
- }
-
- /* line output */
- printf("%5s%4lx:%04lx -%4lx:%04lx %s %7ld %5"APR_UINT64_T_FMT" %s\n",
- pack, (long)(offset / ffd->block_size),
- (long)(offset % ffd->block_size),
- (long)(end_offset / ffd->block_size),
- (long)(end_offset % ffd->block_size),
- type, revision, item_index, description);
- }
- else
- {
- /* reduced logging for format 6 and earlier */
- printf("%5s%10" APR_UINT64_T_HEX_FMT " %s %7ld %7" APR_UINT64_T_FMT \
- " %s\n",
- pack, (apr_uint64_t)(offset), type, revision, item_index,
- description);
- }
+ /* reduced logging for format 6 and earlier */
+ printf("%5s%10" APR_UINT64_T_HEX_FMT " %s %7ld %7" APR_UINT64_T_FMT \
+ " %s\n",
+ pack, (apr_uint64_t)(offset), type, revision, item_index,
+ description);
#endif
-
+
return SVN_NO_ERROR;
}
/* Convenience wrapper around svn_io_file_aligned_seek, taking filesystem
FS instead of a block size. */
static svn_error_t *
-aligned_seek(svn_fs_t *fs,
- apr_file_t *file,
+aligned_seek(apr_file_t *file,
apr_off_t *buffer_start,
apr_off_t offset,
apr_pool_t *pool)
{
- fs_fs_data_t *ffd = fs->fsap_data;
- return svn_error_trace(svn_io_file_aligned_seek(file, ffd->block_size,
+ const apr_size_t default_block_size = 4096;
+ return svn_error_trace(svn_io_file_aligned_seek(file, default_block_size,
buffer_start, offset,
pool));
}
@@ -223,7 +179,7 @@ open_and_seek_revision(apr_file_t **file
SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&rev_file, fs, rev, pool));
SVN_ERR(svn_fs_fs__item_offset(&offset, &sub_item, fs, rev, NULL, item,
pool));
- SVN_ERR(aligned_seek(fs, rev_file, NULL, offset, pool));
+ SVN_ERR(aligned_seek(rev_file, NULL, offset, pool));
*file = rev_file;
@@ -249,7 +205,7 @@ open_and_seek_transaction(apr_file_t **f
SVN_ERR(svn_fs_fs__item_offset(&offset, &sub_item, fs, SVN_INVALID_REVNUM,
&rep->txn_id, rep->item_index, pool));
- SVN_ERR(aligned_seek(fs, rev_file, NULL, offset, pool));
+ SVN_ERR(aligned_seek(rev_file, NULL, offset, pool));
*file = rev_file;
@@ -327,27 +283,6 @@ get_node_revision_body(node_revision_t *
/* noderevs in rev / pack files can be cached */
const svn_fs_fs__id_part_t *rev_item = svn_fs_fs__id_rev_item(id);
pair_cache_key_t key;
-
- /* First, try a noderevs container cache lookup. */
- if ( is_packed_rev(fs, rev_item->revision)
- && ffd->noderevs_container_cache)
- {
- apr_off_t offset;
- apr_uint32_t sub_item;
- SVN_ERR(svn_fs_fs__item_offset(&offset, &sub_item, fs,
- rev_item->revision, NULL,
- rev_item->number, pool));
- key.revision = packed_base_rev(fs, rev_item->revision);
- key.second = offset;
-
- SVN_ERR(svn_cache__get_partial((void **)noderev_p, &is_cached,
- ffd->noderevs_container_cache, &key,
- svn_fs_fs__noderevs_get_func,
- &sub_item, pool));
- if (is_cached)
- return SVN_NO_ERROR;
- }
-
key.revision = rev_item->revision;
key.second = rev_item->number;
@@ -370,36 +305,21 @@ get_node_revision_body(node_revision_t *
rev_item->number,
pool);
- if (ffd->format >= SVN_FS_FS__MIN_LOG_ADDRESSING_FORMAT)
- {
- /* block-read will parse the whole block and will also return
- the one noderev that we need right now. */
- SVN_ERR(block_read((void **)noderev_p, fs,
- rev_item->revision,
- rev_item->number,
- revision_file,
- pool,
- pool));
- SVN_ERR(svn_io_file_close(revision_file, pool));
- }
- else
- {
- /* pre-format7 reading, parsing and caching */
- SVN_ERR(svn_fs_fs__read_noderev(noderev_p,
- svn_stream_from_aprfile2(revision_file,
- FALSE,
- pool),
- pool));
- /* Workaround issue #4031: is-fresh-txn-root in revision files. */
- (*noderev_p)->is_fresh_txn_root = FALSE;
+ /* pre-format7 reading, parsing and caching */
+ SVN_ERR(svn_fs_fs__read_noderev(noderev_p,
+ svn_stream_from_aprfile2(revision_file,
+ FALSE,
+ pool),
+ pool));
+ /* Workaround issue #4031: is-fresh-txn-root in revision files. */
+ (*noderev_p)->is_fresh_txn_root = FALSE;
- /* The noderev is not in cache, yet. Add it, if caching has been enabled. */
- if (ffd->node_revision_cache)
- SVN_ERR(svn_cache__set(ffd->node_revision_cache,
- &key,
- *noderev_p,
- pool));
- }
+ /* The noderev is not in cache, yet. Add it, if caching has been enabled. */
+ if (ffd->node_revision_cache)
+ SVN_ERR(svn_cache__set(ffd->node_revision_cache,
+ &key,
+ *noderev_p,
+ pool));
}
return SVN_NO_ERROR;
@@ -447,7 +367,7 @@ get_fs_id_at_offset(svn_fs_id_t **id_p,
{
node_revision_t *noderev;
- SVN_ERR(aligned_seek(fs, rev_file, NULL, offset, pool));
+ SVN_ERR(aligned_seek(rev_file, NULL, offset, pool));
SVN_ERR(svn_fs_fs__read_noderev(&noderev,
svn_stream_from_aprfile2(rev_file, TRUE,
pool),
@@ -554,37 +474,30 @@ svn_fs_fs__rev_get_root(svn_fs_id_t **ro
apr_pool_t *pool)
{
fs_fs_data_t *ffd = fs->fsap_data;
- SVN_ERR(svn_fs_fs__ensure_revision_exists(rev, fs, pool));
- if (ffd->format < SVN_FS_FS__MIN_LOG_ADDRESSING_FORMAT)
- {
- apr_file_t *revision_file;
- apr_off_t root_offset;
- svn_fs_id_t *root_id = NULL;
- svn_boolean_t is_cached;
+ apr_file_t *revision_file;
+ apr_off_t root_offset;
+ svn_fs_id_t *root_id = NULL;
+ svn_boolean_t is_cached;
- SVN_ERR(svn_cache__get((void **) root_id_p, &is_cached,
- ffd->rev_root_id_cache, &rev, pool));
- if (is_cached)
- return SVN_NO_ERROR;
+ SVN_ERR(svn_fs_fs__ensure_revision_exists(rev, fs, pool));
+ SVN_ERR(svn_cache__get((void **) root_id_p, &is_cached,
+ ffd->rev_root_id_cache, &rev, pool));
+ if (is_cached)
+ return SVN_NO_ERROR;
- SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&revision_file, fs, rev, pool));
+ SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&revision_file, fs, rev, pool));
- SVN_ERR(get_root_changes_offset(&root_offset, NULL, revision_file,
- fs, rev, pool));
- SVN_ERR(get_fs_id_at_offset(&root_id, revision_file, fs, rev,
- root_offset, pool));
+ SVN_ERR(get_root_changes_offset(&root_offset, NULL, revision_file,
+ fs, rev, pool));
+ SVN_ERR(get_fs_id_at_offset(&root_id, revision_file, fs, rev,
+ root_offset, pool));
- SVN_ERR(svn_io_file_close(revision_file, pool));
+ SVN_ERR(svn_io_file_close(revision_file, pool));
- SVN_ERR(svn_cache__set(ffd->rev_root_id_cache, &rev, root_id, pool));
+ SVN_ERR(svn_cache__set(ffd->rev_root_id_cache, &rev, root_id, pool));
- *root_id_p = root_id;
- }
- else
- {
- *root_id_p = svn_fs_fs__id_create_root(rev, pool);
- }
+ *root_id_p = root_id;
return SVN_NO_ERROR;
}
@@ -718,43 +631,12 @@ create_rep_state_body(rep_state_t **rep_
fs, rep->revision, NULL,
rep->item_index, pool));
- /* is rep stored in some star-deltified container? */
- if (! svn_fs_fs__id_txn_used(&rep->txn_id)
- && ffd->format >= SVN_FS_FS__MIN_LOG_ADDRESSING_FORMAT)
- {
- svn_boolean_t in_container = TRUE;
- if (sub_item == 0)
- {
- svn_fs_fs__p2l_entry_t *entry;
- SVN_ERR(svn_fs_fs__p2l_entry_lookup(&entry, fs, rep->revision,
- offset, pool));
- in_container = entry->type == SVN_FS_FS__ITEM_TYPE_REPS_CONT;
- }
-
- if (in_container)
- {
- /* construct a container rep header */
- *rep_header = apr_pcalloc(pool, sizeof(**rep_header));
- (*rep_header)->type = svn_fs_fs__rep_container;
-
- /* provide an empty shared file struct */
- rs->file = apr_pcalloc(pool, sizeof(*rs->file));
- rs->file->revision = rep->revision;
- rs->file->pool = pool;
- rs->file->fs = fs;
-
- /* exit to caller */
- *rep_state = rs;
- return SVN_NO_ERROR;
- }
- }
-
if (reuse_shared_file)
{
/* ... we can re-use the same, already open file object
*/
SVN_ERR_ASSERT(sub_item == 0);
- SVN_ERR(aligned_seek(fs, (*shared_file)->file, NULL, offset, pool));
+ SVN_ERR(aligned_seek((*shared_file)->file, NULL, offset, pool));
rs->file = *shared_file;
}
@@ -781,13 +663,8 @@ create_rep_state_body(rep_state_t **rep_
SVN_ERR(get_file_offset(&rs->start, rs->file->file, pool));
if (! svn_fs_fs__id_txn_used(&rep->txn_id))
- {
- if (ffd->format >= SVN_FS_FS__MIN_LOG_ADDRESSING_FORMAT)
- SVN_ERR(block_read(NULL, fs, rep->revision, rep->item_index,
- rs->file->file, pool, pool));
- if (ffd->rep_header_cache)
- SVN_ERR(svn_cache__set(ffd->rep_header_cache, &key, rh, pool));
- }
+ if (ffd->rep_header_cache)
+ SVN_ERR(svn_cache__set(ffd->rep_header_cache, &key, rh, pool));
}
SVN_ERR(dgb__log_access(fs, rep->revision, rep->item_index, rh,
@@ -1009,60 +886,6 @@ typedef struct window_sizes_t
svn_filesize_t target_len;
} window_sizes_t;
-/* Implements svn_cache__partial_getter_func_t extracting the packed
- * and expanded window sizes from a cached window and return the size
- * info as a window_sizes_t* in *OUT.
- */
-static svn_error_t *
-get_cached_window_sizes_func(void **out,
- const void *data,
- apr_size_t data_len,
- void *baton,
- apr_pool_t *pool)
-{
- const svn_fs_fs__txdelta_cached_window_t *window = data;
- const svn_txdelta_window_t *txdelta_window
- = svn_temp_deserializer__ptr(window, (const void **)&window->window);
-
- window_sizes_t *result = apr_palloc(pool, sizeof(*result));
- result->packed_len = window->end_offset - window->start_offset;
- result->target_len = txdelta_window->tview_len;
-
- *out = result;
-
- return SVN_NO_ERROR;
-}
-
-/* Return the packed & expanded sizes of the window addressed by RS. If the
- * window cannot be found in the window cache, set *IS_CACHED to FALSE.
- * Otherwise, set it to TRUE and return the data in *SIZES, allocated in POOL.
- */
-static svn_error_t *
-get_cached_window_sizes(window_sizes_t **sizes,
- rep_state_t *rs,
- svn_boolean_t *is_cached,
- apr_pool_t *pool)
-{
- if (! rs->window_cache)
- {
- /* txdelta window has not been enabled */
- *is_cached = FALSE;
- }
- else
- {
- window_cache_key_t key = { 0 };
- SVN_ERR(svn_cache__get_partial((void **)sizes,
- is_cached,
- rs->window_cache,
- get_window_key(&key, rs),
- get_cached_window_sizes_func,
- NULL,
- pool));
- }
-
- return SVN_NO_ERROR;
-}
-
static svn_error_t *
get_cached_window(svn_txdelta_window_t **window_p,
rep_state_t *rs,
@@ -1368,8 +1191,7 @@ auto_read_diff_version(rep_state_t *rs,
if (rs->ver == -1)
{
char buf[4];
- SVN_ERR(aligned_seek(rs->file->fs, rs->file->file, NULL, rs->start,
- pool));
+ SVN_ERR(aligned_seek(rs->file->file, NULL, rs->start, pool));
SVN_ERR(svn_io_file_read_full2(rs->file->file, buf, sizeof(buf),
NULL, NULL, pool));
@@ -1414,12 +1236,6 @@ read_delta_window(svn_txdelta_window_t *
because the block is unlikely to contain other data. */
if (rs->chunk_index == 0 && SVN_IS_VALID_REVNUM(rs->revision))
{
- fs_fs_data_t *ffd = rs->file->fs->fsap_data;
-
- if (ffd->format >= SVN_FS_FS__MIN_LOG_ADDRESSING_FORMAT)
- SVN_ERR(block_read(NULL, rs->file->fs, rs->revision, rs->item_index,
- rs->file->file, pool, pool));
-
/* reading the whole block probably also provided us with the
desired txdelta window */
SVN_ERR(get_cached_window(nwin, rs, this_chunk, &is_cached, pool));
@@ -1435,8 +1251,7 @@ read_delta_window(svn_txdelta_window_t *
/* RS->FILE may be shared between RS instances -> make sure we point
* to the right data. */
start_offset = rs->start + rs->current;
- SVN_ERR(aligned_seek(rs->file->fs, rs->file->file, NULL, start_offset,
- pool));
+ SVN_ERR(aligned_seek(rs->file->file, NULL, start_offset, pool));
/* Skip windows to reach the current chunk if we aren't there yet. */
while (rs->chunk_index < this_chunk)
@@ -1484,7 +1299,7 @@ read_plain_window(svn_stringbuf_t **nwin
SVN_ERR(auto_set_start_offset(rs, pool));
offset = rs->start + rs->current;
- SVN_ERR(aligned_seek(rs->file->fs, rs->file->file, NULL, offset, pool));
+ SVN_ERR(aligned_seek(rs->file->file, NULL, offset, pool));
/* Read the plain data. */
*nwin = svn_stringbuf_create_ensure(size, pool);
@@ -1498,53 +1313,6 @@ read_plain_window(svn_stringbuf_t **nwin
return SVN_NO_ERROR;
}
-/* Read the whole representation RS and return it in *NWIN. */
-static svn_error_t *
-read_container_window(svn_stringbuf_t **nwin,
- rep_state_t *rs,
- apr_size_t size,
- apr_pool_t *pool)
-{
- svn_fs_fs__rep_extractor_t *extractor = NULL;
- svn_fs_t *fs = rs->file->fs;
- fs_fs_data_t *ffd = fs->fsap_data;
- pair_cache_key_t key;
-
- SVN_ERR(auto_set_start_offset(rs, pool));
- key.revision = packed_base_rev(fs, rs->revision);
- key.second = rs->start;
-
- /* already in cache? */
- if (ffd->reps_container_cache)
- {
- svn_boolean_t is_cached = FALSE;
- svn_fs_fs__reps_baton_t baton;
- baton.fs = fs;
- baton.idx = rs->sub_item;
-
- SVN_ERR(svn_cache__get_partial((void**)&extractor, &is_cached,
- ffd->reps_container_cache, &key,
- svn_fs_fs__reps_get_func, &baton,
- pool));
- }
-
- /* read from disk, if necessary */
- if (extractor == NULL)
- {
- SVN_ERR(auto_open_shared_file(rs->file));
- SVN_ERR(block_read((void **)&extractor, fs, rs->revision,
- rs->item_index, rs->file->file, pool, pool));
- }
-
- SVN_ERR(svn_fs_fs__extractor_drive(nwin, extractor, rs->current, size,
- pool, pool));
-
- /* Update RS. */
- rs->current += (apr_off_t)size;
-
- return SVN_NO_ERROR;
-}
-
/* Get the undeltified window that is a result of combining all deltas
from the current desired representation identified in *RB with its
base representation. Store the window in *RESULT. */
@@ -1594,14 +1362,8 @@ get_combined_window(svn_stringbuf_t **re
Note that BUF / SOURCE may only be NULL in the first iteration. */
source = buf;
if (source == NULL && rb->src_state != NULL)
- {
- if (rb->src_state->header_size == 0)
- SVN_ERR(read_container_window(&source, rb->src_state,
- window->sview_len, pool));
- else
- SVN_ERR(read_plain_window(&source, rb->src_state,
- window->sview_len, pool));
- }
+ SVN_ERR(read_plain_window(&source, rb->src_state, window->sview_len,
+ pool));
/* Combine this window with the current one. */
new_pool = svn_pool_create(rb->pool);
@@ -1658,179 +1420,6 @@ rep_read_contents_close(void *baton)
return SVN_NO_ERROR;
}
-/* Inialize the representation read state RS for the given REP_HEADER and
- * p2l index ENTRY. If not NULL, assign FILE and STREAM to RS.
- * Use POOL for allocations.
- */
-static svn_error_t *
-init_rep_state(rep_state_t *rs,
- svn_fs_fs__rep_header_t *rep_header,
- svn_fs_t *fs,
- apr_file_t *file,
- svn_stream_t *stream,
- svn_fs_fs__p2l_entry_t* entry,
- apr_pool_t *pool)
-{
- fs_fs_data_t *ffd = fs->fsap_data;
- shared_file_t *shared_file = apr_pcalloc(pool, sizeof(*shared_file));
-
- /* this function does not apply to representation containers */
- SVN_ERR_ASSERT(entry->type >= SVN_FS_FS__ITEM_TYPE_FILE_REP
- && entry->type <= SVN_FS_FS__ITEM_TYPE_DIR_PROPS);
- SVN_ERR_ASSERT(entry->item_count == 1);
-
- shared_file->file = file;
- shared_file->stream = stream;
- shared_file->fs = fs;
- shared_file->revision = entry->items[0].revision;
- shared_file->pool = pool;
-
- rs->file = shared_file;
- rs->revision = entry->items[0].revision;
- rs->item_index = entry->items[0].number;
- rs->header_size = rep_header->header_size;
- rs->start = entry->offset + rs->header_size;
- rs->current = rep_header->type == svn_fs_fs__rep_plain ? 0 : 4;
- rs->size = entry->size - rep_header->header_size - 7;
- rs->ver = 1;
- rs->chunk_index = 0;
- rs->window_cache = ffd->txdelta_window_cache;
- rs->combined_cache = ffd->combined_window_cache;
-
- return SVN_NO_ERROR;
-}
-
-/* Walk through all windows in the representation addressed by RS in FS
- * (excluding the delta bases) and put those not already cached into the
- * window caches. As a side effect, return the total sum of all expanded
- * window sizes in *FULLTEXT_LEN. Use POOL for temporary allocations.
- */
-static svn_error_t *
-cache_windows(svn_filesize_t *fulltext_len,
- svn_fs_t *fs,
- rep_state_t *rs,
- apr_pool_t *pool)
-{
- *fulltext_len = 0;
-
- while (rs->current < rs->size)
- {
- svn_boolean_t is_cached = FALSE;
- window_sizes_t *window_sizes;
-
- /* efficiently skip windows that are still being cached instead
- * of fully decoding them */
- SVN_ERR(get_cached_window_sizes(&window_sizes, rs, &is_cached, pool));
- if (is_cached)
- {
- *fulltext_len += window_sizes->target_len;
- rs->current += window_sizes->packed_len;
- }
- else
- {
- svn_txdelta_window_t *window;
- apr_off_t start_offset = rs->start + rs->current;
- apr_off_t end_offset;
- apr_off_t block_start;
-
- /* navigate to & read the current window */
- SVN_ERR(aligned_seek(fs, rs->file->file, &block_start,
- start_offset, pool));
- SVN_ERR(svn_txdelta_read_svndiff_window(&window, rs->file->stream,
- rs->ver, pool));
-
- /* aggregate expanded window size */
- *fulltext_len += window->tview_len;
-
- /* determine on-disk window size */
- SVN_ERR(get_file_offset(&end_offset, rs->file->file, pool));
- rs->current = end_offset - rs->start;
- if (rs->current > rs->size)
- return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
- _("Reading one svndiff window read beyond "
- "the end of the representation"));
-
- /* if the window has not been cached before, cache it now
- * (if caching is used for them at all) */
- if (!is_cached)
- SVN_ERR(set_cached_window(window, rs, start_offset, pool));
- }
-
- rs->chunk_index++;
- }
-
- return SVN_NO_ERROR;
-}
-
-/* Try to get the representation header identified by KEY from FS's cache.
- * If it has not been cached, read it from the current position in STREAM
- * and put it into the cache (if caching has been enabled for rep headers).
- * Return the result in *REP_HEADER. Use POOL for allocations.
- */
-static svn_error_t *
-read_rep_header(svn_fs_fs__rep_header_t **rep_header,
- svn_fs_t *fs,
- svn_stream_t *stream,
- representation_cache_key_t *key,
- apr_pool_t *pool)
-{
- fs_fs_data_t *ffd = fs->fsap_data;
- svn_boolean_t is_cached = FALSE;
-
- if (ffd->rep_header_cache)
- {
- SVN_ERR(svn_cache__get((void**)rep_header, &is_cached,
- ffd->rep_header_cache, key, pool));
- if (is_cached)
- return SVN_NO_ERROR;
- }
-
- SVN_ERR(svn_fs_fs__read_rep_header(rep_header, stream, pool));
-
- if (ffd->rep_header_cache)
- SVN_ERR(svn_cache__set(ffd->rep_header_cache, key, *rep_header, pool));
-
- return SVN_NO_ERROR;
-}
-
-svn_error_t *
-svn_fs_fs__get_representation_length(svn_filesize_t *packed_len,
- svn_filesize_t *expanded_len,
- svn_fs_t *fs,
- apr_file_t *file,
- svn_stream_t *stream,
- svn_fs_fs__p2l_entry_t* entry,
- apr_pool_t *pool)
-{
- representation_cache_key_t key = { 0 };
- rep_state_t rs = { 0 };
- svn_fs_fs__rep_header_t *rep_header;
-
- /* this function does not apply to representation containers */
- SVN_ERR_ASSERT(entry->type >= SVN_FS_FS__ITEM_TYPE_FILE_REP
- && entry->type <= SVN_FS_FS__ITEM_TYPE_DIR_PROPS);
- SVN_ERR_ASSERT(entry->item_count == 1);
-
- /* get / read the representation header */
- key.revision = entry->items[0].revision;
- key.is_packed = is_packed_rev(fs, key.revision);
- key.item_index = entry->items[0].number;
- SVN_ERR(read_rep_header(&rep_header, fs, stream, &key, pool));
-
- /* prepare representation reader state (rs) structure */
- SVN_ERR(init_rep_state(&rs, rep_header, fs, file, stream, entry, pool));
-
- /* RS->FILE may be shared between RS instances -> make sure we point
- * to the right data. */
- *packed_len = rs.size;
- if (rep_header->type == svn_fs_fs__rep_plain)
- *expanded_len = rs.size;
- else
- SVN_ERR(cache_windows(expanded_len, fs, &rs, pool));
-
- return SVN_NO_ERROR;
-}
-
/* Return the next *LEN bytes of the rep and store them in *BUF. */
static svn_error_t *
get_contents(struct rep_read_baton *rb,
@@ -1848,17 +1437,6 @@ get_contents(struct rep_read_baton *rb,
copy_len = remaining;
rs = rb->src_state;
- /* reps in containers don't have a header */
- if (rs->header_size == 0 && rb->base_window == NULL)
- {
- /* RS->SIZE is unreliable here because it is based upon
- * the delta rep size _before_ putting the data into a
- * a container. */
- SVN_ERR(read_container_window(&rb->base_window, rs,
- rb->len, rb->pool));
- rs->current -= rb->base_window->len;
- }
-
if (rb->base_window != NULL)
{
/* We got the desired rep directly from the cache.
@@ -1882,8 +1460,7 @@ get_contents(struct rep_read_baton *rb,
SVN_ERR(auto_set_start_offset(rs, rb->pool));
offset = rs->start + rs->current;
- SVN_ERR(aligned_seek(rs->file->fs, rs->file->file, NULL, offset,
- rb->pool));
+ SVN_ERR(aligned_seek(rs->file->file, NULL, offset,rb->pool));
SVN_ERR(svn_io_file_read_full2(rs->file->file, cur, copy_len,
NULL, NULL, rb->pool));
}
@@ -2504,34 +2081,16 @@ svn_fs_fs__get_changes(apr_array_header_
svn_revnum_t rev,
apr_pool_t *pool)
{
- apr_off_t changes_offset;
+ apr_off_t changes_offset = 0;
apr_file_t *revision_file;
svn_boolean_t found;
fs_fs_data_t *ffd = fs->fsap_data;
/* try cache lookup first */
- if (ffd->changes_container_cache && is_packed_rev(fs, rev))
- {
- apr_off_t offset;
- apr_uint32_t sub_item;
- pair_cache_key_t key;
-
- SVN_ERR(svn_fs_fs__item_offset(&offset, &sub_item, fs, rev, NULL,
- SVN_FS_FS__ITEM_INDEX_CHANGES, pool));
- key.revision = packed_base_rev(fs, rev);
- key.second = offset;
-
- SVN_ERR(svn_cache__get_partial((void **)changes, &found,
- ffd->changes_container_cache, &key,
- svn_fs_fs__changes_get_list_func,
- &sub_item, pool));
- }
- else if (ffd->changes_cache)
- {
- SVN_ERR(svn_cache__get((void **) changes, &found, ffd->changes_cache,
- &rev, pool));
- }
+ if (ffd->changes_cache)
+ SVN_ERR(svn_cache__get((void **) changes, &found, ffd->changes_cache,
+ &rev, pool));
if (!found)
{
@@ -2541,514 +2100,25 @@ svn_fs_fs__get_changes(apr_array_header_
SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&revision_file, fs, rev,
pool));
- if (ffd->format >= SVN_FS_FS__MIN_LOG_ADDRESSING_FORMAT)
- {
- /* 'block-read' will also provide us with the desired data */
- SVN_ERR(block_read((void **)changes, fs,
- rev, SVN_FS_FS__ITEM_INDEX_CHANGES,
- revision_file, pool, pool));
- }
- else
- {
- /* pre-format7 code path */
- SVN_ERR(get_root_changes_offset(NULL, &changes_offset,
- revision_file, fs, rev, pool));
- SVN_ERR(svn_io_file_seek(revision_file, APR_SET, &changes_offset,
- pool));
- SVN_ERR(svn_fs_fs__read_changes(changes,
- svn_stream_from_aprfile2(revision_file, TRUE, pool),
- pool));
+ SVN_ERR(get_root_changes_offset(NULL, &changes_offset,
+ revision_file, fs, rev, pool));
+ SVN_ERR(svn_io_file_seek(revision_file, APR_SET, &changes_offset,
+ pool));
+ SVN_ERR(svn_fs_fs__read_changes(changes,
+ svn_stream_from_aprfile2(revision_file, TRUE, pool),
+ pool));
- /* cache for future reference */
+ /* cache for future reference */
- if (ffd->changes_cache)
- SVN_ERR(svn_cache__set(ffd->changes_cache, &rev, *changes, pool));
- }
+ if (ffd->changes_cache)
+ SVN_ERR(svn_cache__set(ffd->changes_cache, &rev, *changes, pool));
SVN_ERR(svn_io_file_close(revision_file, pool));
}
- SVN_ERR(dgb__log_access(fs, rev, SVN_FS_FS__ITEM_INDEX_CHANGES, *changes,
+ SVN_ERR(dgb__log_access(fs, rev, changes_offset, *changes,
SVN_FS_FS__ITEM_TYPE_CHANGES, pool));
return SVN_NO_ERROR;
}
-static svn_error_t *
-block_read_windows(svn_fs_fs__rep_header_t *rep_header,
- svn_fs_t *fs,
- apr_file_t *file,
- svn_stream_t *stream,
- svn_fs_fs__p2l_entry_t* entry,
- apr_pool_t *pool)
-{
- fs_fs_data_t *ffd = fs->fsap_data;
- rep_state_t rs = { 0 };
- apr_off_t offset;
- apr_off_t block_start;
- svn_boolean_t is_cached = FALSE;
- window_cache_key_t key = { 0 };
-
- if ( (rep_header->type != svn_fs_fs__rep_plain
- && !ffd->txdelta_window_cache)
- || (rep_header->type == svn_fs_fs__rep_plain
- && !ffd->combined_window_cache))
- return SVN_NO_ERROR;
-
- SVN_ERR(init_rep_state(&rs, rep_header, fs, file, stream, entry, pool));
-
- /* RS->FILE may be shared between RS instances -> make sure we point
- * to the right data. */
- offset = rs.start + rs.current;
- if (rep_header->type == svn_fs_fs__rep_plain)
- {
- svn_stringbuf_t *plaintext;
-
- /* already in cache? */
- SVN_ERR(svn_cache__has_key(&is_cached, rs.combined_cache,
- get_window_key(&key, &rs), pool));
- if (is_cached)
- return SVN_NO_ERROR;
-
- /* for larger reps, the header may have crossed a block boundary.
- * make sure we still read blocks properly aligned, i.e. don't use
- * plain seek here. */
- SVN_ERR(aligned_seek(fs, file, &block_start, offset, pool));
-
- plaintext = svn_stringbuf_create_ensure(rs.size, pool);
- SVN_ERR(svn_io_file_read_full2(file, plaintext->data, rs.size,
- &plaintext->len, NULL, pool));
- plaintext->data[plaintext->len] = 0;
- rs.current += rs.size;
-
- SVN_ERR(set_cached_combined_window(plaintext, &rs, pool));
- }
- else
- {
- svn_filesize_t fulltext_len;
- SVN_ERR(cache_windows(&fulltext_len, fs, &rs, pool));
- }
-
- return SVN_NO_ERROR;
-}
-
-static svn_error_t *
-block_read_contents(svn_stringbuf_t **item,
- svn_fs_t *fs,
- apr_file_t *file,
- svn_stream_t *stream,
- svn_fs_fs__p2l_entry_t* entry,
- pair_cache_key_t *key,
- apr_pool_t *pool)
-{
- representation_cache_key_t header_key = { 0 };
- svn_fs_fs__rep_header_t *rep_header;
-
- header_key.revision = (apr_int32_t)key->revision;
- header_key.is_packed = is_packed_rev(fs, header_key.revision);
- header_key.item_index = key->second;
-
- SVN_ERR(read_rep_header(&rep_header, fs, stream, &header_key, pool));
- SVN_ERR(block_read_windows(rep_header, fs, file, stream, entry, pool));
-
- return SVN_NO_ERROR;
-}
-
-static svn_error_t *
-auto_select_stream(svn_stream_t **stream,
- svn_fs_t *fs,
- apr_file_t *file,
- svn_stream_t *file_stream,
- svn_fs_fs__p2l_entry_t* entry,
- apr_pool_t *pool)
-{
- fs_fs_data_t *ffd = fs->fsap_data;
-
- if (((entry->offset + entry->size) ^ entry->offset) >= ffd->block_size)
- {
- svn_stringbuf_t *text = svn_stringbuf_create_ensure(entry->size, pool);
- text->len = entry->size;
- text->data[text->len] = 0;
- SVN_ERR(svn_io_file_read_full2(file, text->data, text->len, NULL,
- NULL, pool));
- *stream = svn_stream_from_stringbuf(text, pool);
- }
- else
- {
- *stream = file_stream;
- }
-
- return SVN_NO_ERROR;
-}
-
-static svn_error_t *
-block_read_changes(apr_array_header_t **changes,
- svn_fs_t *fs,
- apr_file_t *file,
- svn_stream_t *file_stream,
- svn_fs_fs__p2l_entry_t* entry,
- svn_boolean_t must_read,
- apr_pool_t *pool)
-{
- fs_fs_data_t *ffd = fs->fsap_data;
- svn_stream_t *stream;
- if (!must_read && !ffd->changes_cache)
- return SVN_NO_ERROR;
-
- /* we don't support containers, yet */
- SVN_ERR_ASSERT(entry->item_count == 1);
-
- /* already in cache? */
- if (!must_read && ffd->changes_cache)
- {
- svn_boolean_t is_cached = FALSE;
- SVN_ERR(svn_cache__has_key(&is_cached, ffd->changes_cache,
- &entry->items[0].revision, pool));
- if (is_cached)
- return SVN_NO_ERROR;
- }
-
- SVN_ERR(auto_select_stream(&stream, fs, file, file_stream, entry, pool));
-
- /* read changes from revision file */
-
- SVN_ERR(svn_fs_fs__read_changes(changes, stream, pool));
-
- /* cache for future reference */
-
- if (ffd->changes_cache)
- SVN_ERR(svn_cache__set(ffd->changes_cache, &entry->items[0].revision,
- *changes, pool));
-
- return SVN_NO_ERROR;
-}
-
-static svn_error_t *
-block_read_changes_container(apr_array_header_t **changes,
- svn_fs_t *fs,
- apr_file_t *file,
- svn_stream_t *file_stream,
- svn_fs_fs__p2l_entry_t* entry,
- apr_uint32_t sub_item,
- svn_boolean_t must_read,
- apr_pool_t *pool)
-{
- fs_fs_data_t *ffd = fs->fsap_data;
- svn_fs_fs__changes_t *container;
- pair_cache_key_t key;
- svn_stream_t *stream;
-
- key.revision = packed_base_rev(fs, entry->items[0].revision);
- key.second = entry->offset;
-
- /* already in cache? */
- if (!must_read && ffd->changes_container_cache)
- {
- svn_boolean_t is_cached = FALSE;
- SVN_ERR(svn_cache__has_key(&is_cached, ffd->changes_container_cache,
- &key, pool));
- if (is_cached)
- return SVN_NO_ERROR;
- }
-
- SVN_ERR(auto_select_stream(&stream, fs, file, file_stream, entry, pool));
-
- /* read changes from revision file */
-
- SVN_ERR(svn_fs_fs__read_changes_container(&container, stream, pool, pool));
-
- /* extract requested data */
-
- if (must_read)
- SVN_ERR(svn_fs_fs__changes_get_list(changes, container, sub_item, pool));
-
- if (ffd->changes_container_cache)
- SVN_ERR(svn_cache__set(ffd->changes_container_cache, &key, container,
- pool));
-
- return SVN_NO_ERROR;
-}
-
-static svn_error_t *
-block_read_noderev(node_revision_t **noderev_p,
- svn_fs_t *fs,
- apr_file_t *file,
- svn_stream_t *file_stream,
- svn_fs_fs__p2l_entry_t* entry,
- pair_cache_key_t *key,
- svn_boolean_t must_read,
- apr_pool_t *pool)
-{
- fs_fs_data_t *ffd = fs->fsap_data;
- svn_stream_t *stream;
- if (!must_read && !ffd->node_revision_cache)
- return SVN_NO_ERROR;
-
- /* we don't support containers, yet */
- SVN_ERR_ASSERT(entry->item_count == 1);
-
- /* already in cache? */
- if (!must_read && ffd->node_revision_cache)
- {
- svn_boolean_t is_cached = FALSE;
- SVN_ERR(svn_cache__has_key(&is_cached, ffd->node_revision_cache, key,
- pool));
- if (is_cached)
- return SVN_NO_ERROR;
- }
-
- SVN_ERR(auto_select_stream(&stream, fs, file, file_stream, entry, pool));
-
- /* read node rev from revision file */
-
- SVN_ERR(svn_fs_fs__read_noderev(noderev_p, stream, pool));
-
- /* Workaround issue #4031: is-fresh-txn-root in revision files. */
- (*noderev_p)->is_fresh_txn_root = FALSE;
-
- if (ffd->node_revision_cache)
- SVN_ERR(svn_cache__set(ffd->node_revision_cache, key, *noderev_p, pool));
-
- return SVN_NO_ERROR;
-}
-
-static svn_error_t *
-block_read_noderevs_container(node_revision_t **noderev_p,
- svn_fs_t *fs,
- apr_file_t *file,
- svn_stream_t *file_stream,
- svn_fs_fs__p2l_entry_t* entry,
- apr_uint32_t sub_item,
- svn_boolean_t must_read,
- apr_pool_t *pool)
-{
- fs_fs_data_t *ffd = fs->fsap_data;
- svn_fs_fs__noderevs_t *container;
- svn_stream_t *stream;
- pair_cache_key_t key;
-
- key.revision = packed_base_rev(fs, entry->items[0].revision);
- key.second = entry->offset;
-
- /* already in cache? */
- if (!must_read && ffd->noderevs_container_cache)
- {
- svn_boolean_t is_cached = FALSE;
- SVN_ERR(svn_cache__has_key(&is_cached, ffd->noderevs_container_cache,
- &key, pool));
- if (is_cached)
- return SVN_NO_ERROR;
- }
-
- SVN_ERR(auto_select_stream(&stream, fs, file, file_stream, entry, pool));
-
- /* read noderevs from revision file */
-
- SVN_ERR(svn_fs_fs__read_noderevs_container(&container, stream, pool, pool));
-
- /* extract requested data */
-
- if (must_read)
- SVN_ERR(svn_fs_fs__noderevs_get(noderev_p, container, sub_item, pool));
-
- if (ffd->noderevs_container_cache)
- SVN_ERR(svn_cache__set(ffd->noderevs_container_cache, &key, container,
- pool));
-
- return SVN_NO_ERROR;
-}
-
-static svn_error_t *
-block_read_reps_container(svn_fs_fs__rep_extractor_t **extractor,
- svn_fs_t *fs,
- apr_file_t *file,
- svn_stream_t *file_stream,
- svn_fs_fs__p2l_entry_t* entry,
- apr_uint32_t sub_item,
- svn_boolean_t must_read,
- apr_pool_t *pool)
-{
- fs_fs_data_t *ffd = fs->fsap_data;
- svn_fs_fs__reps_t *container;
- svn_stream_t *stream;
- pair_cache_key_t key;
-
- key.revision = packed_base_rev(fs, entry->items[0].revision);
- key.second = entry->offset;
-
- /* already in cache? */
- if (!must_read && ffd->reps_container_cache)
- {
- svn_boolean_t is_cached = FALSE;
- SVN_ERR(svn_cache__has_key(&is_cached, ffd->reps_container_cache,
- &key, pool));
- if (is_cached)
- return SVN_NO_ERROR;
- }
-
- SVN_ERR(auto_select_stream(&stream, fs, file, file_stream, entry, pool));
-
- /* read noderevs from revision file */
-
- SVN_ERR(svn_fs_fs__read_reps_container(&container, stream, pool, pool));
-
- /* extract requested data */
-
- if (must_read)
- SVN_ERR(svn_fs_fs__reps_get(extractor, fs, container, sub_item, pool));
-
- if (ffd->noderevs_container_cache)
- SVN_ERR(svn_cache__set(ffd->reps_container_cache, &key, container,
- pool));
-
- return SVN_NO_ERROR;
-}
-
-static svn_error_t *
-block_read(void **result,
- svn_fs_t *fs,
- svn_revnum_t revision,
- apr_uint64_t item_index,
- apr_file_t *revision_file,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
-{
- fs_fs_data_t *ffd = fs->fsap_data;
- apr_off_t offset, wanted_offset = 0;
- apr_off_t block_start = 0;
- apr_uint32_t wanted_sub_item = 0;
- apr_array_header_t *entries;
- int run_count = 0;
- int i;
- apr_pool_t *iterpool = svn_pool_create(scratch_pool);
- svn_stream_t *stream = svn_stream_from_aprfile2(revision_file, TRUE,
- scratch_pool);
-
- /* don't try this on transaction protorev files */
- SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(revision));
-
- /* index lookup: find the OFFSET of the item we *must* read plus (in the
- * "do-while" block) the list of items in the same block. */
- SVN_ERR(svn_fs_fs__item_offset(&wanted_offset, &wanted_sub_item, fs,
- revision, NULL, item_index, iterpool));
-
- offset = wanted_offset;
- do
- {
- SVN_ERR(svn_fs_fs__p2l_index_lookup(&entries, fs, revision, offset,
- scratch_pool));
- SVN_ERR(aligned_seek(fs, revision_file, &block_start, offset, iterpool));
-
- /* read all items from the block */
- for (i = 0; i < entries->nelts; ++i)
- {
- svn_boolean_t is_result;
- apr_pool_t *pool;
-
- svn_fs_fs__p2l_entry_t* entry
- = &APR_ARRAY_IDX(entries, i, svn_fs_fs__p2l_entry_t);
-
- /* skip empty sections */
- if (entry->type == SVN_FS_FS__ITEM_TYPE_UNUSED)
- continue;
-
- /* the item / container we were looking for? */
- is_result = result
- && entry->offset == wanted_offset
- && entry->item_count >= wanted_sub_item
- && entry->items[wanted_sub_item].revision == revision
- && entry->items[wanted_sub_item].number == item_index;
-
- /* select the pool that we want the item to be allocated in */
- pool = is_result ? result_pool : iterpool;
-
- /* handle all items that start within this block and are relatively
- * small (i.e. < block size). Always read the item we need to return.
- */
- if (is_result || ( entry->offset >= block_start
- && entry->size < ffd->block_size))
- {
- void *item = NULL;
- pair_cache_key_t key = { 0 };
- key.revision = entry->items[0].revision;
- key.second = entry->items[0].number;
-
- SVN_ERR(svn_io_file_seek(revision_file, SEEK_SET,
- &entry->offset, iterpool));
- switch (entry->type)
- {
- case SVN_FS_FS__ITEM_TYPE_FILE_REP:
- case SVN_FS_FS__ITEM_TYPE_DIR_REP:
- case SVN_FS_FS__ITEM_TYPE_FILE_PROPS:
- case SVN_FS_FS__ITEM_TYPE_DIR_PROPS:
- SVN_ERR(block_read_contents((svn_stringbuf_t **)&item,
- fs, revision_file, stream,
- entry, &key, pool));
- break;
-
- case SVN_FS_FS__ITEM_TYPE_NODEREV:
- if (ffd->node_revision_cache || is_result)
- SVN_ERR(block_read_noderev((node_revision_t **)&item,
- fs, revision_file, stream,
- entry, &key, is_result,
- pool));
- break;
-
- case SVN_FS_FS__ITEM_TYPE_CHANGES:
- SVN_ERR(block_read_changes((apr_array_header_t **)&item,
- fs, revision_file, stream,
- entry, is_result, pool));
- break;
-
- case SVN_FS_FS__ITEM_TYPE_CHANGES_CONT:
- SVN_ERR(block_read_changes_container
- ((apr_array_header_t **)&item,
- fs, revision_file, stream,
- entry, wanted_sub_item,
- is_result, pool));
- break;
-
- case SVN_FS_FS__ITEM_TYPE_NODEREVS_CONT:
- SVN_ERR(block_read_noderevs_container
- ((node_revision_t **)&item,
- fs, revision_file, stream,
- entry, wanted_sub_item,
- is_result, pool));
- break;
-
- case SVN_FS_FS__ITEM_TYPE_REPS_CONT:
- SVN_ERR(block_read_reps_container
- ((svn_fs_fs__rep_extractor_t **)&item,
- fs, revision_file, stream,
- entry, wanted_sub_item,
- is_result, pool));
- break;
-
- default:
- break;
- }
-
- if (is_result)
- *result = item;
-
- /* if we crossed a block boundary, read the remainder of
- * the last block as well */
- offset = entry->offset + entry->size;
- if (offset > block_start + ffd->block_size)
- ++run_count;
-
- svn_pool_clear(iterpool);
- }
- }
-
- }
- while(run_count++ == 1); /* can only be true once and only if a block
- * boundary got crossed */
-
- /* if the caller requested a result, we must have provided one by now */
- assert(!result || *result);
- SVN_ERR(svn_stream_close(stream));
- svn_pool_destroy(iterpool);
-
- return SVN_NO_ERROR;
-}
Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.h?rev=1498165&r1=1498164&r2=1498165&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.h Sun Jun 30 17:44:56 2013
@@ -75,21 +75,6 @@ svn_fs_fs__get_contents(svn_stream_t **c
representation_t *rep,
apr_pool_t *pool);
-/* Determine on-disk and expanded sizes of the representation identified
- * by ENTRY in FS and return the result in PACKED_LEN and EXPANDED_LEN,
- * respectively. FILE must point to the start of the representation and
- * STREAM must be a stream defined on top of FILE.
- * Use POOL for allocations.
- */
-svn_error_t *
-svn_fs_fs__get_representation_length(svn_filesize_t *packed_len,
- svn_filesize_t *expanded_len,
- svn_fs_t *fs,
- apr_file_t *file,
- svn_stream_t *stream,
- svn_fs_fs__p2l_entry_t* entry,
- apr_pool_t *pool);
-
/* Attempt to fetch the text representation of node-revision NODEREV as
seen in filesystem FS and pass it along with the BATON to the PROCESSOR.
Set *SUCCESS only of the data could be provided and the processing
Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/caching.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/caching.c?rev=1498165&r1=1498164&r2=1498165&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/caching.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/caching.c Sun Jun 30 17:44:56 2013
@@ -26,10 +26,7 @@
#include "dag.h"
#include "tree.h"
#include "index.h"
-#include "changes.h"
-#include "noderevs.h"
#include "temp_serializer.h"
-#include "reps.h"
#include "../libsvn_fs/fs-loader.h"
#include "svn_config.h"
@@ -659,113 +656,6 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
ffd->combined_window_cache = NULL;
}
- if (ffd->format >= SVN_FS_FS__MIN_LOG_ADDRESSING_FORMAT)
- {
- SVN_ERR(create_cache(&(ffd->noderevs_container_cache),
- NULL,
- membuffer,
- 0, 0, /* Do not use inprocess cache */
- svn_fs_fs__serialize_noderevs_container,
- svn_fs_fs__deserialize_noderevs_container,
- sizeof(pair_cache_key_t),
- apr_pstrcat(pool, prefix, "NODEREVSCNT",
- (char *)NULL),
- SVN_CACHE__MEMBUFFER_HIGH_PRIORITY,
- fs,
- no_handler,
- fs->pool));
- SVN_ERR(create_cache(&(ffd->changes_container_cache),
- NULL,
- membuffer,
- 0, 0, /* Do not use inprocess cache */
- svn_fs_fs__serialize_changes_container,
- svn_fs_fs__deserialize_changes_container,
- sizeof(pair_cache_key_t),
- apr_pstrcat(pool, prefix, "CHANGESCNT",
- (char *)NULL),
- 0,
- fs,
- no_handler,
- fs->pool));
- SVN_ERR(create_cache(&(ffd->reps_container_cache),
- NULL,
- membuffer,
- 0, 0, /* Do not use inprocess cache */
- svn_fs_fs__serialize_reps_container,
- svn_fs_fs__deserialize_reps_container,
- sizeof(pair_cache_key_t),
- apr_pstrcat(pool, prefix, "REPSCNT",
- (char *)NULL),
- 0,
- fs,
- no_handler,
- fs->pool));
-
- SVN_ERR(create_cache(&(ffd->l2p_header_cache),
- NULL,
- membuffer,
- 0, 0, /* Do not use inprocess cache */
- svn_fs_fs__serialize_l2p_header,
- svn_fs_fs__deserialize_l2p_header,
- sizeof(pair_cache_key_t),
- apr_pstrcat(pool, prefix, "L2P_HEADER",
- (char *)NULL),
- SVN_CACHE__MEMBUFFER_HIGH_PRIORITY,
- fs,
- no_handler,
- fs->pool));
- SVN_ERR(create_cache(&(ffd->l2p_page_cache),
- NULL,
- membuffer,
- 0, 0, /* Do not use inprocess cache */
- svn_fs_fs__serialize_l2p_page,
- svn_fs_fs__deserialize_l2p_page,
- sizeof(svn_fs_fs__page_cache_key_t),
- apr_pstrcat(pool, prefix, "L2P_PAGE",
- (char *)NULL),
- SVN_CACHE__MEMBUFFER_HIGH_PRIORITY,
- fs,
- no_handler,
- fs->pool));
- SVN_ERR(create_cache(&(ffd->p2l_header_cache),
- NULL,
- membuffer,
- 0, 0, /* Do not use inprocess cache */
- svn_fs_fs__serialize_p2l_header,
- svn_fs_fs__deserialize_p2l_header,
- sizeof(pair_cache_key_t),
- apr_pstrcat(pool, prefix, "P2L_HEADER",
- (char *)NULL),
- SVN_CACHE__MEMBUFFER_HIGH_PRIORITY,
- fs,
- no_handler,
- fs->pool));
- SVN_ERR(create_cache(&(ffd->p2l_page_cache),
- NULL,
- membuffer,
- 0, 0, /* Do not use inprocess cache */
- svn_fs_fs__serialize_p2l_page,
- svn_fs_fs__deserialize_p2l_page,
- sizeof(svn_fs_fs__page_cache_key_t),
- apr_pstrcat(pool, prefix, "P2L_PAGE",
- (char *)NULL),
- SVN_CACHE__MEMBUFFER_HIGH_PRIORITY,
- fs,
- no_handler,
- fs->pool));
- }
- else
- {
- ffd->noderevs_container_cache = NULL;
- ffd->changes_container_cache = NULL;
- ffd->reps_container_cache = NULL;
-
- ffd->l2p_header_cache = NULL;
- ffd->l2p_page_cache = NULL;
- ffd->p2l_header_cache = NULL;
- ffd->p2l_page_cache = NULL;
- }
-
return SVN_NO_ERROR;
}
Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs.h?rev=1498165&r1=1498164&r2=1498165&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs.h Sun Jun 30 17:44:56 2013
@@ -109,15 +109,11 @@ extern "C" {
#define CONFIG_SECTION_PACKED_REVPROPS "packed-revprops"
#define CONFIG_OPTION_REVPROP_PACK_SIZE "revprop-pack-size"
#define CONFIG_OPTION_COMPRESS_PACKED_REVPROPS "compress-packed-revprops"
-#define CONFIG_SECTION_IO "io"
-#define CONFIG_OPTION_BLOCK_SIZE "block-size"
-#define CONFIG_OPTION_L2P_PAGE_SIZE "l2p-page-size"
-#define CONFIG_OPTION_P2L_PAGE_SIZE "p2l-page-size"
/* The format number of this filesystem.
This is independent of the repository format number, and
independent of any other FS back ends. */
-#define SVN_FS_FS__FORMAT_NUMBER 7
+#define SVN_FS_FS__FORMAT_NUMBER 6
/* The minimum format number that supports svndiff version 1. */
#define SVN_FS_FS__MIN_SVNDIFF1_FORMAT 2
@@ -160,9 +156,6 @@ extern "C" {
/* The minimum format number that supports packed revprops. */
#define SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT 6
-/* The minimum format number that supports packed revprops. */
-#define SVN_FS_FS__MIN_LOG_ADDRESSING_FORMAT 7
-
/* The minimum format number that supports a configuration file (fsfs.conf) */
#define SVN_FS_FS__MIN_CONFIG_FILE 4
@@ -279,15 +272,6 @@ typedef struct fs_fs_data_t
layouts) or zero (for linear layouts). */
int max_files_per_dir;
- /* Rev / pack file read granularity. */
- apr_int64_t block_size;
-
- /* Capacity in entries of log-to-phys index pages */
- apr_int64_t l2p_page_size;
-
- /* Rev / pack file granularity covered by phys-to-log index pages */
- apr_int64_t p2l_page_size;
-
/* The revision that was youngest, last time we checked. */
svn_revnum_t youngest_rev_cache;
@@ -353,22 +337,10 @@ typedef struct fs_fs_data_t
* the key is (revision, item index) */
svn_cache__t *node_revision_cache;
- /* Cache for noderevs_t containers;
- the key is a (pack file revision, file offset) pair */
- svn_cache__t *noderevs_container_cache;
-
/* Cache for change lists as APR arrays of change_t * objects; the key
is the revision */
svn_cache__t *changes_cache;
- /* Cache for change_list_t containers;
- the key is a (pack file revision, file offset) pair */
- svn_cache__t *changes_container_cache;
-
- /* Cache for star-delta / representation containers;
- the key is a (pack file revision, file offset) pair */
- svn_cache__t *reps_container_cache;
-
/* Cache for svn_fs_fs__rep_header_t objects; the key is a
(revision, item index) pair */
svn_cache__t *rep_header_cache;
@@ -382,23 +354,6 @@ typedef struct fs_fs_data_t
if the node has mergeinfo, "0" if it doesn't. */
svn_cache__t *mergeinfo_existence_cache;
- /* Cache for l2p_header_t objects; the key is (revision, is-packed).
- Will be NULL for pre-format7 repos */
- svn_cache__t *l2p_header_cache;
-
- /* Cache for l2p_page_t objects; the key is svn_fs_fs__page_cache_key_t.
- Will be NULL for pre-format7 repos */
- svn_cache__t *l2p_page_cache;
-
- /* Cache for p2l_header_t objects; the key is (revision, is-packed).
- Will be NULL for pre-format7 repos */
- svn_cache__t *p2l_header_cache;
-
- /* Cache for apr_array_header_t objects containing svn_fs_fs__p2l_entry_t
- elements; the key is svn_fs_fs__page_cache_key_t.
- Will be NULL for pre-format7 repos */
- svn_cache__t *p2l_page_cache;
-
/* TRUE while the we hold a lock on the write lock file. */
svn_boolean_t has_write_lock;
Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs_fs.c?rev=1498165&r1=1498164&r2=1498165&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs_fs.c Sun Jun 30 17:44:56 2013
@@ -325,32 +325,6 @@ read_config(fs_fs_data_t *ffd,
ffd->compress_packed_revprops = FALSE;
}
- if (ffd->format >= SVN_FS_FS__MIN_LOG_ADDRESSING_FORMAT)
- {
- SVN_ERR(svn_config_get_int64(ffd->config, &ffd->block_size,
- CONFIG_SECTION_IO,
- CONFIG_OPTION_BLOCK_SIZE,
- 64));
- SVN_ERR(svn_config_get_int64(ffd->config, &ffd->l2p_page_size,
- CONFIG_SECTION_IO,
- CONFIG_OPTION_L2P_PAGE_SIZE,
- 0x2000));
- SVN_ERR(svn_config_get_int64(ffd->config, &ffd->p2l_page_size,
- CONFIG_SECTION_IO,
- CONFIG_OPTION_P2L_PAGE_SIZE,
- 64));
-
- ffd->block_size *= 0x400;
- ffd->p2l_page_size *= 0x400;
- }
- else
- {
- /* should be irrelevant but we initialize them anyway */
- ffd->block_size = 0x1000;
- ffd->l2p_page_size = 0x2000;
- ffd->p2l_page_size = 0x1000;
- }
-
return SVN_NO_ERROR;
}
@@ -485,58 +459,6 @@ write_config(svn_fs_t *fs,
"### unless you often modify revprops after packing." NL
"### Compressing packed revprops is enabled by default." NL
"# " CONFIG_OPTION_COMPRESS_PACKED_REVPROPS " = true" NL
-"" NL
-"[" CONFIG_SECTION_IO "]" NL
-"### Parameters in this section control the data access granularity in" NL
-"### format 7 repositories and later. The defaults should translate into" NL
-"### decent performance over a wide range of setups." NL
-"###" NL
-"### When a specific piece of information needs to be read from disk, a" NL
-"### data block is being read at once and its contents are being cached." NL
-"### If the repository is being stored on a RAID, the block size should" NL
-"### be either 50% or 100% of RAID block size / granularity. Also, your" NL
-"### file system (clusters) should be properly aligned and sized. In that" NL
-"### setup, each access will hit only one disk (minimizes I/O load) but" NL
-"### uses all the data provided by the disk in a single access." NL
-"### For SSD-based storage systems, slightly lower values around 16 kB" NL
-"### may improve latency while still maximizing throughput." NL
-"### Can be changed at any time but must be a power of 2." NL
-"### block-size is 64 kBytes by default." NL
-"# " CONFIG_OPTION_BLOCK_SIZE " = 64" NL
-"###" NL
-"### The log-to-phys index maps data item numbers to offsets within the" NL
-"### rev or pack file. A revision typically contains 2 .. 5 such items" NL
-"### per changed path. For each revision, at least one page is being" NL
-"### allocated in the l2p index with unused parts resulting in no wasted" NL
-"### space." NL
-"### Changing this parameter only affects larger revisions with thousands" NL
-"### of changed paths. A smaller value means that more pages need to be" NL
-"### allocated for such revisions, increasing the size of the page table" NL
-"### meaning it takes longer to read that table (once). Access to each" NL
-"### page is then faster because less data has to read. So, if you have" NL
-"### several extremely large revisions (approaching 1 mio changes), think" NL
-"### about increasing this setting. Reducing the value will rarely result" NL
-"### in a net speedup." NL
-"### This is an expert setting. Any non-zero value is possible." NL
-"### l2p-page-size is 8192 entries by default." NL
-"# " CONFIG_OPTION_L2P_PAGE_SIZE " = 8192" NL
-"###" NL
-"### The phys-to-log index maps positions within the rev or pack file to" NL
-"### to data items, i.e. describes what piece of information is being" NL
-"### stored at that particular offset. The index describes the rev file" NL
-"### in chunks (pages) and keeps a global list of all those pages. Large" NL
-"### pages mean a shorter page table but a larger per-page description of" NL
-"### data items in it. The latency sweetspot depends on the change size" NL
-"### distribution but is relatively wide." NL
-"### If the repository contains very large files, i.e. individual changes" NL
-"### of tens of MB each, increasing the page size will shorten the index" NL
-"### file at the expense of a slightly increased latency in sections with" NL
-"### smaller changes." NL
-"### For practical reasons, this should match block-size. Differing" NL
-"### values are perfectly legal but may result in some processing overhead." NL
-"### Must be a power of 2." NL
-"### p2l-page-size is 64 kBytes by default." NL
-"# " CONFIG_OPTION_P2L_PAGE_SIZE " = 64" NL
;
#undef NL
return svn_io_file_create(svn_dirent_join(fs->path, PATH_CONFIG, pool),
@@ -943,57 +865,18 @@ write_revision_zero(svn_fs_t *fs)
fs_fs_data_t *ffd = fs->fsap_data;
/* Write out a rev file for revision 0. */
- if (ffd->format < SVN_FS_FS__MIN_LOG_ADDRESSING_FORMAT)
- SVN_ERR(svn_io_file_create(path_revision_zero,
- "PLAIN\nEND\nENDREP\n"
- "id: 0.0.r0/17\n"
- "type: dir\n"
- "count: 0\n"
- "text: 0 0 4 4 "
- "2d2977d1c96f487abe4a1e202dd03b4e\n"
- "cpath: /\n"
- "\n\n17 107\n", fs->pool));
- else
- SVN_ERR(svn_io_file_create(path_revision_zero,
- "PLAIN\nEND\nENDREP\n"
- "id: 0.0.r0/2\n"
- "type: dir\n"
- "count: 0\n"
- "text: 0 3 4 4 "
- "2d2977d1c96f487abe4a1e202dd03b4e\n"
- "cpath: /\n"
- "\n\n", fs->pool));
+ SVN_ERR(svn_io_file_create(path_revision_zero,
+ "PLAIN\nEND\nENDREP\n"
+ "id: 0.0.r0/17\n"
+ "type: dir\n"
+ "count: 0\n"
+ "text: 0 0 4 4 "
+ "2d2977d1c96f487abe4a1e202dd03b4e\n"
+ "cpath: /\n"
+ "\n\n17 107\n", fs->pool));
SVN_ERR(svn_io_set_file_read_only(path_revision_zero, FALSE, fs->pool));
- if (ffd->format >= SVN_FS_FS__MIN_LOG_ADDRESSING_FORMAT)
- {
- const char *path = path_l2p_index(fs, 0, fs->pool);
- SVN_ERR(svn_io_file_create_binary
- (path,
- "\0\1\x80\x40\1\1" /* rev 0, single page */
- "\5\4" /* page size: bytes, count */
- "\0" /* 0 container offsets in list */
- "\0\x6b\x12\1", /* phys offsets + 1 */
- 13,
- fs->pool));
- SVN_ERR(svn_io_set_file_read_only(path, FALSE, fs->pool));
-
- path = path_p2l_index(fs, 0, fs->pool);
- SVN_ERR(svn_io_file_create_binary
- (path,
- "\0" /* start rev */
- "\x80\x80\4\1\x11" /* 64k pages, 1 page using 17 bytes */
- "\0" /* offset entry 0 page 1 */
- "\x11\x11\0\6" /* len, type + 16 * count, (rev, item)* */
- "\x59\x15\0\4"
- "\1\x16\0\2"
- "\x95\xff\3\0", /* last entry fills up 64k page */
- 23,
- fs->pool));
- SVN_ERR(svn_io_set_file_read_only(path, FALSE, fs->pool));
- }
-
/* Set a date on revision 0. */
date.data = svn_time_to_cstring(apr_time_now(), fs->pool);
date.len = strlen(date.data);
@@ -1398,11 +1281,8 @@ svn_fs_fs__info_format(int *fs_format,
case 6:
(*supports_version)->minor = 8;
break;
- case 7:
- (*supports_version)->minor = 9;
- break;
#ifdef SVN_DEBUG
-# if SVN_FS_FS__FORMAT_NUMBER != 7
+# if SVN_FS_FS__FORMAT_NUMBER != 6
# error "Need to add a 'case' statement here"
# endif
#endif
Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/id.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/id.c?rev=1498165&r1=1498164&r2=1498165&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/id.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/id.c Sun Jun 30 17:44:56 2013
@@ -360,21 +360,6 @@ svn_fs_fs__id_txn_create_root(const svn_
return (svn_fs_id_t *)id;
}
-svn_fs_id_t *svn_fs_fs__id_create_root(const svn_revnum_t revision,
- apr_pool_t *pool)
-{
- fs_fs__id_t *id = apr_pcalloc(pool, sizeof(*id));
-
- id->txn_id.revision = SVN_INVALID_REVNUM;
- id->rev_item.revision = revision;
- id->rev_item.number = SVN_FS_FS__ITEM_INDEX_ROOT_NODE;
-
- id->generic_id.vtable = &id_vtable;
- id->generic_id.fsap_data = &id;
-
- return (svn_fs_id_t *)id;
-}
-
svn_fs_id_t *
svn_fs_fs__id_txn_create(const svn_fs_fs__id_part_t *node_id,
const svn_fs_fs__id_part_t *copy_id,
Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/id.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/id.h?rev=1498165&r1=1498164&r2=1498165&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/id.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/id.h Sun Jun 30 17:44:56 2013
@@ -120,10 +120,6 @@ int svn_fs_fs__id_part_compare(const svn
svn_fs_id_t *svn_fs_fs__id_txn_create_root(const svn_fs_fs__id_part_t *txn_id,
apr_pool_t *pool);
-/* Create the root ID for REVISION. Allocate it in POOL. */
-svn_fs_id_t *svn_fs_fs__id_create_root(const svn_revnum_t revision,
- apr_pool_t *pool);
-
/* Create an ID within a transaction based on NODE_ID, COPY_ID, and
TXN_ID, allocated in POOL. */
svn_fs_id_t *svn_fs_fs__id_txn_create(const svn_fs_fs__id_part_t *node_id,