locking samba during critical VFS file operations?
sean at troublemakerstudios.com
Mon Sep 26 23:00:07 GMT 2005
In the rename operation of my VFS, I have to do some recursive updating
of symbolic links in the file system that the samba share sits on top
Because this relinking could cause the view of the filesystem to become
inconsistent (only during this operation), I believe I need to lock
samba for all accesses to subdirectories of the directory being renamed.
It'd like to wait until all pending operations have finished, do my
critical section of code, and then unlock. Operations that happen after
I request the lock should wait until I've unlocked. Is it possible to
achieve this level of mutual exclusion in the samba API, or is it a
feature that I need to implement myself using mutexes?
More information about the samba-technical