Author: stefan2
Date: Fri Mar 7 22:00:25 2014
New Revision: 1575425
URL: http://svn.apache.org/r1575425
Log:
Get rid of remnant of the format7/FSX codevelopment. Since we don't
modify data while packing and reordering it, our cache keys don't need
to be pack-aware. Thus, replace representation_cache_key_t with the
generic pair_cache_key_t.
* subversion/libsvn_fs_fs/fs.h
(representation_cache_key_t): Remove.
* subversion/libsvn_fs_fs/caching.c
(svn_fs_fs__initialize_caches): Use the generic type as key.
* subversion/libsvn_fs_fs/cached_data.c
(create_rep_state_body,
read_rep_header,
block_read_contents): Switch to the generic type. The pack state is
of no concern, hence don't use it in the key.
Modified:
subversion/trunk/subversion/libsvn_fs_fs/cached_data.c
subversion/trunk/subversion/libsvn_fs_fs/caching.c
subversion/trunk/subversion/libsvn_fs_fs/fs.h
Modified: subversion/trunk/subversion/libsvn_fs_fs/cached_data.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/cached_data.c?rev=1575425&r1=1575424&r2=1575425&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/cached_data.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/cached_data.c Fri Mar 7 22:00:25
2014
@@ -731,10 +731,9 @@ create_rep_state_body(rep_state_t **rep_
&& ( ((*shared_file)->revision / ffd->max_files_per_dir)
== (rep->revision / ffd->max_files_per_dir));
- representation_cache_key_t key;
+ pair_cache_key_t key;
key.revision = rep->revision;
- key.is_packed = rep->revision < ffd->min_unpacked_rev;
- key.item_index = rep->item_index;
+ key.second = rep->item_index;
/* continue constructing RS and RA */
rs->size = rep->size;
@@ -2573,7 +2572,7 @@ 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,
+ pair_cache_key_t *key,
apr_pool_t *pool)
{
fs_fs_data_t *ffd = fs->fsap_data;
@@ -2606,12 +2605,11 @@ block_read_contents(svn_fs_t *fs,
svn_fs_fs__p2l_entry_t* entry,
apr_pool_t *pool)
{
- representation_cache_key_t header_key = { 0 };
+ pair_cache_key_t header_key = { 0 };
svn_fs_fs__rep_header_t *rep_header;
header_key.revision = (apr_int32_t)entry->item.revision;
- header_key.is_packed = svn_fs_fs__is_packed_rev(fs, header_key.revision);
- header_key.item_index = entry->item.number;
+ header_key.second = entry->item.number;
SVN_ERR(read_rep_header(&rep_header, fs, rev_file->stream, &header_key,
pool));
Modified: subversion/trunk/subversion/libsvn_fs_fs/caching.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/caching.c?rev=1575425&r1=1575424&r2=1575425&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/caching.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/caching.c Fri Mar 7 22:00:25 2014
@@ -510,7 +510,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
1, 1000, /* ~8 bytes / entry; 1k entries total */
svn_fs_fs__serialize_rep_header,
svn_fs_fs__deserialize_rep_header,
- sizeof(representation_cache_key_t),
+ sizeof(pair_cache_key_t),
apr_pstrcat(pool, prefix, "REPHEADER", SVN_VA_NULL),
SVN_CACHE__MEMBUFFER_HIGH_PRIORITY,
fs,
Modified: subversion/trunk/subversion/libsvn_fs_fs/fs.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs.h?rev=1575425&r1=1575424&r2=1575425&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs.h Fri Mar 7 22:00:25 2014
@@ -264,19 +264,6 @@ typedef struct pair_cache_key_t
apr_int64_t second;
} pair_cache_key_t;
-/* Key type that identifies a representation / rep header. */
-typedef struct representation_cache_key_t
-{
- /* Revision that contains the representation */
- svn_revnum_t revision;
-
- /* Packed or non-packed representation? */
- svn_boolean_t is_packed;
-
- /* Item index of the representation */
- apr_uint64_t item_index;
-} representation_cache_key_t;
-
/* Key type that identifies a txdelta window. */
typedef struct window_cache_key_t
{