Exemplo n.º 1
0
svn_error_t *
svn_fs_pack(const char *path,
            svn_fs_pack_notify_t notify_func,
            void *notify_baton,
            svn_cancel_func_t cancel_func,
            void *cancel_baton,
            apr_pool_t *pool)
{
  svn_error_t *err;
  svn_error_t *err2;
  fs_library_vtable_t *vtable;
  svn_fs_t *fs;

  SVN_ERR(fs_library_vtable(&vtable, path, pool));
  fs = fs_new(NULL, pool);
  SVN_ERR(acquire_fs_mutex());
  err = vtable->pack_fs(fs, path, notify_func, notify_baton,
                        cancel_func, cancel_baton, pool);
  err2 = release_fs_mutex();
  if (err)
    {
      svn_error_clear(err2);
      return svn_error_trace(err);
    }
  return svn_error_trace(err2);
}
Exemplo n.º 2
0
svn_error_t *
svn_fs_delete_fs(const char *path, apr_pool_t *pool)
{
  fs_library_vtable_t *vtable;

  SVN_ERR(fs_library_vtable(&vtable, path, pool));
  return svn_error_trace(vtable->delete_fs(path, pool));
}
Exemplo n.º 3
0
svn_error_t *
svn_fs_open_berkeley(svn_fs_t *fs, const char *path)
{
  fs_library_vtable_t *vtable;

  SVN_ERR(fs_library_vtable(&vtable, path, fs->pool));
  SVN_MUTEX__WITH_LOCK(common_pool_lock,
                       vtable->open_fs(fs, path, fs->pool, common_pool));
  return SVN_NO_ERROR;
}
Exemplo n.º 4
0
svn_error_t *
svn_fs_berkeley_logfiles(apr_array_header_t **logfiles,
                         const char *path,
                         svn_boolean_t only_unused,
                         apr_pool_t *pool)
{
  fs_library_vtable_t *vtable;

  SVN_ERR(fs_library_vtable(&vtable, path, pool));
  return svn_error_trace(vtable->bdb_logfiles(logfiles, path, only_unused,
                                              pool));
}
Exemplo n.º 5
0
svn_error_t *
svn_fs_open(svn_fs_t **fs_p, const char *path, apr_hash_t *fs_config,
            apr_pool_t *pool)
{
  fs_library_vtable_t *vtable;

  SVN_ERR(fs_library_vtable(&vtable, path, pool));
  *fs_p = fs_new(fs_config, pool);
  SVN_MUTEX__WITH_LOCK(common_pool_lock,
                       vtable->open_fs(*fs_p, path, pool, common_pool));
  return SVN_NO_ERROR;
}
Exemplo n.º 6
0
svn_error_t *
svn_fs_upgrade(const char *path, apr_pool_t *pool)
{
  fs_library_vtable_t *vtable;
  svn_fs_t *fs;

  SVN_ERR(fs_library_vtable(&vtable, path, pool));
  fs = fs_new(NULL, pool);

  SVN_MUTEX__WITH_LOCK(common_pool_lock,
                       vtable->upgrade_fs(fs, path, pool, common_pool));
  return SVN_NO_ERROR;
}
Exemplo n.º 7
0
svn_error_t *
svn_fs_recover(const char *path,
               svn_cancel_func_t cancel_func, void *cancel_baton,
               apr_pool_t *pool)
{
  fs_library_vtable_t *vtable;
  svn_fs_t *fs;

  SVN_ERR(fs_library_vtable(&vtable, path, pool));
  fs = fs_new(NULL, pool);

  SVN_MUTEX__WITH_LOCK(common_pool_lock,
                       vtable->open_fs_for_recovery(fs, path, pool,
                                                    common_pool));
  return svn_error_trace(vtable->recover(fs, cancel_func, cancel_baton,
                                         pool));
}
Exemplo n.º 8
0
svn_error_t *
svn_fs_open_berkeley(svn_fs_t *fs, const char *path)
{
  svn_error_t *err;
  svn_error_t *err2;
  fs_library_vtable_t *vtable;

  SVN_ERR(fs_library_vtable(&vtable, path, fs->pool));
  SVN_ERR(acquire_fs_mutex());
  err = vtable->open_fs(fs, path, fs->pool, common_pool);
  err2 = release_fs_mutex();
  if (err)
    {
      svn_error_clear(err2);
      return svn_error_trace(err);
    }
  return svn_error_trace(err2);
}
Exemplo n.º 9
0
svn_error_t *
svn_fs_verify(const char *path,
              svn_cancel_func_t cancel_func,
              void *cancel_baton,
              svn_revnum_t start,
              svn_revnum_t end,
              apr_pool_t *pool)
{
  fs_library_vtable_t *vtable;
  svn_fs_t *fs;

  SVN_ERR(fs_library_vtable(&vtable, path, pool));
  fs = fs_new(NULL, pool);

  SVN_MUTEX__WITH_LOCK(common_pool_lock,
                       vtable->verify_fs(fs, path, cancel_func, cancel_baton,
                                         start, end, pool, common_pool));
  return SVN_NO_ERROR;
}
Exemplo n.º 10
0
svn_error_t *
svn_fs_pack(const char *path,
            svn_fs_pack_notify_t notify_func,
            void *notify_baton,
            svn_cancel_func_t cancel_func,
            void *cancel_baton,
            apr_pool_t *pool)
{
  fs_library_vtable_t *vtable;
  svn_fs_t *fs;

  SVN_ERR(fs_library_vtable(&vtable, path, pool));
  fs = fs_new(NULL, pool);

  SVN_MUTEX__WITH_LOCK(common_pool_lock,
                       vtable->pack_fs(fs, path, notify_func, notify_baton,
                                       cancel_func, cancel_baton, pool,
                                       common_pool));
  return SVN_NO_ERROR;
}
Exemplo n.º 11
0
svn_error_t *
svn_fs_upgrade(const char *path, apr_pool_t *pool)
{
  svn_error_t *err;
  svn_error_t *err2;
  fs_library_vtable_t *vtable;
  svn_fs_t *fs;

  SVN_ERR(fs_library_vtable(&vtable, path, pool));
  fs = fs_new(NULL, pool);
  SVN_ERR(acquire_fs_mutex());
  err = vtable->upgrade_fs(fs, path, pool, common_pool);
  err2 = release_fs_mutex();
  if (err)
    {
      svn_error_clear(err2);
      return svn_error_trace(err);
    }
  return svn_error_trace(err2);
}
Exemplo n.º 12
0
svn_error_t *
svn_fs_open(svn_fs_t **fs_p, const char *path, apr_hash_t *fs_config,
            apr_pool_t *pool)
{
  svn_error_t *err;
  svn_error_t *err2;
  fs_library_vtable_t *vtable;

  SVN_ERR(fs_library_vtable(&vtable, path, pool));
  *fs_p = fs_new(fs_config, pool);
  SVN_ERR(acquire_fs_mutex());
  err = vtable->open_fs(*fs_p, path, pool, common_pool);
  err2 = release_fs_mutex();
  if (err)
    {
      svn_error_clear(err2);
      return svn_error_trace(err);
    }
  return svn_error_trace(err2);
}
Exemplo n.º 13
0
svn_error_t *
svn_fs_recover(const char *path,
               svn_cancel_func_t cancel_func, void *cancel_baton,
               apr_pool_t *pool)
{
  svn_error_t *err;
  svn_error_t *err2;
  fs_library_vtable_t *vtable;
  svn_fs_t *fs;

  SVN_ERR(fs_library_vtable(&vtable, path, pool));
  fs = fs_new(NULL, pool);
  SVN_ERR(acquire_fs_mutex());
  err = vtable->open_fs_for_recovery(fs, path, pool, common_pool);
  err2 = release_fs_mutex();
  if (err)
    {
      svn_error_clear(err2);
      return svn_error_trace(err);
    }
  if (! err2)
    err2 = vtable->recover(fs, cancel_func, cancel_baton, pool);
  return svn_error_trace(err2);
}