[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r39828 - trunk/subversion/libsvn_fs_fs

From: Greg Stein <gstein_at_gmail.com>
Date: Wed, 7 Oct 2009 15:22:32 -0400

On Wed, Oct 7, 2009 at 11:11, Bert Huijben <rhuijben_at_sharpsvn.net> wrote:
>...
> +++ trunk/subversion/libsvn_fs_fs/fs.h  Wed Oct  7 08:11:47 2009        (r39828)
> @@ -147,6 +147,15 @@ typedef struct fs_fs_shared_txn_data_t
>   apr_pool_t *pool;
>  } fs_fs_shared_txn_data_t;
>
> +/* On most operating systems apr implements file locks per process, not
> +   per file.  On Windows apr implements the locking as per file handle
> +   locks, so we don't have to add our own mutex for just in-process
> +   synchronization. */
> +#if APR_HAS_THREADS && !defined(WIN32)
> +#define SVN_FS_FS__USE_LOCK_MUTEX 1
> +#else
> +#define SVN_FS_FS__USE_LOCK_MUTEX 0
> +#endif
>
>  /* Private FSFS-specific data shared between all svn_fs_t objects that
>    relate to a particular filesystem, as identified by filesystem UUID.
> @@ -163,7 +172,7 @@ typedef struct
>      Access to this object is synchronised under TXN_LIST_LOCK. */
>   fs_fs_shared_txn_data_t *free_txn;
>
> -#if APR_HAS_THREADS
> +#if SVN_FS_FS__USE_LOCK_MUTEX
>   /* A lock for intra-process synchronization when accessing the TXNS list. */
>   apr_thread_mutex_t *txn_list_lock;

This change looks *totally* wrong. The txn list should be synchronized
on *all* platforms all the time since it is simply an in-memory
structure. It has nothing to do with files.

>...

Cheers,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2404643
Received on 2009-10-07 21:22:44 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.