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 2013/07/01 22:53:42 UTC

svn commit: r1498681 - in /subversion/branches/fsfs-format7/subversion: include/svn_fs.h libsvn_fs_x/fs.c

Author: stefan2
Date: Mon Jul  1 20:53:42 2013
New Revision: 1498681

URL: http://svn.apache.org/r1498681
Log:
On the fsfs-format7 branch:  use a separate FS info type for FSX.

* subversion/include/svn_fs.h
  (svn_fs_fsx_info_t): new FSX-specific info type

* subversion/libsvn_fs_x/fs.c
  (x_info,
   x_info_dup): return the new info type

Modified:
    subversion/branches/fsfs-format7/subversion/include/svn_fs.h
    subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.c

Modified: subversion/branches/fsfs-format7/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/svn_fs.h?rev=1498681&r1=1498680&r2=1498681&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/svn_fs.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/svn_fs.h Mon Jul  1 20:53:42 2013
@@ -2670,6 +2670,32 @@ typedef struct svn_fs_fsfs_info_t {
      or svn_fs_info_dup(). */
 } svn_fs_fsfs_info_t;
 
+/**
+ * A structure that provides some information about a filesystem.
+ * Returned by svn_fs_info() for #SVN_FS_TYPE_FSX filesystems.
+ *
+ * @note Fields may be added to the end of this structure in future
+ * versions.  Therefore, users shouldn't allocate structures of this
+ * type, to preserve binary compatibility.
+ *
+ * @since New in 1.9.
+ */
+typedef struct svn_fs_fsx_info_t {
+
+  /** Filesystem backend (#fs_type), i.e., the string #SVN_FS_TYPE_FSX. */
+  const char *fs_type;
+
+  /** Shard size, always > 0. */
+  int shard_size;
+
+  /** The smallest revision (as #svn_revnum_t) which is not in a pack file. */
+  svn_revnum_t min_unpacked_rev;
+
+  /* If you add fields here, check whether you need to extend svn_fs_info()
+     or svn_fs_info_dup(). */
+
+} svn_fs_fsx_info_t;
+
 /** @see svn_fs_info()
  * @since New in 1.9. */
 typedef struct svn_fs_info_placeholder_t {

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.c?rev=1498681&r1=1498680&r2=1498681&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.c Mon Jul  1 20:53:42 2013
@@ -171,17 +171,17 @@ x_freeze(svn_fs_t *fs,
 }
 
 static svn_error_t *
-x_info(const void **fsfs_info,
+x_info(const void **fsx_info,
        svn_fs_t *fs,
        apr_pool_t *result_pool,
        apr_pool_t *scratch_pool)
 {
   fs_x_data_t *ffd = fs->fsap_data;
-  svn_fs_fsfs_info_t *info = apr_palloc(result_pool, sizeof(*info));
-  info->fs_type = SVN_FS_TYPE_FSFS;
+  svn_fs_fsx_info_t *info = apr_palloc(result_pool, sizeof(*info));
+  info->fs_type = SVN_FS_TYPE_FSX;
   info->shard_size = ffd->max_files_per_dir;
   info->min_unpacked_rev = ffd->min_unpacked_rev;
-  *fsfs_info = info;
+  *fsx_info = info;
   return SVN_NO_ERROR;
 }
 
@@ -444,12 +444,12 @@ x_set_svn_fs_open(svn_fs_t *fs,
 }
 
 static void *
-x_info_dup(const void *fsfs_info_void,
+x_info_dup(const void *fsx_info_void,
            apr_pool_t *result_pool)
 {
   /* All fields are either ints or static strings. */
-  const svn_fs_fsfs_info_t *fsfs_info = fsfs_info_void;
-  return apr_pmemdup(result_pool, fsfs_info, sizeof(*fsfs_info));
+  const svn_fs_fsx_info_t *fsx_info = fsx_info_void;
+  return apr_pmemdup(result_pool, fsx_info, sizeof(*fsx_info));
 }