VFS and tdb_lock

Brad Sahr bsahr at macromedia.com
Thu Oct 5 19:04:10 GMT 2000

Looking over my post, I see you answered exactly what I asked and more.
Thank you for the excellent information.

I failed to express the second half of my question. And this is - How long
must the file dev/inode information remain constant for the locks to work
correctly? This unique information is used to create the key for the tdb
hashchain lock. Jeremy indicated that a VFS must provide POSIX compliant
file semantics. In this particular VFS, files don't usually exist on the
local file system and I'm hoping to understand how I can address Samba's

I don't know of any locks that are being held long term, and will let the
group know if I come across anything.


> -----Original Message-----
> From: samba-technical-admin at us4.samba.org
> [mailto:samba-technical-admin at us4.samba.org]On Behalf Of Andrew Tridgell
> Sent: Wednesday, October 04, 2000 9:44 PM
> To: bsahr at macromedia.com
> Cc: samba-technical at samba.org
> Subject: Re: VFS and tdb_lock
> 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
> byte.
> 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