subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1439210 - in /subversion/trunk/subversion: include/svn_fs.h libsvn_fs/fs-loader.c libsvn_fs/fs-loader.h libsvn_fs_base/fs.c libsvn_fs_fs/fs.c libsvn_fs_fs/fs_fs.c libsvn_fs_fs/fs_fs.h libsvn_repos/dump.c
Date Sun, 27 Jan 2013 23:49:32 GMT
Author: stefan2
Date: Sun Jan 27 23:49:32 2013
New Revision: 1439210

URL: http://svn.apache.org/viewvc?rev=1439210&view=rev
Log:
Follow-up to r1435746:  Improve docstrings for verify-related functions.
Reorder parameters of svn_fs_verify to "general, notify, cancel, pools".

* subversion/include/svn_fs.h
  (svn_fs_verify): improve docstring; reorder parameters

* subversion/libsvn_fs_fs/fs_fs.h
  (svn_fs_fs__verify): improve docstring; reorder parameters
  (svn_fs_fs__verify_rev): improve docstring

* subversion/libsvn_fs_base/fs.c
  (base_verify): update

* subversion/libsvn_fs_fs/fs.c
  (fs_verify): update

* subversion/libsvn_fs_fs/fs_fs.c
  (svn_fs_fs__verify):  update

* subversion/libsvn_fs/fs-loader.c
  (svn_fs_verify): update

* subversion/libsvn_fs/fs-loader.h
  (fs_library_vtable_t): update

* subversion/libsvn_repos/dump.c
  (svn_repos_verify_fs2): update

Suggested by: julianfoad

Modified:
    subversion/trunk/subversion/include/svn_fs.h
    subversion/trunk/subversion/libsvn_fs/fs-loader.c
    subversion/trunk/subversion/libsvn_fs/fs-loader.h
    subversion/trunk/subversion/libsvn_fs_base/fs.c
    subversion/trunk/subversion/libsvn_fs_fs/fs.c
    subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
    subversion/trunk/subversion/libsvn_fs_fs/fs_fs.h
    subversion/trunk/subversion/libsvn_repos/dump.c

Modified: subversion/trunk/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_fs.h?rev=1439210&r1=1439209&r2=1439210&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_fs.h (original)
+++ subversion/trunk/subversion/include/svn_fs.h Sun Jan 27 23:49:32 2013
@@ -277,9 +277,13 @@ typedef void (*svn_fs_progress_notify_fu
 
 /**
  * Perform backend-specific data consistency and correctness validations
- * to the Subversion filesystem located in the directory @a path.
- * Use @a scratch_pool for temporary allocations.
+ * to the Subversion filesystem (mainly the meta-data) located in the
+ * directory @a path.  Use @a scratch_pool for temporary allocations.
  *
+ * @a start and @a end are used to limit the amount of checks being done
+ * to data that is relevant to that range of revisions.  However, this is
+ * only a lower limit to the actual amount of checks being done.  The
+ * backend may not even be able to limit the errors begin reported.
  * @a start and @a end may be #SVN_INVALID_REVNUM, in which case
  * svn_repos_verify_fs2()'s semantics apply.  When @c r0 is being
  * verified, global invariants may be verified as well.
@@ -289,6 +293,9 @@ typedef void (*svn_fs_progress_notify_fu
  * order and more than once for the same revision, i.e. r2, r1, r2 would
  * be a valid sequence.
  *
+ * The optional @a cancel_func callback will be invoked as usual to allow
+ * the user to preempt this potentially lengthy operation.
+ *
  * @note You probably don't want to use this directly.  Take a look at
  * svn_repos_verify_fs2() instead, which does non-backend-specific
  * verifications as well.
@@ -297,12 +304,12 @@ typedef void (*svn_fs_progress_notify_fu
  */
 svn_error_t *
 svn_fs_verify(const char *path,
-              svn_cancel_func_t cancel_func,
-              void *cancel_baton,
-              svn_fs_progress_notify_func_t notify_func,
-              void *notify_baton,
               svn_revnum_t start,
               svn_revnum_t end,
+              svn_fs_progress_notify_func_t notify_func,
+              void *notify_baton,
+              svn_cancel_func_t cancel_func,
+              void *cancel_baton,
               apr_pool_t *scratch_pool);
 
 /**

Modified: subversion/trunk/subversion/libsvn_fs/fs-loader.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs/fs-loader.c?rev=1439210&r1=1439209&r2=1439210&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/trunk/subversion/libsvn_fs/fs-loader.c Sun Jan 27 23:49:32 2013
@@ -483,12 +483,12 @@ svn_fs_upgrade(const char *path, apr_poo
 
 svn_error_t *
 svn_fs_verify(const char *path,
-              svn_cancel_func_t cancel_func,
-              void *cancel_baton,
-              svn_fs_progress_notify_func_t notify_func,
-              void *notify_baton,
               svn_revnum_t start,
               svn_revnum_t end,
+              svn_fs_progress_notify_func_t notify_func,
+              void *notify_baton,
+              svn_cancel_func_t cancel_func,
+              void *cancel_baton,
               apr_pool_t *pool)
 {
   fs_library_vtable_t *vtable;

Modified: subversion/trunk/subversion/libsvn_fs/fs-loader.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs/fs-loader.h?rev=1439210&r1=1439209&r2=1439210&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs/fs-loader.h (original)
+++ subversion/trunk/subversion/libsvn_fs/fs-loader.h Sun Jan 27 23:49:32 2013
@@ -88,11 +88,12 @@ typedef struct fs_library_vtable_t
   svn_error_t *(*upgrade_fs)(svn_fs_t *fs, const char *path, apr_pool_t *pool,
                              apr_pool_t *common_pool);
   svn_error_t *(*verify_fs)(svn_fs_t *fs, const char *path,
-                            svn_cancel_func_t cancel_func, void *cancel_baton,
-                            svn_fs_progress_notify_func_t notify_func,
-                            void *notify_baton,
                             svn_revnum_t start,
                             svn_revnum_t end,
+                            svn_fs_progress_notify_func_t notify_func,
+                            void *notify_baton,
+                            svn_cancel_func_t cancel_func,
+                            void *cancel_baton,
                             apr_pool_t *pool,
                             apr_pool_t *common_pool);
   svn_error_t *(*delete_fs)(const char *path, apr_pool_t *pool);

Modified: subversion/trunk/subversion/libsvn_fs_base/fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/fs.c?rev=1439210&r1=1439209&r2=1439210&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_base/fs.c Sun Jan 27 23:49:32 2013
@@ -902,12 +902,12 @@ base_upgrade(svn_fs_t *fs, const char *p
 
 static svn_error_t *
 base_verify(svn_fs_t *fs, const char *path,
-            svn_cancel_func_t cancel_func,
-            void *cancel_baton,
-            svn_fs_progress_notify_func_t notify_func,
-            void *notify_baton,
             svn_revnum_t start,
             svn_revnum_t end,
+            svn_fs_progress_notify_func_t notify_func,
+            void *notify_baton,
+            svn_cancel_func_t cancel_func,
+            void *cancel_baton,
             apr_pool_t *pool,
             apr_pool_t *common_pool)
 {

Modified: subversion/trunk/subversion/libsvn_fs_fs/fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs.c?rev=1439210&r1=1439209&r2=1439210&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs.c Sun Jan 27 23:49:32 2013
@@ -284,12 +284,12 @@ fs_upgrade(svn_fs_t *fs, const char *pat
 
 static svn_error_t *
 fs_verify(svn_fs_t *fs, const char *path,
-          svn_cancel_func_t cancel_func,
-          void *cancel_baton,
-          svn_fs_progress_notify_func_t notify_func,
-          void *notify_baton,
           svn_revnum_t start,
           svn_revnum_t end,
+          svn_fs_progress_notify_func_t notify_func,
+          void *notify_baton,
+          svn_cancel_func_t cancel_func,
+          void *cancel_baton,
           apr_pool_t *pool,
           apr_pool_t *common_pool)
 {
@@ -298,8 +298,8 @@ fs_verify(svn_fs_t *fs, const char *path
   SVN_ERR(svn_fs_fs__open(fs, path, pool));
   SVN_ERR(svn_fs_fs__initialize_caches(fs, pool));
   SVN_ERR(fs_serialized_init(fs, common_pool, pool));
-  return svn_fs_fs__verify(fs, cancel_func, cancel_baton, notify_func,
-                           notify_baton, start, end, pool);
+  return svn_fs_fs__verify(fs, start, end, notify_func, notify_baton,
+                           cancel_func, cancel_baton, pool);
 }
 
 static svn_error_t *

Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c?rev=1439210&r1=1439209&r2=1439210&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Sun Jan 27 23:49:32 2013
@@ -10362,12 +10362,12 @@ verify_walker(representation_t *rep,
 
 svn_error_t *
 svn_fs_fs__verify(svn_fs_t *fs,
-                  svn_cancel_func_t cancel_func,
-                  void *cancel_baton,
-                  svn_fs_progress_notify_func_t notify_func,
-                  void *notify_baton,
                   svn_revnum_t start,
                   svn_revnum_t end,
+                  svn_fs_progress_notify_func_t notify_func,
+                  void *notify_baton,
+                  svn_cancel_func_t cancel_func,
+                  void *cancel_baton,
                   apr_pool_t *pool)
 {
   fs_fs_data_t *ffd = fs->fsap_data;

Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.h?rev=1439210&r1=1439209&r2=1439210&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.h (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.h Sun Jan 27 23:49:32 2013
@@ -38,17 +38,22 @@ svn_error_t *svn_fs_fs__open(svn_fs_t *f
 svn_error_t *svn_fs_fs__upgrade(svn_fs_t *fs,
                                 apr_pool_t *pool);
 
-/* Verify the fsfs filesystem FS.  Use POOL for temporary allocations. */
+/* Verify metadata in fsfs filesystem FS.  Limit the checks to revisions
+ * START to END where possible.  Indicate progress via the optional
+ * NOTIFY_FUNC callback using NOTIFY_BATON.  The optional CANCEL_FUNC
+ * will periodically be called with CANCEL_BATON to allow for preemption.
+ * Use POOL for temporary allocations. */
 svn_error_t *svn_fs_fs__verify(svn_fs_t *fs,
-                               svn_cancel_func_t cancel_func,
-                               void *cancel_baton,
-                               svn_fs_progress_notify_func_t notify_func,
-                               void *notify_baton,
                                svn_revnum_t start,
                                svn_revnum_t end,
+                               svn_fs_progress_notify_func_t notify_func,
+                               void *notify_baton,
+                               svn_cancel_func_t cancel_func,
+                               void *cancel_baton,
                                apr_pool_t *pool);
 
-/* Verify REVISION in filesystem FS.  Use POOL for temporary allocations. */
+/* Verify metadata of REVISION in filesystem FS.
+ * Use POOL for temporary allocations. */
 svn_error_t *
 svn_fs_fs__verify_rev(svn_fs_t *fs,
                       svn_revnum_t revision,

Modified: subversion/trunk/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/dump.c?rev=1439210&r1=1439209&r2=1439210&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/dump.c (original)
+++ subversion/trunk/subversion/libsvn_repos/dump.c Sun Jan 27 23:49:32 2013
@@ -1442,10 +1442,10 @@ svn_repos_verify_fs2(svn_repos_t *repos,
         = svn_repos_notify_create(svn_repos_notify_verify_struc_rev, pool);
     }
 
-  /* Verify global/auxiliary data and backend-specific data first. */
-  SVN_ERR(svn_fs_verify(svn_fs_path(fs, pool), cancel_func, cancel_baton,
+  /* Verify global metadata and backend-specific data first. */
+  SVN_ERR(svn_fs_verify(svn_fs_path(fs, pool), start_rev, end_rev,
                         verify_notify, verify_notify_baton,
-                        start_rev, end_rev, pool));
+                        cancel_func, cancel_baton, pool));
 
   for (rev = start_rev; rev <= end_rev; rev++)
     {



Mime
View raw message