> -----Original Message----- > From: stef...@apache.org [mailto:stef...@apache.org] > Sent: dinsdag 23 april 2013 00:27 > To: comm...@subversion.apache.org > Subject: svn commit: r1470738 - in /subversion/trunk/subversion: > include/svn_fs.h libsvn_fs/fs-loader.c libsvn_repos/dump.c > > Author: stefan2 > Date: Mon Apr 22 22:26:39 2013 > New Revision: 1470738 > > URL: http://svn.apache.org/r1470738 > Log: > Make svn_fs_verify accept a FS_CONFIG parameter similar to svn_fs_open() > and svn_fs_create(). Use that in svn_repos_verify_fs2 to check FS with > the same configuration parameters that were used open opening FS. > > Besides the mere symmetry aspect, this is essential use consistent cache > settings during FS verification, particularly using the same, separate > cache namespace. > > * subversion/include/svn_fs.h > (svn_fs_config): declare new API > (svn_fs_verify): add FS_CONFIG parameter > > * subversion/libsvn_fs/fs-loader.c > (svn_fs_verify): pass the FS_CONFIG through to the FS constructor > (svn_fs_config): implement > > * subversion/libsvn_repos/dump.c > (svn_repos_verify_fs2): use the same configuration during verification > as was used to open FS > > Modified: > subversion/trunk/subversion/include/svn_fs.h > subversion/trunk/subversion/libsvn_fs/fs-loader.c > 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=1470738&r1=1470737&r2=1470738&view=diff > ========================================================== > ==================== > --- subversion/trunk/subversion/include/svn_fs.h (original) > +++ subversion/trunk/subversion/include/svn_fs.h Mon Apr 22 22:26:39 > 2013 > @@ -325,6 +325,20 @@ svn_fs_path(svn_fs_t *fs, > apr_pool_t *pool); > > /** > + * Return a shallow copy of the configuration parameters used to open > + * @a fs, allocated in @a pool. It may be @c NULL. The contents of the > + * hash contents remains valid only for @a fs's lifetime. > + * > + * @note This is just what was passed to svn_fs_create() or svn_fs_open(). > + * You may not modify it. > + * > + * @since New in 1.8. > + */ > +apr_hash_t * > +svn_fs_config(svn_fs_t *fs, > + apr_pool_t *pool); > + > +/** > * Delete the filesystem at @a path. > * > * @note: Deleting a filesystem that has an open svn_fs_t is not > @@ -2466,7 +2480,9 @@ svn_fs_pack(const char *db_path, > /** > * Perform backend-specific data consistency and correctness validations > * to the Subversion filesystem (mainly the meta-data) located in the > - * directory @a path. Use @a scratch_pool for temporary allocations. > + * directory @a path. Use the backend-specific configuration @a fs_config > + * when opening the filesystem. @a NULL is valid for all backends. > + * Use @a scratch_pool for temporary allocations. > * > * @a start and @a end define the (minimum) range of revisions to check. > * If @a start is #SVN_INVALID_REVNUM, it defaults to @c r0. Likewise, > @@ -2505,6 +2521,7 @@ svn_fs_pack(const char *db_path, > */ > svn_error_t * > svn_fs_verify(const char *path, > + apr_hash_t *fs_config, > svn_revnum_t start, > svn_revnum_t end, > svn_fs_progress_notify_func_t notify_func, > > Modified: subversion/trunk/subversion/libsvn_fs/fs-loader.c > URL: > http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs/fs- > loader.c?rev=1470738&r1=1470737&r2=1470738&view=diff > ========================================================== > ==================== > --- subversion/trunk/subversion/libsvn_fs/fs-loader.c (original) > +++ subversion/trunk/subversion/libsvn_fs/fs-loader.c Mon Apr 22 22:26:39 > 2013
<snip> > @@ -515,6 +516,12 @@ svn_fs_path(svn_fs_t *fs, apr_pool_t *po > return apr_pstrdup(pool, fs->path); > } > > +apr_hash_t * > +svn_fs_config(svn_fs_t *fs, apr_pool_t *pool) > +{ > + return apr_hash_copy(pool, fs->config); > +} > + fs->config can be NULL (see your own documentation of this function). In this case it caused a segfault. The JavaHL tests on our buildbots triggered this problem and I applied a simple fix in r1470908. I added this fix to the r1470738 in ^/subversion/branches/1.8.x/STATUS. Can you review this addition? Thanks, Bert