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 2015/10/24 17:35:55 UTC
svn commit: r1710359 - in /subversion/trunk/subversion:
libsvn_fs/fs-loader.h libsvn_fs_base/fs.c libsvn_fs_fs/fs.c
Author: stefan2
Date: Sat Oct 24 15:35:55 2015
New Revision: 1710359
URL: http://svn.apache.org/viewvc?rev=1710359&view=rev
Log:
Document the fact that FS create / open functions take a scratch pool
parameter - not a combined scratch&result pool.
* subversion/libsvn_fs/fs-loader.h
(fs_library_vtable_t): The POOL in these vtable entries is actually
a SCRATCH_POOL.
* subversion/libsvn_fs_base/fs.c
(base_create,
base_open): Same rename in the BDB implementation of those functions.
* subversion/libsvn_fs_fs/fs.c
(fs_create,
fs_open): Same for FSFS.
Modified:
subversion/trunk/subversion/libsvn_fs/fs-loader.h
subversion/trunk/subversion/libsvn_fs_base/fs.c
subversion/trunk/subversion/libsvn_fs_fs/fs.c
Modified: subversion/trunk/subversion/libsvn_fs/fs-loader.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs/fs-loader.h?rev=1710359&r1=1710358&r2=1710359&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs/fs-loader.h (original)
+++ subversion/trunk/subversion/libsvn_fs/fs-loader.h Sat Oct 24 15:35:55 2015
@@ -79,11 +79,11 @@ typedef struct fs_library_vtable_t
parameter for allocating fs-global objects such as an env cache. */
svn_error_t *(*create)(svn_fs_t *fs, const char *path,
svn_mutex__t *common_pool_lock,
- apr_pool_t *pool,
+ apr_pool_t *scratch_pool,
apr_pool_t *common_pool);
svn_error_t *(*open_fs)(svn_fs_t *fs, const char *path,
svn_mutex__t *common_pool_lock,
- apr_pool_t *pool,
+ apr_pool_t *scratch_pool,
apr_pool_t *common_pool);
/* open_for_recovery() is like open(), but used to fill in an fs pointer
that will be passed to recover(). We assume that the open() method
Modified: subversion/trunk/subversion/libsvn_fs_base/fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/fs.c?rev=1710359&r1=1710358&r2=1710359&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_base/fs.c Sat Oct 24 15:35:55 2015
@@ -739,7 +739,7 @@ static svn_error_t *
base_create(svn_fs_t *fs,
const char *path,
svn_mutex__t *common_pool_lock,
- apr_pool_t *pool,
+ apr_pool_t *scratch_pool,
apr_pool_t *common_pool)
{
int format = SVN_FS_BASE__FORMAT_NUMBER;
@@ -750,7 +750,7 @@ base_create(svn_fs_t *fs,
{
svn_version_t *compatible_version;
SVN_ERR(svn_fs__compatible_version(&compatible_version, fs->config,
- pool));
+ scratch_pool));
/* select format number */
switch(compatible_version->minor)
@@ -780,13 +780,14 @@ base_create(svn_fs_t *fs,
if (svn_err) goto error;
/* This filesystem is ready. Stamp it with a format number. */
- svn_err = svn_io_write_version_file(
- svn_dirent_join(fs->path, FORMAT_FILE, pool), format, pool);
+ svn_err = svn_io_write_version_file(svn_dirent_join(fs->path, FORMAT_FILE,
+ scratch_pool),
+ format, scratch_pool);
if (svn_err) goto error;
((base_fs_data_t *) fs->fsap_data)->format = format;
- SVN_ERR(populate_opened_fs(fs, pool));
+ SVN_ERR(populate_opened_fs(fs, scratch_pool));
return SVN_NO_ERROR;
error:
@@ -833,7 +834,7 @@ static svn_error_t *
base_open(svn_fs_t *fs,
const char *path,
svn_mutex__t *common_pool_lock,
- apr_pool_t *pool,
+ apr_pool_t *scratch_pool,
apr_pool_t *common_pool)
{
int format;
@@ -842,8 +843,9 @@ base_open(svn_fs_t *fs,
/* Read the FS format number. */
svn_err = svn_io_read_version_file(&format,
- svn_dirent_join(path, FORMAT_FILE, pool),
- pool);
+ svn_dirent_join(path, FORMAT_FILE,
+ scratch_pool),
+ scratch_pool);
if (svn_err && APR_STATUS_IS_ENOENT(svn_err->apr_err))
{
/* Pre-1.2 filesystems did not have a format file (you could say
@@ -869,12 +871,12 @@ base_open(svn_fs_t *fs,
if (write_format_file)
{
svn_err = svn_io_write_version_file(svn_dirent_join(path, FORMAT_FILE,
- pool),
- format, pool);
+ scratch_pool),
+ format, scratch_pool);
if (svn_err) goto error;
}
- SVN_ERR(populate_opened_fs(fs, pool));
+ SVN_ERR(populate_opened_fs(fs, scratch_pool));
return SVN_NO_ERROR;
error:
Modified: subversion/trunk/subversion/libsvn_fs_fs/fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs.c?rev=1710359&r1=1710358&r2=1710359&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs.c Sat Oct 24 15:35:55 2015
@@ -315,18 +315,18 @@ static svn_error_t *
fs_create(svn_fs_t *fs,
const char *path,
svn_mutex__t *common_pool_lock,
- apr_pool_t *pool,
+ apr_pool_t *scratch_pool,
apr_pool_t *common_pool)
{
SVN_ERR(svn_fs__check_fs(fs, FALSE));
SVN_ERR(initialize_fs_struct(fs));
- SVN_ERR(svn_fs_fs__create(fs, path, pool));
+ SVN_ERR(svn_fs_fs__create(fs, path, scratch_pool));
- SVN_ERR(svn_fs_fs__initialize_caches(fs, pool));
+ SVN_ERR(svn_fs_fs__initialize_caches(fs, scratch_pool));
SVN_MUTEX__WITH_LOCK(common_pool_lock,
- fs_serialized_init(fs, common_pool, pool));
+ fs_serialized_init(fs, common_pool, scratch_pool));
return SVN_NO_ERROR;
}
@@ -344,10 +344,10 @@ static svn_error_t *
fs_open(svn_fs_t *fs,
const char *path,
svn_mutex__t *common_pool_lock,
- apr_pool_t *pool,
+ apr_pool_t *scratch_pool,
apr_pool_t *common_pool)
{
- apr_pool_t *subpool = svn_pool_create(pool);
+ apr_pool_t *subpool = svn_pool_create(scratch_pool);
SVN_ERR(svn_fs__check_fs(fs, FALSE));