I couldn't find this covered in the mailing list or documentation, so I
decided to post something on it...
I've tried to use the FSFS repository format to store a Subversion
1.1.3 repository on a Windows file server from a Mac OS X 10.3.8
machine. Unfortunately, it fails with an error regardless of way I
mount the network share (SMB or AFP):
svn: Error opening db lockfile
svn: Can't get shared lock on file 'test/locks/db/lock': Operation not
supported
After digging through the Subversion source, I discovered that the
error was originating in a call to apr_file_lock. This function in the
Apache Portable Runtime (0.9.6) uses fcntl when compiled under Mac OS X
10.3. I wrote some test code that would attempt to lock a file with
flock and discovered that it does indeed not work for SMB or AFP
mounted shares - error 45 is always returned.
If compiled on a Unix system that does not support fcntl, the APR will
use flock instead. I adjusted my test code to use flock and got no
errors with file locks on SMB or AFP mounted shares. However, I soon
realized that for AFP shares flock seems to do absolutely nothing - no
error, but file locking does not work. On the other hand, file locks
appear to work with flock on an SMB mounted network share. The only
caveat is that shared locks act like exclusive locks.
Based on this discovery, I've decided to modify my copy of the APR code
so that it checks the filesystem type using fstatfs and uses flock if
the type is "smbfs". All other filesystems will be handled with fcntl
as usual. I'm going to test Subversion with the modified APR this week
to see how it responds to the change.
Any suggestions or thoughts on this work-around?
Thanks,
– Brian Wells
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Apr 11 03:44:31 2005