subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kot...@apache.org
Subject svn commit: r1603486 - in /subversion/trunk/subversion/libsvn_fs_fs: recovery.c recovery.h
Date Wed, 18 Jun 2014 15:32:26 GMT
Author: kotkov
Date: Wed Jun 18 15:32:26 2014
New Revision: 1603486

URL: http://svn.apache.org/r1603486
Log:
Following up on r1603485, remove the svn_fs_fs__find_max_ids() shortcut,
because the hotcopy code no longer depends on the recovery routines.
See http://svn.haxx.se/dev/archive-2014-06/0053.shtml

* subversion/libsvn_fs_fs/recovery.h
  (svn_fs_fs__find_max_ids): Remove this declaration.

* subversion/libsvn_fs_fs/recovery.c
  (svn_fs_fs__find_max_ids): Inline this ...
  (recover_body): ...here.

Modified:
    subversion/trunk/subversion/libsvn_fs_fs/recovery.c
    subversion/trunk/subversion/libsvn_fs_fs/recovery.h

Modified: subversion/trunk/subversion/libsvn_fs_fs/recovery.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/recovery.c?rev=1603486&r1=1603485&r2=1603486&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/recovery.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/recovery.c Wed Jun 18 15:32:26 2014
@@ -321,29 +321,6 @@ recover_get_root_offset(apr_off_t *root_
   return SVN_NO_ERROR;
 }
 
-svn_error_t *
-svn_fs_fs__find_max_ids(svn_fs_t *fs,
-                        svn_revnum_t youngest,
-                        apr_uint64_t *max_node_id,
-                        apr_uint64_t *max_copy_id,
-                        apr_pool_t *pool)
-{
-  fs_fs_data_t *ffd = fs->fsap_data;
-  apr_off_t root_offset;
-  svn_fs_fs__revision_file_t *rev_file;
-
-  /* call this function for old repo formats only */
-  SVN_ERR_ASSERT(ffd->format < SVN_FS_FS__MIN_NO_GLOBAL_IDS_FORMAT);
-
-  SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&rev_file, fs, youngest, pool));
-  SVN_ERR(recover_get_root_offset(&root_offset, youngest, rev_file, pool));
-  SVN_ERR(recover_find_max_ids(fs, youngest, rev_file, root_offset,
-                               max_node_id, max_copy_id, pool));
-  SVN_ERR(svn_fs_fs__close_revision_file(rev_file));
-
-  return SVN_NO_ERROR;
-}
-
 /* Baton used for recover_body below. */
 struct recover_baton {
   svn_fs_t *fs;
@@ -425,13 +402,19 @@ recover_body(void *baton, apr_pool_t *po
 
       for (rev = 0; rev <= max_rev; rev++)
         {
+          svn_fs_fs__revision_file_t *rev_file;
+          apr_off_t root_offset;
+
           svn_pool_clear(iterpool);
 
           if (b->cancel_func)
             SVN_ERR(b->cancel_func(b->cancel_baton));
 
-          SVN_ERR(svn_fs_fs__find_max_ids(fs, rev, &next_node_id,
-                                          &next_copy_id, iterpool));
+          SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&rev_file, fs, rev, pool));
+          SVN_ERR(recover_get_root_offset(&root_offset, rev, rev_file, pool));
+          SVN_ERR(recover_find_max_ids(fs, rev, rev_file, root_offset,
+                                       &next_node_id, &next_copy_id, pool));
+          SVN_ERR(svn_fs_fs__close_revision_file(rev_file));
         }
       svn_pool_destroy(iterpool);
 

Modified: subversion/trunk/subversion/libsvn_fs_fs/recovery.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/recovery.h?rev=1603486&r1=1603485&r2=1603486&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/recovery.h (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/recovery.h Wed Jun 18 15:32:26 2014
@@ -25,16 +25,6 @@
 
 #include "fs.h"
 
-/* Find the "largest / max" node IDs in FS with the given YOUNGEST revision.
-   Return the result in the pre-allocated MAX_NODE_ID and MAX_COPY_ID data
-   buffer, respectively.   Use POOL for allocations.  */
-svn_error_t *
-svn_fs_fs__find_max_ids(svn_fs_t *fs,
-                        svn_revnum_t youngest,
-                        apr_uint64_t *max_node_id,
-                        apr_uint64_t *max_copy_id,
-                        apr_pool_t *pool);
-
 /* Recover the fsfs associated with filesystem FS.
    Use optional CANCEL_FUNC/CANCEL_BATON for cancellation support.
    Use POOL for temporary allocations. */



Mime
View raw message