VFS and tdb_lock

Andrew Tridgell tridge at linuxcare.com
Thu Oct 5 04:44:10 GMT 2000

the locks should be very short lived. They are only done on requests
that update the database in question (such as open adding an entry to
the share modes database) and are held only while the manipulation of
the entry is in progress.

The only locks held long-term are the 1 byte shared read-locks that
indicate "this database is being used". Those are held for the
lifetime of the process and are always at offset 4 in the file for 1

If you know of any other locks being held long term (say longer than
1ms or so) then please let us know. It would probably be a bug.

> How long does the tdb hashchain lock exist and what are the locks
> protecting? Does the lock exist for the duration of the SMB request/response
> pair or does it span the length of a session (connect/disconnect pair as
> seen from the VFS)?

More information about the samba-technical mailing list