/[Apache-SVN]
ViewVC logotype

Revision 852750


Jump to revision: Previous Next
Author: fitz
Date: Tue Jan 11 20:15:26 2005 UTC (19 years, 3 months ago)
Changed paths: 1
Log Message:
Rework the lock storage mechanism for fsfs so that it uses a flat
directory of files to hold locks.  Directories are represented as
entries files, and both entries files and lock files are named using
an MD5 hash of their corresponding path name.

Anyone who has fsfs repositories with locks in them (This should only
apply to developers working on locking) needs to delete their db/locks
directory before using this patch.

* libsvn_fs_fs/lock.c (abs_path_to_lock_digest_file, make_digest,
  write_entries_file, read_entries_file, repository_abs_path,
  add_hash_to_entries_file, merge_array_components,
  read_lock_from_abs_path, read_lock_from_hash_name,
  get_locks_under_path): New functions.

  (abs_path_to_lock_file): Use digest to compose path instead of
  relative (tree) path.

  (write_lock_to_file): Rework this to write lock to file named by
  hash of the path, as well as writing/appending to entries files for
  each parent directory.

  (delete_lock): Rework this to delete lock files as well as
  deleting/removing child entries for each parent directory.

  (generate_new_lock): Remove obsolete comment.
   
  (read_lock_from_abs_path): Now contains the guts of
  read_lock_from_file.  Created two wrapper functions for this:
  read_lock_from_file, and read_lock_from_hash_name.  Also take an
  apr_file_t for an arg to use a file descriptor that's already open.
  All callers updated.

  (dir_walker_baton, locks_dir_walker): Removed.

  (svn_fs_fs__get_locks): Rework to call get_locks_under_path instead
  of walking the directory tree.


Changed paths

Path Details
Directorysubversion/branches/locking/subversion/libsvn_fs_fs/lock.c modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26