/[Apache-SVN]
ViewVC logotype

Revision 1578176


Jump to revision: Previous Next
Author: stefan2
Date: Sun Mar 16 23:09:45 2014 UTC (10 years, 1 month ago)
Changed paths: 5
Log Message:
Model the FSFS pack lock similarly to our other file based locks in FSFS.
This gives us proper mutex functionality should multiple threads try to
pack the same repo at the same time.

* subversion/libsvn_fs_fs/fs.h
  (fs_fs_shared_data_t): Add a thread mutex alongside the file lock.

* subversion/libsvn_fs_fs/fs.c
  (fs_serialized_init): Initialize the new mutex.

* subversion/libsvn_fs_fs/fs_fs.h
  (svn_fs_fs__get_lock_on_filesystem): Privatize again.
  (svn_fs_fs__with_pack_lock): New lock handling function similar
                               to what we do for the other locks.

* subversion/libsvn_fs_fs/fs_fs.c
  (path_pack_lock): New utility function.
  (svn_fs_fs__get_lock_on_filesystem): Rename back to ...
  (get_lock_on_filesystem): ... this again.
  (with_some_lock_file): Update caller.
  (svn_fs_fs__with_pack_lock): Implement the new lock function.

* subversion/libsvn_fs_fs/pack.c
  (svn_fs_fs__pack): Use the new pack lock handling function.

Suggested by: ivan

Changed paths

Path Details
Directorysubversion/trunk/subversion/libsvn_fs_fs/fs.c modified , text changed
Directorysubversion/trunk/subversion/libsvn_fs_fs/fs.h modified , text changed
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/pack.c modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26