/[Apache-SVN]
ViewVC logotype

Revision 1588815


Jump to revision: Previous Next
Author: stefan2
Date: Sun Apr 20 18:35:43 2014 UTC (10 years ago)
Changed paths: 4
Log Message:
Enable FSFS to take out more than file lock at once through a single call.
Use that functionality to take out the new pack lock for upgrade, hotcopy
and recovery.  Also, disallow new TXNs during upgrade and recovery.

The core is the introduction of a new data type describing a lock to take
out, which can be nested / chained.  Switch all existing lock function to
using that infrastructure.

* subversion/libsvn_fs_fs/fs_fs.h
  (svn_fs_fs__with_all_locks): Declare the new internal lock API.

* subversion/libsvn_fs_fs/fs_fs.c
  (with_lock_baton_t): New data type.  It allows us to describe a whole
                       chain of locks to take out with minimal extra
                       overhead.
  (with_some_lock_file): Take all parameters and the lock pool from the
                         new data struct.  Also, update the FS members
                         only once before calling the user-provided BODY
                         and release all file locks at once in the outermost
                         nesting level.  Finally, make the funcion not
                         hold / leak file locks when updating FS members
                         failed.
  (with_lock): New wrapper around the above that ensures in-process
               serialization as well.
  (lock_id_t): New enum that enables us to abstractly specify a FS-internal
               lock.
  (init_lock_baton,
   create_lock_baton,
   chain_lock_baton): New functions to construct single block batons as
                      well as whole chains of it.
  (svn_fs_fs__with_write_lock,
   svn_fs_fs__with_pack_lock,
   svn_fs_fs__with_txn_current_lock): Switch to the new infrastructure.
  (svn_fs_fs__upgrade): Use the new lock API for global serialization.

* subversion/libsvn_fs_fs/hotcopy.c
  (svn_fs_fs__hotcopy): Same.

* subversion/libsvn_fs_fs/recovery.c
  (svn_fs_fs__recover): Same.

Changed paths

Path Details
Directorysubversion/trunk/subversion/libsvn_fs_fs/fs_fs.c modified , text changed
Directorysubversion/trunk/subversion/libsvn_fs_fs/fs_fs.h modified , text changed
Directorysubversion/trunk/subversion/libsvn_fs_fs/hotcopy.c modified , text changed
Directorysubversion/trunk/subversion/libsvn_fs_fs/recovery.c modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26