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

[PATCH] Do not disable txn-list-lock on Windows

From: Evgeny Kotkov <evgeny.kotkov_at_visualsvn.com>
Date: Mon, 17 Feb 2014 04:37:27 +0400


I've noticed that txn-list operations are not being synchronized on Windows
around trunk_at_1568806. FSFS makes use of two different types of locks: there
are mutexes synchronizing the fcntl file locking (POSIX only) and ordinary
mutexes (e.g. txn-list-lock). The former are only required on POSIX, the
latter, however, should be enabled under all OSes.

Since r1182459 [1], the txn-list-lock mutex is being erroneously enabled and
disabled under the same condition as the mutexes required for the fcntl locking
mechanism to work. This effectively makes the txn-list operations work without
any serialization on Windows.

I have attached a patch that fixes this problem. Log message:
Ensure that access to the transaction list and free transaction pointer is
properly synchronized on Windows. Before this changeset, the corresponding
txn-list-lock mutex was being enabled/disabled under the same condition as
the mutexes required for the POSIX fcntl file locking. This effectively ended
up in no synchronization for the txn-list operations on Windows.

* subversion/libsvn_fs_fs/fs.c
  (fs_serialized_init): Unconditionally enable the TXN_LIST_LOCK mutex.

Patch by: Evgeny Kotkov <evgeny.kotkov{_AT_}visualsvn.com>

[1] http://svn.apache.org/viewvc?view=revision&revision=r1182459

Thanks and regards,
Evgeny Kotkov

Received on 2014-02-17 01:38:21 CET

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.