FreeBSD/contrib/subversion/subversion/libsvn_fs_fs/transaction.c
/* Set *SPANNED to the number of shards touched when walking WALK steps on
 * NODEREV's predecessor chain in FS.  Use POOL for temporary allocations.
 */
Set *SPANNED to the number of shards touched when walking WALK steps on
NODEREV's predecessor chain in FS.  Use POOL for temporary allocations.
Set * SPANNED to the number of shards touched when walking WALK steps on NODEREV ' s predecessor chain in FS . Use POOL for temporary allocations .
static svn_error_t *
shards_spanned(int *spanned,
               svn_fs_t *fs,
               node_revision_t *noderev,
               int walk,
               apr_pool_t *pool)
{
  fs_fs_data_t *ffd = fs->fsap_data;
  int shard_size = ffd->max_files_per_dir ? ffd->max_files_per_dir : 1;
  apr_pool_t *iterpool;
  int count = walk ? 1 : 0; 
  svn_revnum_t shard, last_shard = ffd->youngest_rev_cache / shard_size;
  iterpool = svn_pool_create(pool);
  while (walk-- && noderev->predecessor_count)
    {
      svn_pool_clear(iterpool);
      SVN_ERR(svn_fs_fs__get_node_revision(&noderev, fs,
                                           noderev->predecessor_id, pool,
                                           iterpool));
      shard = svn_fs_fs__id_rev(noderev->id) / shard_size;
      if (shard != last_shard)
        {
          ++count;
          last_shard = shard;
        }
    }
  svn_pool_destroy(iterpool);
  *spanned = count;
  return SVN_NO_ERROR;
}
static svn_error_t * shards_spanned ( int * spanned , svn_fs_t * fs , node_revision_t * noderev , int walk , apr_pool_t * pool ) { fs_fs_data_t * ffd = fs -> fsap_data ; int shard_size = ffd -> max_files_per_dir ? ffd -> max_files_per_dir : 1 ; apr_pool_t * iterpool ; int count = walk ? 1 : 0 ; svn_revnum_t shard , last_shard = ffd -> youngest_rev_cache / shard_size ; iterpool = svn_pool_create ( pool ) ; while ( walk -- && noderev -> predecessor_count ) { svn_pool_clear ( iterpool ) ; SVN_ERR ( svn_fs_fs__get_node_revision ( & noderev , fs , noderev -> predecessor_id , pool , iterpool ) ) ; shard = svn_fs_fs__id_rev ( noderev -> id ) / shard_size ; if ( shard != last_shard ) { ++ count ; last_shard = shard ; } } svn_pool_destroy ( iterpool ) ; * spanned = count ; return SVN_NO_ERROR ; }
Set *SPANNED to the number of shards touched when walking WALK steps on
 NODEREV's predecessor chain in FS.
Set * SPANNED to the number of shards touched when walking WALK steps on NODEREV ' s predecessor chain in FS .
/* The start of a walk already touches a shard. */