FreeBSD/contrib/subversion/subversion/libsvn_fs_x/revprops.c
/* Set the revprop generation in FS to the next odd number to indicate
   that there is a revprop write process under way.  Return that value
   in *GENERATION.  If the change times out, readers shall recover from
   that state & re-read revprops.
   This is a no-op for repo formats that don't support revprop caching. */
Set the revprop generation in FS to the next odd number to indicate
that there is a revprop write process under way.  Return that value
in *GENERATION.  If the change times out, readers shall recover from
that state & re-read revprops.
This is a no-op for repo formats that don't support revprop caching.
Set the revprop generation in FS to the next odd number to indicate that there is a revprop write process under way . Return that value in * GENERATION . If the change times out readers shall recover from that state & re - read revprops . This is a no - op for repo formats that don ' t support revprop caching .
static svn_error_t *
begin_revprop_change(apr_int64_t *generation,
                     svn_fs_t *fs,
                     apr_pool_t *scratch_pool)
{
  svn_fs_x__data_t *ffd = fs->fsap_data;
  SVN_ERR_ASSERT(ffd->has_write_lock);
  SVN_ERR(close_revprop_generation_file(fs, scratch_pool));
  SVN_ERR(open_revprop_generation_file(fs, FALSE, scratch_pool));
  SVN_ERR(read_revprop_generation(generation, fs, scratch_pool));
  ++*generation;
  SVN_ERR(write_revprop_generation_file(fs, *generation, scratch_pool));
  return SVN_NO_ERROR;
}
static svn_error_t * begin_revprop_change ( apr_int64_t * generation , svn_fs_t * fs , apr_pool_t * scratch_pool ) { svn_fs_x__data_t * ffd = fs -> fsap_data ; SVN_ERR_ASSERT ( ffd -> has_write_lock ) ; SVN_ERR ( close_revprop_generation_file ( fs , scratch_pool ) ) ; SVN_ERR ( open_revprop_generation_file ( fs , FALSE , scratch_pool ) ) ; SVN_ERR ( read_revprop_generation ( generation , fs , scratch_pool ) ) ; ++ * generation ; SVN_ERR ( write_revprop_generation_file ( fs , * generation , scratch_pool ) ) ; return SVN_NO_ERROR ; }
Set the revprop generation in FS to the next odd number to indicate
that there is a revprop write process under way.
Set the revprop generation in FS to the next odd number to indicate that there is a revprop write process under way .
/* Close and re-open to make sure we read the latest data. */ /* Set the revprop generation to an odd value to indicate
   * that a write is in progress.
   */