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/07/17 17:48:57 UTC

svn commit: r1504181 - in /subversion/branches/fsfs-format7: subversion/libsvn_fs_fs/ tools/server-side/

Author: stefan2
Date: Wed Jul 17 15:48:57 2013
New Revision: 1504181

URL: http://svn.apache.org/r1504181
Log:
On the fsfs-format7 branch:  Rename "item index" in FSFS structs 
back to "offset" to bring the code closer to the fsfs-improments
branch.

* subversion/libsvn_fs_fs/fs.h
  (representation_cache_key_t,
   window_cache_key_t,
   representation_t): rename item_index -> offset

* subversion/libsvn_fs_fs/low_level.h
  (svn_fs_fs__rep_header_t): rename base_item_index -> base_offset

* subversion/libsvn_fs_fs/cached_data.c
  (rep_state_t): rename item_index -> offset
  (open_and_seek_transaction,
   open_and_seek_representation,
   create_rep_state_body,
   svn_fs_fs__rep_chain_length,
   get_window_key,
   build_rep_list,
   auto_set_start_offset,
   read_delta_window,
   svn_fs_fs__get_contents,
   svn_fs_fs__try_process_file_contents,
   svn_fs_fs__get_file_delta_stream,
   locate_dir_cache,
   svn_fs_fs__get_proplist): update users

* subversion/libsvn_fs_fs/fs_fs.c
  (svn_fs_fs__noderev_same_rep_key): ditto

* subversion/libsvn_fs_fs/index.c
  (svn_fs_fs__item_offset): ditto

* subversion/libsvn_fs_fs/low_level.c
  (svn_fs_fs__parse_representation,
   svn_fs_fs__unparse_representation,
   svn_fs_fs__read_rep_header,
   svn_fs_fs__write_rep_header): ditto

* subversion/libsvn_fs_fs/recovery.c
  (recover_find_max_ids): ditto

* subversion/libsvn_fs_fs/rep-cache.c
  (svn_fs_fs__walk_rep_reference,
   svn_fs_fs__get_rep_reference,
   svn_fs_fs__set_rep_reference): ditto

* subversion/libsvn_fs_fs/transaction.c
  (rep_write_get_baton,
   rep_write_contents_close,
   write_hash_rep,
   write_hash_delta_rep,
   write_final_rev): ditto

* tools/server-side/svn-rep-sharing-stats.c
  (key_t): rename item_index -> offset
  (record): update user

Modified:
    subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.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/index.c
    subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/low_level.c
    subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/low_level.h
    subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/recovery.c
    subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/rep-cache.c
    subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/transaction.c
    subversion/branches/fsfs-format7/tools/server-side/svn-rep-sharing-stats.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=1504181&r1=1504180&r2=1504181&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 Wed Jul 17 15:48:57 2013
@@ -93,13 +93,13 @@ dgb__log_access(svn_fs_t *fs,
         = node->data_rep
         ? apr_psprintf(scratch_pool, " d=%ld/%" APR_UINT64_T_FMT,
                        node->data_rep->revision,
-                       node->data_rep->item_index)
+                       node->data_rep->offset)
         : "";
       const char *prop_rep
         = node->prop_rep
         ? apr_psprintf(scratch_pool, " p=%ld/%" APR_UINT64_T_FMT,
                        node->prop_rep->revision,
-                       node->prop_rep->item_index)
+                       node->prop_rep->offset)
         : "";
       description = apr_psprintf(scratch_pool, "%s   (pc=%d%s%s)",
                                  node->created_path,
@@ -206,7 +206,7 @@ open_and_seek_transaction(apr_file_t **f
                            APR_READ | APR_BUFFERED, APR_OS_DEFAULT, pool));
 
   SVN_ERR(svn_fs_fs__item_offset(&offset, &sub_item, fs, SVN_INVALID_REVNUM,
-                                 &rep->txn_id, rep->item_index, pool));
+                                 &rep->txn_id, rep->offset, pool));
   SVN_ERR(aligned_seek(rev_file, NULL, offset, pool));
 
   *file = rev_file;
@@ -224,7 +224,7 @@ open_and_seek_representation(apr_file_t 
                              apr_pool_t *pool)
 {
   if (! svn_fs_fs__id_txn_used(&rep->txn_id))
-    return open_and_seek_revision(file_p, fs, rep->revision, rep->item_index,
+    return open_and_seek_revision(file_p, fs, rep->revision, rep->offset,
                                   pool);
   else
     return open_and_seek_transaction(file_p, fs, rep, pool);
@@ -540,8 +540,8 @@ typedef struct rep_state_t
   svn_cache__t *combined_cache;
                     /* revision containing the representation */
   svn_revnum_t revision;
-                    /* representation's item index in REVISION */
-  apr_uint64_t item_index;
+                    /* representation's offset in REVISION */
+  apr_uint64_t offset;
                     /* length of the header at the start of the rep.
                        0 iff this is rep is stored in a container
                        (i.e. does not have a header) */
@@ -591,12 +591,12 @@ create_rep_state_body(rep_state_t **rep_
   representation_cache_key_t key;
   key.revision = rep->revision;
   key.is_packed = rep->revision < ffd->min_unpacked_rev;
-  key.item_index = rep->item_index;
+  key.offset = rep->offset;
 
   /* continue constructing RS and RA */
   rs->size = rep->size;
   rs->revision = rep->revision;
-  rs->item_index = rep->item_index;
+  rs->offset = rep->offset;
   rs->window_cache = ffd->txdelta_window_cache;
   rs->combined_cache = ffd->combined_window_cache;
   rs->ver = -1;
@@ -633,7 +633,7 @@ create_rep_state_body(rep_state_t **rep_
       if (! svn_fs_fs__id_txn_used(&rep->txn_id))
         SVN_ERR(svn_fs_fs__item_offset(&offset, &sub_item,
                                        fs, rep->revision, NULL,
-                                       rep->item_index, pool));
+                                       rep->offset, pool));
 
       if (reuse_shared_file)
         {
@@ -671,7 +671,7 @@ create_rep_state_body(rep_state_t **rep_
           SVN_ERR(svn_cache__set(ffd->rep_header_cache, &key, rh, pool));
     }
 
-  SVN_ERR(dgb__log_access(fs, rep->revision, rep->item_index, rh,
+  SVN_ERR(dgb__log_access(fs, rep->revision, rep->offset, rh,
                           SVN_FS_FS__ITEM_TYPE_ANY_REP, pool));
 
   rs->header_size = rh->header_size;
@@ -783,7 +783,7 @@ svn_fs_fs__rep_chain_length(int *chain_l
                                     sub_pool));
 
       base_rep.revision = header->base_revision;
-      base_rep.item_index = header->base_item_index;
+      base_rep.offset = header->base_offset;
       base_rep.size = header->base_length;
       svn_fs_fs__id_txn_reset(&base_rep.txn_id);
       is_delta = header->type == svn_fs_fs__rep_delta;
@@ -863,7 +863,7 @@ get_window_key(window_cache_key_t *key, 
 {
   assert(rs->revision <= APR_UINT32_MAX);
   key->revision = (apr_uint32_t)rs->revision;
-  key->item_index = rs->item_index;
+  key->offset = rs->offset;
   key->chunk_index = rs->chunk_index;
 
   return key;
@@ -1102,7 +1102,7 @@ build_rep_list(apr_array_header_t **list
         }
 
       rep.revision = rep_header->base_revision;
-      rep.item_index = rep_header->base_item_index;
+      rep.offset = rep_header->base_offset;
       rep.size = rep_header->base_length;
       svn_fs_fs__id_txn_reset(&rep.txn_id);
 
@@ -1179,7 +1179,7 @@ auto_set_start_offset(rep_state_t *rs, a
     {
       SVN_ERR(svn_fs_fs__item_offset(&rs->start, &rs->sub_item,
                                      rs->file->fs, rs->revision, NULL,
-                                     rs->item_index, pool));
+                                     rs->offset, pool));
       rs->start += rs->header_size;
     }
 
@@ -1224,7 +1224,7 @@ read_delta_window(svn_txdelta_window_t *
   apr_off_t end_offset;
   SVN_ERR_ASSERT(rs->chunk_index <= this_chunk);
 
-  SVN_ERR(dgb__log_access(rs->file->fs, rs->revision, rs->item_index,
+  SVN_ERR(dgb__log_access(rs->file->fs, rs->revision, rs->offset,
                           NULL, SVN_FS_FS__ITEM_TYPE_ANY_REP, pool));
 
   /* Read the next window.  But first, try to find it in the cache. */
@@ -1594,7 +1594,7 @@ svn_fs_fs__get_contents(svn_stream_t **c
       struct rep_read_baton *rb;
 
       fulltext_cache_key.revision = rep->revision;
-      fulltext_cache_key.second = rep->item_index;
+      fulltext_cache_key.second = rep->offset;
       if (ffd->fulltext_cache && SVN_IS_VALID_REVNUM(rep->revision)
           && fulltext_size_is_cachable(ffd, len))
         {
@@ -1670,7 +1670,7 @@ svn_fs_fs__try_process_file_contents(svn
       pair_cache_key_t fulltext_cache_key = { 0 };
 
       fulltext_cache_key.revision = rep->revision;
-      fulltext_cache_key.second = rep->item_index;
+      fulltext_cache_key.second = rep->offset;
       if (ffd->fulltext_cache && SVN_IS_VALID_REVNUM(rep->revision)
           && fulltext_size_is_cachable(ffd, rep->expanded_size))
         {
@@ -1747,7 +1747,7 @@ svn_fs_fs__get_file_delta_stream(svn_txd
       if (rep_header->type == svn_fs_fs__rep_self_delta
           || (rep_header->type == svn_fs_fs__rep_delta
               && rep_header->base_revision == source->data_rep->revision
-              && rep_header->base_item_index == source->data_rep->item_index))
+              && rep_header->base_offset == source->data_rep->offset))
         {
           /* Create the delta read baton. */
           struct delta_read_baton *drb = apr_pcalloc(pool, sizeof(*drb));
@@ -1918,7 +1918,7 @@ locate_dir_cache(svn_fs_t *fs,
       if (noderev->data_rep)
         {
           pair_key->revision = noderev->data_rep->revision;
-          pair_key->second = noderev->data_rep->item_index;
+          pair_key->second = noderev->data_rep->offset;
           *key = pair_key;
         }
       else
@@ -2048,7 +2048,7 @@ svn_fs_fs__get_proplist(apr_hash_t **pro
       pair_cache_key_t key = { 0 };
 
       key.revision = rep->revision;
-      key.second = rep->item_index;
+      key.second = rep->offset;
       if (ffd->properties_cache && SVN_IS_VALID_REVNUM(rep->revision))
         {
           svn_boolean_t is_cached;

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=1504181&r1=1504180&r2=1504181&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs.h Wed Jul 17 15:48:57 2013
@@ -240,7 +240,7 @@ typedef struct pair_cache_key_t
   apr_uint64_t second;
 } pair_cache_key_t;
 
-/* Key type that identifies a represenation / rep header. */
+/* Key type that identifies a representation / rep header. */
 typedef struct representation_cache_key_t
 {
   /* Revision that contains the representation */
@@ -249,8 +249,8 @@ typedef struct representation_cache_key_
   /* Packed or non-packed representation? */
   svn_boolean_t is_packed;
 
-  /* Item index of the representation */
-  apr_uint64_t item_index;
+  /* Item offset of the representation */
+  apr_uint64_t offset;
 } representation_cache_key_t;
 
 /* Key type that identifies a txdelta window. */
@@ -262,8 +262,8 @@ typedef struct window_cache_key_t
   /* Window number within that representation */
   int chunk_index;
 
-  /* Item index of the representation */
-  apr_uint64_t item_index;
+  /* Offset of the representation within REVISION */
+  apr_uint64_t offset;
 } window_cache_key_t;
 
 /* Private (non-shared) FSFS-specific data for each svn_fs_t object.
@@ -455,8 +455,8 @@ typedef struct representation_t
   /* Revision where this representation is located. */
   svn_revnum_t revision;
 
-  /* Item index with the the revision. */
-  apr_uint64_t item_index;
+  /* Item offset within the revision. */
+  apr_uint64_t offset;
 
   /* The size of the representation in bytes as seen in the revision
      file. */

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=1504181&r1=1504180&r2=1504181&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 Wed Jul 17 15:48:57 2013
@@ -799,7 +799,7 @@ svn_fs_fs__noderev_same_rep_key(represen
   if (a == NULL || b == NULL)
     return FALSE;
 
-  if (a->item_index != b->item_index)
+  if (a->offset != b->offset)
     return FALSE;
 
   if (a->revision != b->revision)

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/index.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/index.c?rev=1504181&r1=1504180&r2=1504181&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/index.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/index.c Wed Jul 17 15:48:57 2013
@@ -56,7 +56,7 @@ svn_fs_fs__item_offset(apr_off_t *offset
 
   /* older fsfs formats use the manifest file to re-map the offsets */
   *offset = (apr_off_t)item_index;
-  if (!txn_id && is_packed_rev(fs, revision))
+  if (!txn_id && svn_fs_fs__is_packed_rev(fs, revision))
     {
       apr_off_t rev_offset;
 

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/low_level.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/low_level.c?rev=1504181&r1=1504180&r2=1504181&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/low_level.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/low_level.c Wed Jul 17 15:48:57 2013
@@ -254,7 +254,7 @@ svn_fs_fs__parse_representation(represen
     }
 
   SVN_ERR(svn_cstring_atoi64(&val, str));
-  rep->item_index = (apr_off_t)val;
+  rep->offset = (apr_off_t)val;
 
   str = svn_cstring_tokenize(" ", &string);
   if (str == NULL)
@@ -531,7 +531,7 @@ svn_fs_fs__unparse_representation(repres
     return svn_stringbuf_createf
             (pool, "%ld %" APR_OFF_T_FMT " %" SVN_FILESIZE_T_FMT
              " %" SVN_FILESIZE_T_FMT " %s",
-             rep->revision, rep->item_index, rep->size,
+             rep->revision, rep->offset, rep->size,
              rep->expanded_size,
              format_digest(rep->md5_digest, svn_checksum_md5, FALSE, pool));
 
@@ -539,7 +539,7 @@ svn_fs_fs__unparse_representation(repres
   return svn_stringbuf_createf
           (pool, "%ld %" APR_OFF_T_FMT " %" SVN_FILESIZE_T_FMT
            " %" SVN_FILESIZE_T_FMT " %s %s %s/%s",
-           rep->revision, rep->item_index, rep->size,
+           rep->revision, rep->offset, rep->size,
            rep->expanded_size,
            format_digest(rep->md5_digest, svn_checksum_md5, FALSE, pool),
            format_digest(rep->sha1_digest, svn_checksum_sha1,
@@ -666,7 +666,7 @@ svn_fs_fs__read_rep_header(svn_fs_fs__re
   if (! str)
     goto error;
   SVN_ERR(svn_cstring_atoi64(&val, str));
-  (*header)->base_item_index = (apr_off_t)val;
+  (*header)->base_offset = (apr_off_t)val;
 
   str = svn_cstring_tokenize(" ", &last_str);
   if (! str)
@@ -701,7 +701,7 @@ svn_fs_fs__write_rep_header(svn_fs_fs__r
       default:
         text = apr_psprintf(pool, REP_DELTA " %ld %" APR_OFF_T_FMT " %"
                             SVN_FILESIZE_T_FMT "\n",
-                            header->base_revision, header->base_item_index,
+                            header->base_revision, header->base_offset,
                             header->base_length);
     }
 

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/low_level.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/low_level.h?rev=1504181&r1=1504180&r2=1504181&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/low_level.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/low_level.h Wed Jul 17 15:48:57 2013
@@ -116,9 +116,9 @@ typedef struct svn_fs_fs__rep_header_t
   svn_revnum_t base_revision;
 
   /* if this rep is a delta against some other rep, that base rep can
-   * be found at this item index within the base rep's revision.  Should
+   * be found at this offset within the base rep's revision.  Should
    * be 0 if there is no base rep. */
-  apr_off_t base_item_index;
+  apr_off_t base_offset;
 
   /* if this rep is a delta against some other rep, this is the (deltified)
    * size of that base rep.  Should be 0 if there is no base rep. */

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/recovery.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/recovery.c?rev=1504181&r1=1504180&r2=1504181&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/recovery.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/recovery.c Wed Jul 17 15:48:57 2013
@@ -186,7 +186,7 @@ recover_find_max_ids(svn_fs_t *fs, svn_r
   /* We could use get_dir_contents(), but this is much cheaper.  It does
      rely on directory entries being stored as PLAIN reps, though. */
   SVN_ERR(svn_fs_fs__item_offset(&offset, &sub_item, fs, rev, NULL,
-                                 noderev->data_rep->item_index, pool));
+                                 noderev->data_rep->offset, pool));
   SVN_ERR_ASSERT(sub_item == 0);
   SVN_ERR(svn_io_file_seek(rev_file, APR_SET, &offset, pool));
 

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/rep-cache.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/rep-cache.c?rev=1504181&r1=1504180&r2=1504181&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/rep-cache.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/rep-cache.c Wed Jul 17 15:48:57 2013
@@ -204,7 +204,7 @@ svn_fs_fs__walk_rep_reference(svn_fs_t *
       rep->has_sha1 = TRUE;
       memcpy(rep->sha1_digest, checksum->digest, sizeof(rep->sha1_digest));
       rep->revision = svn_sqlite__column_revnum(stmt, 1);
-      rep->item_index = svn_sqlite__column_int64(stmt, 2);
+      rep->offset = svn_sqlite__column_int64(stmt, 2);
       rep->size = svn_sqlite__column_int64(stmt, 3);
       rep->expanded_size = svn_sqlite__column_int64(stmt, 4);
 
@@ -259,7 +259,7 @@ svn_fs_fs__get_rep_reference(representat
              sizeof((*rep)->sha1_digest));
       (*rep)->has_sha1 = TRUE;
       (*rep)->revision = svn_sqlite__column_revnum(stmt, 0);
-      (*rep)->item_index = svn_sqlite__column_int64(stmt, 1);
+      (*rep)->offset = svn_sqlite__column_int64(stmt, 1);
       (*rep)->size = svn_sqlite__column_int64(stmt, 2);
       (*rep)->expanded_size = svn_sqlite__column_int64(stmt, 3);
     }
@@ -301,7 +301,7 @@ svn_fs_fs__set_rep_reference(svn_fs_t *f
   SVN_ERR(svn_sqlite__bindf(stmt, "siiii",
                             svn_checksum_to_cstring(&checksum, pool),
                             (apr_int64_t) rep->revision,
-                            (apr_int64_t) rep->item_index,
+                            (apr_int64_t) rep->offset,
                             (apr_int64_t) rep->size,
                             (apr_int64_t) rep->expanded_size));
 
@@ -324,7 +324,7 @@ svn_fs_fs__set_rep_reference(svn_fs_t *f
       if (old_rep)
         {
           if (reject_dup && ((old_rep->revision != rep->revision)
-                             || (old_rep->item_index != rep->item_index)
+                             || (old_rep->offset != rep->offset)
                              || (old_rep->size != rep->size)
                              || (old_rep->expanded_size != rep->expanded_size)))
             return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
@@ -337,9 +337,9 @@ svn_fs_fs__set_rep_reference(svn_fs_t *f
                               SVN_FILESIZE_T_FMT, APR_OFF_T_FMT,
                               SVN_FILESIZE_T_FMT, SVN_FILESIZE_T_FMT),
                  svn_checksum_to_cstring_display(&checksum, pool),
-                 fs->path, old_rep->revision, old_rep->item_index,
+                 fs->path, old_rep->revision, old_rep->offset,
                  old_rep->size, old_rep->expanded_size, rep->revision,
-                 rep->item_index, rep->size, rep->expanded_size);
+                 rep->offset, rep->size, rep->expanded_size);
           else
             return SVN_NO_ERROR;
         }

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/transaction.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/transaction.c?rev=1504181&r1=1504180&r2=1504181&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/transaction.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/transaction.c Wed Jul 17 15:48:57 2013
@@ -1833,7 +1833,7 @@ rep_write_get_baton(struct rep_write_bat
   if (base_rep)
     {
       header.base_revision = base_rep->revision;
-      header.base_item_index = base_rep->item_index;
+      header.base_offset = base_rep->offset;
       header.base_length = base_rep->size;
       header.type = svn_fs_fs__rep_delta;
     }
@@ -2035,7 +2035,7 @@ rep_write_contents_close(void *baton)
     {
       /* Write out our cosmetic end marker. */
       SVN_ERR(svn_stream_puts(b->rep_stream, "ENDREP\n"));
-      rep->item_index = b->rep_offset;
+      rep->offset = b->rep_offset;
 
       b->noderev->data_rep = rep;
     }
@@ -2287,7 +2287,7 @@ write_hash_rep(representation_t *rep,
       /* Write out our cosmetic end marker. */
       SVN_ERR(svn_stream_puts(whb->stream, "ENDREP\n"));
 
-      rep->item_index = offset;
+      rep->offset = offset;
 
       /* update the representation */
       rep->size = whb->size;
@@ -2344,7 +2344,7 @@ write_hash_delta_rep(representation_t *r
   if (base_rep)
     {
       header.base_revision = base_rep->revision;
-      header.base_item_index = base_rep->item_index;
+      header.base_offset = base_rep->offset;
       header.base_length = base_rep->size;
       header.type = svn_fs_fs__rep_delta;
     }
@@ -2399,7 +2399,7 @@ write_hash_delta_rep(representation_t *r
       SVN_ERR(svn_fs_fs__get_file_offset(&rep_end, file, pool));
       SVN_ERR(svn_stream_puts(file_stream, "ENDREP\n"));
 
-      rep->item_index = offset;
+      rep->offset = offset;
 
       /* update the representation */
       rep->expanded_size = whb->size;
@@ -2614,7 +2614,7 @@ write_final_rev(const svn_fs_id_t **new_
           /* See issue 3845.  Some unknown mechanism caused the
               protorev file to get truncated, so check for that
               here.  */
-          if (noderev->data_rep->item_index + noderev->data_rep->size
+          if (noderev->data_rep->offset + noderev->data_rep->size
               > initial_offset)
             return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
                                     _("Truncated protorev file detected"));

Modified: subversion/branches/fsfs-format7/tools/server-side/svn-rep-sharing-stats.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/tools/server-side/svn-rep-sharing-stats.c?rev=1504181&r1=1504180&r2=1504181&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/tools/server-side/svn-rep-sharing-stats.c (original)
+++ subversion/branches/fsfs-format7/tools/server-side/svn-rep-sharing-stats.c Wed Jul 17 15:48:57 2013
@@ -177,7 +177,7 @@ static svn_error_t *check_experimental(v
 struct key_t
 {
   svn_revnum_t revision;
-  apr_uint64_t item_index;
+  apr_uint64_t offset;
 };
 
 /* What we need to know about a rep. */
@@ -211,7 +211,7 @@ static svn_error_t *record(apr_hash_t *r
    */
   key = apr_pcalloc(result_pool, sizeof(*key));
   key->revision = rep->revision;
-  key->item_index = rep->item_index;
+  key->offset = rep->offset;
 
   /* Update or create the value. */
   if ((value = apr_hash_get(records, key, sizeof(*key))))